mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Slightly improved F.20 to highlight the note about const return values
This commit is contained in:
parent
a5a4d0b4a2
commit
f46ce437e0
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user