Skip to content

Don't pessimize moves#113

Merged
michalovits merged 1 commit into
bloomberg:mainfrom
flamble:fix-pessimized-move
May 22, 2026
Merged

Don't pessimize moves#113
michalovits merged 1 commit into
bloomberg:mainfrom
flamble:fix-pessimized-move

Conversation

@flamble
Copy link
Copy Markdown
Contributor

@flamble flamble commented May 21, 2026

Removing explicit std::move on a local variable in a return statement allows the compiler to apply Named Return Value Optimization (NRVO). The explicit std::move actually prevents copy elision.

Removing explicit std::move on a local variable in a return statement
allows the compiler to apply Named Return Value Optimization (NRVO).
The explicit std::move actually prevents copy elision.
@flamble flamble force-pushed the fix-pessimized-move branch from 704c4de to e65b2f3 Compare May 22, 2026 11:27
@michalovits michalovits merged commit c868fe9 into bloomberg:main May 22, 2026
3 checks passed
@flamble flamble deleted the fix-pessimized-move branch May 22, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants