feat: add yet another constructor to value

to make implementation of parse_value easier
This commit is contained in:
ToruNiina
2019-04-17 23:43:42 +09:00
parent 1a7bf63622
commit c5b6ee6f81

View File

@@ -572,6 +572,14 @@ class value
return *this;
}
// for internal use ------------------------------------------------------
template<typename T, typename Container, typename std::enable_if<
detail::is_exact_toml_type<T>::value, std::nullptr_t>::type = nullptr>
value(std::pair<T, detail::region<Container>> parse_result)
: value(std::move(parse_result.first), std::move(parse_result.second))
{}
// type checking and casting ============================================
template<typename T>