|
|
@@ -140,9 +140,9 @@ namespace TmetaBasic { |
|
|
|
EXPECT_EQ (true, (std::is_same<true_, and_<true_, true_, true_>>()));
|
|
|
|
EXPECT_EQ (true, (std::is_same<false_, and_<true_, true_, false_>>()));
|
|
|
|
|
|
|
|
EXPECT_EQ (true, (same_<Foo, Foo>()));
|
|
|
|
EXPECT_EQ (false, (same_<Foo, Bar>()));
|
|
|
|
EXPECT_EQ (true, (not_same_<Foo, Bar>()));
|
|
|
|
EXPECT_EQ (true, (same<Foo, Foo>()));
|
|
|
|
EXPECT_EQ (false, (same<Foo, Bar>()));
|
|
|
|
EXPECT_EQ (true, (not_same<Foo, Bar>()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
@@ -218,11 +218,11 @@ namespace TmetaBasic { |
|
|
|
/*
|
|
|
|
* SFINAE
|
|
|
|
*/
|
|
|
|
template <typename T, typename =when<same_<T, int>::type::value>>
|
|
|
|
template <typename T, typename =when<same<T, int>::type::value>>
|
|
|
|
int check1 (T x) { return x; }
|
|
|
|
int check1 (...) { return 0; }
|
|
|
|
|
|
|
|
template <typename T, typename =enable_if_t<same_<T, int>::type::value, void>>
|
|
|
|
template <typename T, typename =enable_if_t<same<T, int>::type::value, void>>
|
|
|
|
int check2 (T x) { return x; }
|
|
|
|
int check2 (...) { return 0; }
|
|
|
|
|
|
|
|