1 // RUN: %clang_cc1 -std=c++2c -verify -fsyntax-only %s
3 template<typename
... T
>
5 T
...1; // expected-error{{expected member name or ';' after declaration specifiers}}
6 T
...[; // expected-error{{expected expression}} \
7 // expected-error{{expected ']'}} \
8 // expected-note {{to match this '['}} \
9 // expected-warning{{declaration does not declare anything}}
11 T
...[1; // expected-error{{expected ']'}} \
12 // expected-note {{to match this '['}} \
13 // expected-warning{{declaration does not declare anything}}
15 T
...[]; // expected-error{{expected expression}} \
16 // expected-warning{{declaration does not declare anything}}
19 decltype(v
...[1]) a
= v
...[1];
20 decltype(v
...[1]) b
= v
...[]; // expected-error{{expected expression}}
22 decltype(v
...[1]) c
= v
...[ ; // expected-error{{expected expression}}\
23 // expected-error{{expected ']'}} \
24 // expected-note {{to match this '['}}
29 template <typename
...>
32 template <typename
... T
>
33 requires
requires(T
...[0]) { {T
...[0](0)}; }
35 [[maybe_unused
]] T
...[1] base
= {};
41 const T
...[0] f(T
...[0] && p
) noexcept((T
...[0])0) {
42 T
...[0] (*test
)(const volatile T
...[0]**);
43 thread_local T
...[0] d
;
44 [[maybe_unused
]] T
...[0] a
= p
;
45 auto ptr
= new T
...[0](0);
48 typename T
...[1]::foo b
= 0;
52 [[maybe_unused
]] auto l
= []<T
...[0]>(T
...[0][1]) -> T
...[0]{return{};};
53 [[maybe_unused
]] auto _
= l
.template operator()<T
...[0]{}>({0});
55 operator T
...[0]() const{}
60 static inline int i
= 42;
69 template <typename
... T
>
70 requires( ); // expected-error {{expected expression}}
73 (*p
).~T
...[](); // expected-error {{use of undeclared identifier 'p'}}