#ifndef TOML11_VALUE_T_FWD_HPP #define TOML11_VALUE_T_FWD_HPP #include "../compat.hpp" #include "../format.hpp" #include "../version.hpp" #include #include #include #include namespace toml { inline namespace TOML11_INLINE_VERSION_NAMESPACE { // forward decl template class basic_value; // ---------------------------------------------------------------------------- // enum representing toml types enum class value_t : std::uint8_t { empty = 0, boolean = 1, integer = 2, floating = 3, string = 4, offset_datetime = 5, local_datetime = 6, local_date = 7, local_time = 8, array = 9, table = 10 }; std::ostream& operator<<(std::ostream& os, value_t t); std::string to_string(value_t t); // ---------------------------------------------------------------------------- // meta functions for internal use namespace detail { template using value_t_constant = std::integral_constant; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct type_to_enum : value_t_constant {}; template struct enum_to_type { using type = void; }; template struct enum_to_type { using type = typename V::boolean_type ; }; template struct enum_to_type { using type = typename V::integer_type ; }; template struct enum_to_type { using type = typename V::floating_type ; }; template struct enum_to_type { using type = typename V::string_type ; }; template struct enum_to_type { using type = typename V::offset_datetime_type; }; template struct enum_to_type { using type = typename V::local_datetime_type ; }; template struct enum_to_type { using type = typename V::local_date_type ; }; template struct enum_to_type { using type = typename V::local_time_type ; }; template struct enum_to_type { using type = typename V::array_type ; }; template struct enum_to_type { using type = typename V::table_type ; }; template using enum_to_type_t = typename enum_to_type::type; template struct enum_to_fmt_type { using type = void; }; template<> struct enum_to_fmt_type { using type = boolean_format_info ; }; template<> struct enum_to_fmt_type { using type = integer_format_info ; }; template<> struct enum_to_fmt_type { using type = floating_format_info ; }; template<> struct enum_to_fmt_type { using type = string_format_info ; }; template<> struct enum_to_fmt_type { using type = offset_datetime_format_info; }; template<> struct enum_to_fmt_type { using type = local_datetime_format_info ; }; template<> struct enum_to_fmt_type { using type = local_date_format_info ; }; template<> struct enum_to_fmt_type { using type = local_time_format_info ; }; template<> struct enum_to_fmt_type { using type = array_format_info ; }; template<> struct enum_to_fmt_type { using type = table_format_info ; }; template using enum_to_fmt_type_t = typename enum_to_fmt_type::type; template struct is_exact_toml_type0 : cxx::disjunction< std::is_same, std::is_same, std::is_same, std::is_same, std::is_same, std::is_same, std::is_same, std::is_same, std::is_same, std::is_same >{}; template struct is_exact_toml_type: is_exact_toml_type0, V> {}; template struct is_not_toml_type : cxx::negation> {}; } // namespace detail } // TOML11_INLINE_VERSION_NAMESPACE } // namespace toml #endif // TOML11_VALUE_T_FWD_HPP