2
0
mirror of https://github.com/boostorg/json.git synced 2026-01-19 04:12:14 +00:00

remove unnecessary code in value_to for variant

This commit is contained in:
Dmitry Arkhipov
2023-06-30 14:33:43 +03:00
parent 5bc9ebb8d2
commit bee57b4cb7

View File

@@ -873,14 +873,10 @@ tag_invoke(
using T = std::variant_alternative_t<I.value, Variant>;
auto attempt = try_value_to<T>(jv, ctx);
if( attempt )
if( attempt)
res.emplace(std::in_place_index_t<I>(), std::move(*attempt));
});
if( res.has_error() )
{
res = {system::in_place_error, ec};
}
return res;
}
#endif // BOOST_NO_CXX17_HDR_VARIANT