You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
}() ...);// expected-error {{pack expansion does not contain any unexpanded parameter packs}}
12
11
13
-
auto L = [x = f([&a(t)]()->decltype(auto) { return a; }()...)]() { return x; };
12
+
auto L = [x = f([&a(t)]()->decltype(auto) { return a; }()...)]() { return x; };// expected-error {{pack expansion does not contain any unexpanded parameter packs}} expected-error {{use of undeclared identifier 'x'}} expected-error {{invalid initializer type for lambda capture}}
o = f([&a(t)](T& ... t)->decltype(auto) { return a; }(t...)...)](T& ... s) { // expected-error {{pack expansion does not contain any unexpanded parameter packs}} expected-error {{invalid initializer type for lambda capture}}
26
+
fv([&a(t)]()->decltype(auto) {
28
27
return a;
29
-
}() ...);
28
+
}() ...);// expected-error {{pack expansion does not contain any unexpanded parameter packs}}
30
29
};
31
30
32
31
}
33
32
34
-
voidh(int i, char c) { g(i, c); }// expected-note {{requested here}}
33
+
voidh(int i, char c) { g(i, c); }
35
34
}
36
35
37
36
namespaceodr_use_within_init_capture {
@@ -51,7 +50,7 @@ int test() {
51
50
{ // should not capture
52
51
constint x = 10;
53
52
auto L = [&z = x](int a) {
54
-
return a;;
53
+
return a;
55
54
};
56
55
57
56
}
@@ -111,7 +110,7 @@ int test(T t = T{}) {
111
110
{ // should not capture
112
111
const T x = 10;
113
112
auto L = [&z = x](T a) {
114
-
return a;;
113
+
return a;
115
114
};
116
115
117
116
}
@@ -185,8 +184,7 @@ void h() {
185
184
}
186
185
187
186
intrun() {
188
-
f<int>();
189
-
h<int>();
187
+
return0;
190
188
}
191
189
192
190
}
@@ -208,7 +206,7 @@ void test(double weight) {
208
206
}
209
207
210
208
namespaceinit_capture_undeclared_identifier {
211
-
auto a = [x = y]{}; // expected-error{{use of undeclared identifier 'y'}}
209
+
auto a = [x = y]{}; // expected-error{{use of undeclared identifier 'y'}} expected-error{{invalid initializer type for lambda capture}}
212
210
213
211
int typo_foo; // expected-note 2 {{'typo_foo' declared here}}
214
212
auto b = [x = typo_boo]{}; // expected-error{{use of undeclared identifier 'typo_boo'; did you mean 'typo_foo'}}
0 commit comments