Used for overloading lambdas, useful for lambda-SFINAE.
More...
#include <Overloader.hpp>
template<class... Fs>
struct Overloader< Fs >
Used for overloading lambdas, useful for lambda-SFINAE.
struct my_type1 {
int func(int a) { return 2 * a; }
};
struct my_type2 {};
template <class T, class = std::void_t<>>
template <class T>
struct has_func<
T,
std::void_t<decltype(std::declval<T>().func(std::declval<int>()))>>
template <class T>
void func(T t) {
auto my_lambdas =
CHECK(static_cast<int>(has_func<T>::value) ==
CHECK(2 + static_cast<int>(has_func<T>::value) ==
}
void caller() {
func(my_type1{});
func(my_type2{});
}
The documentation for this struct was generated from the following file:
- src/Utilities/Overloader.hpp