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_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
{ {

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