1 #ifndef TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
2 #define TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4 #if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
12 struct is_numeric
{ enum { value
= false }; };
14 template <> struct is_numeric
<char> { enum { value
= true }; };
15 template <> struct is_numeric
<unsigned char> { enum { value
= true }; };
16 template <> struct is_numeric
<int> { enum { value
= true }; };
17 template <> struct is_numeric
<unsigned int> { enum { value
= true }; };
18 template <> struct is_numeric
<long int> { enum { value
= true }; };
19 template <> struct is_numeric
<unsigned long int> { enum { value
= true }; };
20 template <> struct is_numeric
<short int> { enum { value
= true }; };
21 template <> struct is_numeric
<unsigned short int> { enum { value
= true }; };
22 #if defined(_MSC_VER) && (_MSC_VER < 1310)
23 template <> struct is_numeric
<__int64
> { enum { value
= true }; };
24 template <> struct is_numeric
<unsigned __int64
> { enum { value
= true }; };
26 template <> struct is_numeric
<long long> { enum { value
= true }; };
27 template <> struct is_numeric
<unsigned long long> { enum { value
= true }; };
29 template <> struct is_numeric
<float> { enum { value
= true }; };
30 template <> struct is_numeric
<double> { enum { value
= true }; };
31 template <> struct is_numeric
<long double> { enum { value
= true }; };
33 template <bool, class T
= void>
39 struct enable_if_c
<false, T
> {};
41 template <class Cond
, class T
= void>
42 struct enable_if
: public enable_if_c
<Cond::value
, T
> {};
44 template <bool, class T
= void>
50 struct disable_if_c
<true, T
> {};
52 template <class Cond
, class T
= void>
53 struct disable_if
: public disable_if_c
<Cond::value
, T
> {};
56 #endif // TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66