Slightly improved F.20 to highlight the note about const return values

This commit is contained in:
Herb Sutter 2021-01-28 11:36:40 -08:00
parent a5a4d0b4a2
commit f46ce437e0

View File

@ -1,6 +1,6 @@
# <a name="main"></a>C++ Core Guidelines
August 3, 2020
January 28, 2021
Editors:
@ -3064,6 +3064,8 @@ If you have multiple values to return, [use a tuple](#Rf-out-multi) or similar m
A `struct` of many (individually cheap-to-move) elements might be in aggregate expensive to move.
##### Note
It is not recommended to return a `const` value.
Such older advice is now obsolete; it does not add value, and it interferes with move semantics.