Merge 249493264a into 0457de21cf
This commit is contained in:
commit
642cef9c7d
@ -1798,6 +1798,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
ValueType & get_to(ValueType& v) const noexcept(noexcept(
|
ValueType & get_to(ValueType& v) const noexcept(noexcept(
|
||||||
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))
|
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))
|
||||||
{
|
{
|
||||||
|
static_assert(!std::is_const<ValueType>::value, "Cannot deserialize into constant fields");
|
||||||
JSONSerializer<ValueType>::from_json(*this, v);
|
JSONSerializer<ValueType>::from_json(*this, v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21101,6 +21101,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
ValueType & get_to(ValueType& v) const noexcept(noexcept(
|
ValueType & get_to(ValueType& v) const noexcept(noexcept(
|
||||||
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))
|
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))
|
||||||
{
|
{
|
||||||
|
static_assert(!std::is_const<ValueType>::value, "Cannot deserialize into constant fields");
|
||||||
JSONSerializer<ValueType>::from_json(*this, v);
|
JSONSerializer<ValueType>::from_json(*this, v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user