Skip to content

Commit 810adb4

Browse files
committed
Use a move asssignment instead of a copy assignment when returning a result
via detail::make_parse_result(). Supercedes PR #247.
1 parent 5788fb6 commit 810adb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/parser/parser.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ namespace boost { namespace parser {
15481548
{
15491549
std::optional<T> retval;
15501550
if (success)
1551-
retval = x;
1551+
retval = std::move(x);
15521552
return retval;
15531553
}
15541554

0 commit comments

Comments
 (0)