mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-21 14:18:08 +08:00
feat: support conversion between basic_values
This commit is contained in:
11
toml/get.hpp
11
toml/get.hpp
@@ -68,6 +68,17 @@ get(basic_value<C, M, V>&& v)
|
|||||||
return std::move(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
|
// integer convertible from toml::Integer
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user