Skip to content

Commit

Permalink
the issue is about local, so limiting example to local
Browse files Browse the repository at this point in the history
  • Loading branch information
cubbimew authored Apr 10, 2024
1 parent 8188d5e commit e086dbd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions CppCoreGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -3936,10 +3936,7 @@ which can eliminate the move completely.

##### Example, good

// RVO: guaranteed move elision when a temporary is returned
S rvo() { return S{}; }

S nrvo()
S good()
{
S result;
// Named RVO: move elision at best, move construction at worst
Expand Down

0 comments on commit e086dbd

Please sign in to comment.