Skip to content

Commit 187bab3

Browse files
committed
Merge 2017-07 CWG Motion 6
2 parents 559c744 + cb2218f commit 187bab3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/expressions.tex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,10 @@
999999
by \tcode{\&}. If a \grammarterm{lambda-capture} includes a
10001000
\grammarterm{capture-default} that is \tcode{=}, each
10011001
\grammarterm{simple-capture} of that \grammarterm{lambda-capture} shall
1002-
be of the form ``\tcode{\&} \grammarterm{identifier}'' or ``\tcode{* this}''.
1002+
be of the form
1003+
``\tcode{\&} \grammarterm{identifier}'',
1004+
``\tcode{this}'',
1005+
or ``\tcode{* this}''.
10031006
\begin{note} The form \tcode{[\&,this]} is redundant but accepted
10041007
for compatibility with ISO \CppXIV. \end{note}
10051008
Ignoring appearances in
@@ -1011,9 +1014,10 @@
10111014
struct S2 { void f(int i); };
10121015
void S2::f(int i) {
10131016
[&, i]{ }; // OK
1017+
[&, this, i]{ }; // OK, equivalent to \tcode{[\&, i]}
10141018
[&, &i]{ }; // error: \tcode{i} preceded by \tcode{\&} when \tcode{\&} is the default
10151019
[=, *this]{ }; // OK
1016-
[=, this]{ }; // error: \tcode{this} when \tcode{=} is the default
1020+
[=, this]{ }; // OK, equivalent to \tcode{[=]}
10171021
[i, i]{ }; // error: \tcode{i} repeated
10181022
[this, *this]{ }; // error: \tcode{this} appears twice
10191023
}

0 commit comments

Comments
 (0)