22 #include <type_traits> 34 template <
typename T>
struct A {
36 A(
int i,
double d) : i_(i), d_(d) {}
40 template <typename TT = T, typename = when<std::is_integral<TT>::type::value>>
41 TT
sfun () {
return TT{}; }
47 template <
typename T1,
typename T2>
49 using type = std::is_same <T1, T2>;
53 template <
typename T>
using try_type =
typename T::type;
54 template <
typename T>
using try_none =
typename T::none;
55 template <
typename T>
using try_ctor1= decltype (T(std::declval<int>(), std::declval<double>()));
56 template <
typename T>
using try_ctor2= decltype (T(std::declval<int>()));
57 template <
typename T>
using try_ppT = decltype (++(std::declval<T>()));
58 template <
typename T>
using try_Tpp = decltype (std::declval<T>()++);
59 template <
typename T>
using try_sfun = decltype (std::declval<T>().sfun());
73 EXPECT_EQ(
false, (std::is_default_constructible<nat_>()));
74 EXPECT_EQ(
false, (std::is_destructible<nat_>()));
75 EXPECT_EQ(
false, (std::is_copy_constructible<nat_>()));
76 EXPECT_EQ(
false, (std::is_copy_assignable<nat_>()));
99 EXPECT_EQ (
true, (is_detected_v<mFun, int, void>));
void void_t
void_t type alias
STL's core language concepts.
#define EXPECT_EQ(val1, val2)