refactor: move default value types to value.hpp

This commit is contained in:
ToruNiina 2019-06-01 23:58:17 +09:00
parent 5c5d8b686a
commit f9b5166c09
2 changed files with 10 additions and 5 deletions

View File

@ -31,11 +31,11 @@ using floating = double; // "float" is a keyward, cannot use it here.
// - local_date
// - local_time
// default toml::value and default array/table
using value = basic_value<discard_comments, std::unordered_map, std::vector>;
// TODO: consider to move these after including `value.hpp`
using array = std::vector<value>; // typename value::array_type;
using table = std::unordered_map<key, value>; // typename value::table_type;
// default toml::value and default array/table. these are defined after defining
// basic_value itself.
// using value = basic_value<discard_comments, std::unordered_map, std::vector>;
// using array = typename value::array_type;
// using table = typename value::table_type;
enum class value_t : std::uint8_t
{

View File

@ -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
{
template<typename C,