1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

Allow to use get with explicit constructor (#3079)

*  remove "fix" that caused #3077
This commit is contained in:
Niels Lohmann
2021-10-14 21:01:14 +02:00
committed by GitHub
parent 0e694b4060
commit ba046e4ea4
3 changed files with 36 additions and 2 deletions

View File

@ -20569,7 +20569,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept(
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
{
ValueType ret{};
auto ret = ValueType();
JSONSerializer<ValueType>::from_json(*this, ret);
return ret;
}