11 #ifndef __TYPE_TRAITS_HEADER
12 #define __TYPE_TRAITS_HEADER
17 template<
typename T, T val>
30 template<
bool cond,
typename T,
typename F>
34 template<
typename T,
typename F>
79 struct is_integral_helper {
84 struct is_integral_helper<bool> {
88 struct is_integral_helper<char> {
92 struct is_integral_helper<char16_t> {
96 struct is_integral_helper<char32_t> {
100 struct is_integral_helper<wchar_t> {
104 struct is_integral_helper<signed char> {
108 struct is_integral_helper<short int> {
112 struct is_integral_helper<int> {
116 struct is_integral_helper<long int> {
120 struct is_integral_helper<long long int> {
124 struct is_integral_helper<unsigned char> {
128 struct is_integral_helper<unsigned short int> {
132 struct is_integral_helper<unsigned int> {
136 struct is_integral_helper<unsigned long int> {
140 struct is_integral_helper<unsigned long long int> {
146 enum {
value = detail::is_integral_helper<typename remove_cv<T>::type>
::value};
151 struct is_floating_point_helper {
156 struct is_floating_point_helper<float> {
160 struct is_floating_point_helper<double> {
164 struct is_floating_point_helper<long double> {
170 enum {
value = detail::is_floating_point_helper<typename remove_cv<T>::type>
::value};
181 template<
typename U>
static char check(
void(U::*)(
void));
182 template<
typename U>
static double check(...);
184 enum {
value = (
sizeof(char) ==
sizeof(check<T>(0))) };
191 template<
typename T,
size_t N>
218 template<
typename T,
typename U>
227 template<
bool b,
typename T>
234 template<
bool b,
typename T>
242 #endif //__TYPE_TRAITS_HEADER
Definition: type_traits.hpp:174
T type
Definition: type_traits.hpp:239
Definition: type_traits.hpp:228
integral_constant< bool, true > true_type
Definition: type_traits.hpp:27
Definition: type_traits.hpp:41
Definition: type_traits.hpp:74
Definition: type_traits.hpp:31
Definition: type_traits.hpp:65
T type
Definition: type_traits.hpp:62
T type
Definition: type_traits.hpp:58
T type
Definition: type_traits.hpp:50
T value_type
Definition: type_traits.hpp:20
T type
Definition: type_traits.hpp:232
remove_const< typename remove_volatile< T >::type >::type type
Definition: type_traits.hpp:69
F type
Definition: type_traits.hpp:36
Definition: type_traits.hpp:235
T type
Definition: type_traits.hpp:32
Definition: type_traits.hpp:188
static constexpr T value
Definition: type_traits.hpp:19
#define F(x)
Definition: ustd_generic.hpp:15
Definition: type_traits.hpp:49
integral_constant
Definition: type_traits.hpp:18
Definition: type_traits.hpp:169
Definition: type_traits.hpp:145
Definition: type_traits.hpp:57
Definition: type_traits.hpp:180
Definition: type_traits.hpp:73
Definition: type_traits.hpp:219
T type
Definition: type_traits.hpp:54
Definition: type_traits.hpp:40
integral_constant< bool, false > false_type
Definition: type_traits.hpp:28