Download data/miniconda3/include/yaml-cpp/traits.h from assassinlike/everything132: direct link, hf CLI and curl.
- Browser
- Download file 2.84 kB
-
https://huggingface.co/datasets/assassinlike/everything132/resolve/main/data/miniconda3/include/yaml-cpp/traits.h
- Command line
-
hf download hf://datasets/assassinlike/everything132/data/miniconda3/include/yaml-cpp/traits.h
-
curl -L -o traits.h https://huggingface.co/datasets/assassinlike/everything132/resolve/main/data/miniconda3/include/yaml-cpp/traits.h
2.84 kB
| namespace YAML { | |
| template <typename> | |
| struct is_numeric { | |
| enum { value = false }; | |
| }; | |
| template <> | |
| struct is_numeric<char> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<unsigned char> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<int> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<unsigned int> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<long int> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<unsigned long int> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<short int> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<unsigned short int> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<__int64> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<unsigned __int64> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<long long> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<unsigned long long> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<float> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<double> { | |
| enum { value = true }; | |
| }; | |
| template <> | |
| struct is_numeric<long double> { | |
| enum { value = true }; | |
| }; | |
| template <bool, class T = void> | |
| struct enable_if_c { | |
| using type = T; | |
| }; | |
| template <class T> | |
| struct enable_if_c<false, T> {}; | |
| template <class Cond, class T = void> | |
| struct enable_if : public enable_if_c<Cond::value, T> {}; | |
| template <bool, class T = void> | |
| struct disable_if_c { | |
| using type = T; | |
| }; | |
| template <class T> | |
| struct disable_if_c<true, T> {}; | |
| template <class Cond, class T = void> | |
| struct disable_if : public disable_if_c<Cond::value, T> {}; | |
| } | |
| template <typename S, typename T> | |
| struct is_streamable { | |
| template <typename StreamT, typename ValueT> | |
| static auto test(int) | |
| -> decltype(std::declval<StreamT&>() << std::declval<ValueT>(), std::true_type()); | |
| template <typename, typename> | |
| static auto test(...) -> std::false_type; | |
| static const bool value = decltype(test<S, T>(0))::value; | |
| }; | |
| template<typename Key, bool Streamable> | |
| struct streamable_to_string { | |
| static std::string impl(const Key& key) { | |
| std::stringstream ss; | |
| ss << key; | |
| return ss.str(); | |
| } | |
| }; | |
| template<typename Key> | |
| struct streamable_to_string<Key, false> { | |
| static std::string impl(const Key&) { | |
| return ""; | |
| } | |
| }; | |