Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <type_traits>
- #include <boost/hana/type.hpp>
- #include <boost/hana/core/when.hpp>
- namespace hana = boost::hana;
- struct S {
- template<
- typename T,
- typename = typename std::enable_if_t< (T::value) > > // <-- equivalent?
- S (const T&) { }
- };
- struct X { static constexpr int value = 0; };
- struct Y { static constexpr int value = 1; };
- int main () {
- S a (X { }); // <-- must fail
- S b (Y { });
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement