2
0
mirror of https://github.com/boostorg/parser.git synced 2026-02-21 03:12:08 +00:00

Move values into detail::assign

Code cleanup:
Most of the time, values are std::moved into detail::assign,
but not always. This patch makes usage more consistent to
always use std::move, except for ints, floats, and iterators.
This commit is contained in:
Andreas Buhr
2026-02-03 11:25:50 +01:00
committed by Zach Laine
parent 4706f57c8e
commit 316b4921a9

View File

@@ -3716,7 +3716,7 @@ namespace boost { namespace parser {
if constexpr (detail::is_struct_compatible_v<
Attribute,
result_t>) {
detail::assign(retval, temp_retval);
detail::assign(retval, std::move(temp_retval));
} else {
detail::assign(
retval,
@@ -5488,7 +5488,7 @@ namespace boost { namespace parser {
dont_assign);
if (success && !dont_assign) {
if constexpr (!detail::is_nope_v<decltype(attr)>)
detail::assign(retval, attr);
detail::assign(retval, std::move(attr));
}
}
@@ -5583,7 +5583,7 @@ namespace boost { namespace parser {
container<Attribute_> && container<attr_type>) {
detail::move_back(retval, attr, detail::gen_attrs(flags));
} else {
detail::assign(retval, attr);
detail::assign(retval, std::move(attr));
}
}
}