Skip to content

Commit 745b148

Browse files
author
Andrew Pardoe
committed
Merge PR #643
1 parent 76de02a commit 745b148

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,10 +2685,9 @@ With C++11 we can write this, putting the results directly in existing local var
26852685
tie(iter, success) = myset.insert("Hello"); // normal return value
26862686
if (success) do_something_with(iter);
26872687

2688-
With C++17 we should be able to use "structured bindinds" to declare and initialize the multiple variables:
2688+
With C++17 we should be able to use "structured bindings" to declare and initialize the multiple variables:
26892689

2690-
auto [iter, success] = myset.insert("Hello"); // C++17 structured binding
2691-
if (success) do_something_with(iter);
2690+
if (auto [ iter, success ] = myset.insert("Hello"); success) do_something_with(iter);
26922691

26932692
##### Exception
26942693

0 commit comments

Comments
 (0)