1 #ifndef TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 2 #define TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 4 #if defined(_MSC_VER) || \ 5 (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ 6 (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 10 #include <type_traits> 18 enum { value =
false };
23 enum { value =
true };
27 enum { value =
true };
31 enum { value =
true };
35 enum { value =
true };
39 enum { value =
true };
43 enum { value =
true };
47 enum { value =
true };
51 enum { value =
true };
53 #if defined(_MSC_VER) && (_MSC_VER < 1310) 56 enum { value =
true };
60 enum { value =
true };
65 enum { value =
true };
69 enum { value =
true };
74 enum { value =
true };
78 enum { value =
true };
82 enum { value =
true };
85 template <
bool,
class T =
void>
93 template <
class Cond,
class T =
void>
96 template <
bool,
class T =
void>
104 template <
class Cond,
class T =
void>
108 template <
typename S,
typename T>
110 template <
typename StreamT,
typename ValueT>
111 static auto test(
int)
112 -> decltype(std::declval<StreamT&>() << std::declval<ValueT>(), std::true_type());
114 template <
typename,
typename>
115 static auto test(...) -> std::false_type;
117 static const bool value = decltype(test<S, T>(0))::value;
120 template<
typename Key,
bool Streamable>
122 static std::string impl(
const Key& key) {
123 std::stringstream ss;
124 ss.imbue(std::locale::classic());
130 template<
typename Key>
132 static std::string impl(
const Key&) {
136 #endif // TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66