8 #include <cppexpose/cppexpose_api.h> 23 template <
bool Condition,
bool... MoreConditions>
24 struct CPPEXPOSE_TEMPLATE_API
all;
26 template <
bool... MoreConditions>
27 struct CPPEXPOSE_TEMPLATE_API
all<true, MoreConditions...> :
public all<MoreConditions...> {};
29 template <
bool... MoreConditions>
30 struct CPPEXPOSE_TEMPLATE_API
all<false, MoreConditions...> :
public std::false_type {};
33 struct CPPEXPOSE_TEMPLATE_API
all<true> :
public std::true_type {};
35 template <
bool Condition>
36 struct CPPEXPOSE_TEMPLATE_API
neg :
public std::true_type {};
39 struct CPPEXPOSE_TEMPLATE_API neg<true> :
public std::false_type {};
41 template <
typename Type>
42 struct CPPEXPOSE_TEMPLATE_API
is_array :
public std::false_type {};
44 template <
typename Type,
size_t Size>
45 struct CPPEXPOSE_TEMPLATE_API is_array<std::array<Type, Size>> :
public std::true_type {};
47 template <
typename Type,
typename Container>
50 template <
typename Type,
size_t Size>
51 struct CPPEXPOSE_TEMPLATE_API is_special_array<Type, std::array<Type, Size>> :
public std::true_type {};
53 template <
typename Condition,
typename Type>
54 struct CPPEXPOSE_TEMPLATE_API
value_accessor :
public std::enable_if<Condition::value, Type> {};
62 template <
typename Condition,
typename Type =
void>
65 template <
typename Condition>
66 struct CPPEXPOSE_TEMPLATE_API
Neg :
public neg<Condition::value> {};
68 template <
bool... Conditions>
69 struct CPPEXPOSE_TEMPLATE_API
And :
public all<Conditions...> {};
71 template <
typename Type>
72 struct CPPEXPOSE_TEMPLATE_API
isArray :
public is_array<Type> {};
74 template <
typename Type>
75 struct CPPEXPOSE_TEMPLATE_API
isBoolArray :
public is_special_array<bool, Type> {};
77 template <
typename Type>
78 struct CPPEXPOSE_TEMPLATE_API
isIntArray :
public is_special_array<int, Type> {};
80 template <
typename Type>
81 struct CPPEXPOSE_TEMPLATE_API
isDoubleArray :
public is_special_array<double, Type> {};
83 template <
typename Type>
84 struct CPPEXPOSE_TEMPLATE_API
isIntegral :
public And<std::is_integral<Type>::value,
85 Neg<std::is_same<Type, bool>>::value> {};
87 template <
typename Type>
89 std::is_unsigned<Type>::value,
90 Neg<std::is_same<Type, bool>>::value> {};
92 template <
typename Type>
93 struct CPPEXPOSE_TEMPLATE_API
isSignedIntegral :
public And<std::is_integral<Type>::value,
94 std::is_signed<Type>::value,
95 Neg<std::is_same<Type, bool>>::value> {};
97 template <
typename Type>
98 struct CPPEXPOSE_TEMPLATE_API
isFloatingPoint :
public And<std::is_floating_point<Type>::value,
99 Neg<std::is_same<Type, long double>>::value> {};
101 template <
typename Type>
102 struct CPPEXPOSE_TEMPLATE_API
isPlain :
public And<Neg<std::is_reference<Type>>::value,
103 Neg<std::is_const<Type>>::value,
104 Neg<std::is_volatile<Type>>::value> {};
Definition: template_helpers.h:75
Definition: template_helpers.h:98
Definition: template_helpers.h:78
Definition: function_helpers.h:12
Definition: template_helpers.h:84
Definition: template_helpers.h:88
Definition: template_helpers.h:93
Definition: template_helpers.h:42
Definition: template_helpers.h:66
Definition: template_helpers.h:72
Definition: template_helpers.h:102
Definition: template_helpers.h:36
struct CPPEXPOSE_TEMPLATE_API all
Definition: template_helpers.h:24
Definition: template_helpers.h:69
Definition: template_helpers.h:54
typename value_accessor< Condition, Type >::type EnableIf
Used to choose specific property implementation for different types at compile time via SFINAE...
Definition: template_helpers.h:63
Definition: template_helpers.h:81
Definition: template_helpers.h:48