feat: support conversion between basic_values

This commit is contained in:
ToruNiina 2019-06-02 19:09:56 +09:00
parent 6569c26e1b
commit bda337b51f

View File

@ -68,6 +68,17 @@ get(basic_value<C, M, V>&& v)
return std::move(v);
}
// ============================================================================
// T == toml::basic_value<C2, M2, V2>; basic_value -> basic_value
template<typename T, typename C,
template<typename ...> class M, template<typename ...> class V>
inline enable_if_t<detail::is_basic_value<T>::value, T>
get(const basic_value<C, M, V>& v)
{
return T(v);
}
// ============================================================================
// integer convertible from toml::Integer