#ifndef TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #define TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #if defined(_MSC_VER) || \ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 #pragma once #endif #include #include #include #include namespace YAML { template struct is_numeric { enum { value = false }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; #if defined(_MSC_VER) && (_MSC_VER < 1310) template <> struct is_numeric<__int64> { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; #else template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; #endif template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template <> struct is_numeric { enum { value = true }; }; template struct enable_if_c { using type = T; }; template struct enable_if_c {}; template struct enable_if : public enable_if_c {}; template struct disable_if_c { using type = T; }; template struct disable_if_c {}; template struct disable_if : public disable_if_c {}; } template struct is_streamable { template static auto test(int) -> decltype(std::declval() << std::declval(), std::true_type()); template static auto test(...) -> std::false_type; static const bool value = decltype(test(0))::value; }; template struct streamable_to_string { static std::string impl(const Key& key) { std::stringstream ss; ss << key; return ss.str(); } }; template struct streamable_to_string { static std::string impl(const Key&) { return ""; } }; #endif // TRAITS_H_62B23520_7C8E_11DE_8A39_0800200C9A66