mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
refactor: move default value types to value.hpp
This commit is contained in:
@@ -31,11 +31,11 @@ using floating = double; // "float" is a keyward, cannot use it here.
|
|||||||
// - local_date
|
// - local_date
|
||||||
// - local_time
|
// - local_time
|
||||||
|
|
||||||
// default toml::value and default array/table
|
// default toml::value and default array/table. these are defined after defining
|
||||||
using value = basic_value<discard_comments, std::unordered_map, std::vector>;
|
// basic_value itself.
|
||||||
// TODO: consider to move these after including `value.hpp`
|
// using value = basic_value<discard_comments, std::unordered_map, std::vector>;
|
||||||
using array = std::vector<value>; // typename value::array_type;
|
// using array = typename value::array_type;
|
||||||
using table = std::unordered_map<key, value>; // typename value::table_type;
|
// using table = typename value::table_type;
|
||||||
|
|
||||||
enum class value_t : std::uint8_t
|
enum class value_t : std::uint8_t
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -960,6 +960,11 @@ class basic_value
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// default toml::value and default array/table.
|
||||||
|
using value = basic_value<discard_comments, std::unordered_map, std::vector>;
|
||||||
|
using array = typename value::array_type;
|
||||||
|
using table = typename value::table_type;
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template<typename C,
|
template<typename C,
|
||||||
|
|||||||
Reference in New Issue
Block a user