Skip to content

Commit fa58b4f

Browse files
authored
Update init-capture.cpp
1 parent 9a57baf commit fa58b4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/CXX/temp/temp.decls/temp.variadic/init-capture.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ template<typename ...T> void f(T ...t) {
2222
// Not OK: can't expand 'x' outside its scope.
2323
weird((void)[&...x = t] {
2424
return &x; // expected-error {{unexpanded parameter pack 'x'}}
25-
}... // expected-error {{does not contain any unexpanded}}
25+
}... // expected-error {{pack expansion does not contain any unexpanded parameter packs}}
2626
);
2727

2828
// OK, capture only one 'slice' of 'x'.
2929
weird((void)[&x = t] {
3030
return &x;
31-
}...
31+
}... // expected-error {{pack expansion does not contain any unexpanded parameter packs}}
3232
);
3333

3434
// 'x' is not expanded by the outer '...', but 'T' is.
3535
weird((void)[&... x = t] {
3636
return T() + &x; // expected-error {{unexpanded parameter pack 'x'}}
37-
}... // expected-error {{does not contain any unexpanded}}
37+
}... // expected-error {{pack expansion does not contain any unexpanded parameter packs}}
3838
);
3939
}
4040

@@ -43,7 +43,7 @@ static_assert(x<1,2,3>([](int a, int b, int c) { return 100 * a + 10 * b + c; })
4343
static_assert(x<1,2,3>([](int a, int b, int c) { return 100 * a + 10 * b + c; }) == 124); // expected-error {{failed}} \
4444
// expected-note {{evaluates to '123 == 124'}}
4545

46-
template<int ...a> constexpr auto y = [z = a...] (auto F) { return F(z...); }; // expected-error {{must appear before the name of the capture}}
46+
template<int ...a> constexpr auto y = [z = a...] (auto F) { return F(z...); }; // expected-error {{ellipsis in pack init-capture must appear before the name of the capture}}
4747
static_assert(y<1,2,3>([](int a, int b, int c) { return 100 * a + 10 * b + c; }) == 123);
4848
static_assert(y<1,2,3>([](int a, int b, int c) { return 100 * a + 10 * b + c; }) == 124); // expected-error {{failed}} \
4949
// expected-note {{evaluates to '123 == 124'}}

0 commit comments

Comments
 (0)