From 745b148ba7d09d0b01e795f301e81a8782f723aa Mon Sep 17 00:00:00 2001 From: Andrew Pardoe Date: Mon, 15 Aug 2016 11:48:02 -0700 Subject: [PATCH] Merge PR #643 --- CppCoreGuidelines.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index bbbe4b8..a630b5c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2685,10 +2685,9 @@ With C++11 we can write this, putting the results directly in existing local var tie(iter, success) = myset.insert("Hello"); // normal return value if (success) do_something_with(iter); -With C++17 we should be able to use "structured bindinds" to declare and initialize the multiple variables: +With C++17 we should be able to use "structured bindings" to declare and initialize the multiple variables: - auto [iter, success] = myset.insert("Hello"); // C++17 structured binding - if (success) do_something_with(iter); + if (auto [ iter, success ] = myset.insert("Hello"); success) do_something_with(iter); ##### Exception