Lets say I have
struct foo {
void ham() {}
void ham() const {}
};
struct bar {
void ham() {}
};
Assuming I have a templated fu
Detector (like is_detected):
template
using void_t = void;
template class D, typename = void>
struct detect : std::false_type {};
template class D>
struct detect>> : std::true_type {};
Sample member verifier:
template
using const_ham = decltype(std::declval().ham());
Test:
static_assert(detect::value, "!");
static_assert(!detect::value, "!");
DEMO