Skip to content

Commit bee57b4

Browse files
committed
remove unnecessary code in value_to for variant
1 parent 5bc9ebb commit bee57b4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

include/boost/json/detail/value_to.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -873,14 +873,10 @@ tag_invoke(
873873

874874
using T = std::variant_alternative_t<I.value, Variant>;
875875
auto attempt = try_value_to<T>(jv, ctx);
876-
if( attempt )
876+
if( attempt)
877877
res.emplace(std::in_place_index_t<I>(), std::move(*attempt));
878878
});
879879

880-
if( res.has_error() )
881-
{
882-
res = {system::in_place_error, ec};
883-
}
884880
return res;
885881
}
886882
#endif // BOOST_NO_CXX17_HDR_VARIANT

0 commit comments

Comments
 (0)