Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4253517

Browse files
Mark a structured binding as C++17.
1 parent da133a0 commit 4253517

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎talk/morelanguage/stl.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
m["hello"] = 1; // inserts new key, def. constr. value
134134
m["hello"] = 2; // finds existing key
135135
auto [it, isNewKey] = m.insert({"hello", 0}); // no effect
136+
// ^ C++17: "Structured binding"
136137
int val = m["world"]; // inserts new key (val == 0)
137138
int val = m.at("monde"); // throws std::out_of_range
138139

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /