mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
🚑 add specialization of get_to #2175
This commit is contained in:
@ -18949,6 +18949,18 @@ class basic_json
|
||||
return v;
|
||||
}
|
||||
|
||||
// specialization to allow to call get_to with a basic_json value
|
||||
// see https://github.com/nlohmann/json/issues/2175
|
||||
template<typename ValueType,
|
||||
detail::enable_if_t <
|
||||
detail::is_basic_json<ValueType>::value,
|
||||
int> = 0>
|
||||
ValueType & get_to(ValueType& v) const
|
||||
{
|
||||
v = *this;
|
||||
return v;
|
||||
}
|
||||
|
||||
template <
|
||||
typename T, std::size_t N,
|
||||
typename Array = T (&)[N],
|
||||
|
Reference in New Issue
Block a user