mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-12 15:50:07 +00:00
feat: support conversion between basic_values
This commit is contained in:
parent
6569c26e1b
commit
bda337b51f
11
toml/get.hpp
11
toml/get.hpp
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user