external libraries: yaml-cpp version bump
[supercollider.git] / external_libraries / yaml-cpp-0.3.0 / include / yaml-cpp / traits.h
blob09eead44075f499025d9c4b2a9b972113687b406
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
5 #pragma once
6 #endif
9 namespace YAML
11 template <typename>
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 }; };
25 #else
26 template <> struct is_numeric <long long> { enum { value = true }; };
27 template <> struct is_numeric <unsigned long long> { enum { value = true }; };
28 #endif
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>
34 struct enable_if_c {
35 typedef T type;
38 template <class T>
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>
45 struct disable_if_c {
46 typedef T type;
49 template <class T>
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