mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03:00
Slightly improved F.20 to highlight the note about const return values
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# <a name="main"></a>C++ Core Guidelines
|
# <a name="main"></a>C++ Core Guidelines
|
||||||
|
|
||||||
August 3, 2020
|
January 28, 2021
|
||||||
|
|
||||||
|
|
||||||
Editors:
|
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.
|
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.
|
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.
|
Such older advice is now obsolete; it does not add value, and it interferes with move semantics.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user