Skip to content

Commit c6262ea

Browse files
+= structured bindings mentioning; -= '\n' (isocpp#1646)
It worth to mention the *structured bindings* right in the *Reason* section.
1 parent 72fba35 commit c6262ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

CppCoreGuidelines.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3076,8 +3076,7 @@ The argument against is prevents (very frequent) use of move semantics.
30763076
##### Reason
30773077

30783078
A return value is self-documenting as an "output-only" value.
3079-
Note that C++ does have multiple return values, by convention of using a `tuple` (including `pair`),
3080-
possibly with the extra convenience of `tie` at the call site.
3079+
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.
30813080
Prefer using a named struct where there are semantics to the returned value. Otherwise, a nameless `tuple` is useful in generic code.
30823081

30833082
##### Example

0 commit comments

Comments
 (0)