From c6262ea1a8e78ca25058b7b32ae85588b52e5cb3 Mon Sep 17 00:00:00 2001 From: al-mission-2016 Date: Thu, 9 Jul 2020 21:04:17 +0300 Subject: [PATCH] += structured bindings mentioning; -= '\n' (#1646) It worth to mention the *structured bindings* right in the *Reason* section. --- CppCoreGuidelines.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 72e1a75..623b097 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3076,8 +3076,7 @@ The argument against is prevents (very frequent) use of move semantics. ##### Reason A return value is self-documenting as an "output-only" value. -Note that C++ does have multiple return values, by convention of using a `tuple` (including `pair`), -possibly with the extra convenience of `tie` at the call site. +Note that C++ does have multiple return values, by convention of using a `tuple` (including `pair`), possibly with the extra convenience of `tie` or structured bindings (C++17) at the call site. Prefer using a named struct where there are semantics to the returned value. Otherwise, a nameless `tuple` is useful in generic code. ##### Example