From f46ce437e0b083fa05f30dc8d90968922989ee2a Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 28 Jan 2021 11:36:40 -0800 Subject: [PATCH] Slightly improved F.20 to highlight the note about const return values --- CppCoreGuidelines.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 7442efd..5073c78 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1,6 +1,6 @@ # 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.