fix incorrect reason for F.48

This commit is contained in:
Eisenwave 2023-06-24 00:08:09 +02:00 committed by GitHub
parent db079ab301
commit e376433300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3922,7 +3922,9 @@ value) of any assignment operator.
##### Reason
With guaranteed copy elision, it is now almost always a pessimization to expressly use `std::move` in a return statement.
Returning a local variable implicitly moves it anyway.
An explicit `std::move` is also a pessimization, because it prevents Named Return Value Optimization (NRVO),
which can eliminate the move completely.
##### Example, bad