diff options
Diffstat (limited to 'test/CXX/temp/temp.decls/temp.variadic/p5.cpp')
-rw-r--r-- | test/CXX/temp/temp.decls/temp.variadic/p5.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp index dae686566691..4f9368f6b605 100644 --- a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp +++ b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp @@ -354,6 +354,7 @@ void test_unexpanded_exprs(Types ...values) { for (auto t : values) { } // expected-error{{expression contains unexpanded parameter pack 'values'}} switch (values) { } // expected-error{{expression contains unexpanded parameter pack 'values'}} + switch (0) { case 0: case values: ; } // expected-error{{expression contains unexpanded parameter pack 'values'}} do { } while (values); // expected-error{{expression contains unexpanded parameter pack 'values'}} @@ -422,3 +423,17 @@ namespace PR16303 { B<1,2>::C<4,5,6> c1; // expected-note{{in instantiation of}} B<1,2,3,4>::C<4,5,6> c2; // expected-note{{in instantiation of}} } + +namespace PR21289 { + template<int> using T = int; + template<typename> struct S { static const int value = 0; }; + template<typename> const int vt = 0; // expected-warning {{extension}} + int f(...); + template<int ...Ns> void g() { + f(T<Ns>()...); + f(S<T<Ns>>::value...); + f(vt<T<Ns>>...); + } + template void g<>(); + template void g<1, 2, 3>(); +} |