summaryrefslogtreecommitdiffstats
path: root/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/temp/temp.decls/temp.variadic/p5.cpp')
-rw-r--r--test/CXX/temp/temp.decls/temp.variadic/p5.cpp12
1 files changed, 12 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 9453798..3681d77 100644
--- a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
+++ b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
@@ -165,6 +165,7 @@ template<typename T, typename... Types>
struct alignas(Types) TestUnexpandedDecls : T{ // expected-error{{expression contains unexpanded parameter pack 'Types'}}
void member_function(Types); // expected-error{{declaration type contains unexpanded parameter pack 'Types'}}
void member_function () throw(Types); // expected-error{{exception type contains unexpanded parameter pack 'Types'}}
+ void member_function2() noexcept(Types()); // expected-error{{expression contains unexpanded parameter pack 'Types'}}
operator Types() const; // expected-error{{declaration type contains unexpanded parameter pack 'Types'}}
Types data_member; // expected-error{{data member type contains unexpanded parameter pack 'Types'}}
static Types static_data_member; // expected-error{{declaration type contains unexpanded parameter pack 'Types'}}
@@ -410,3 +411,14 @@ namespace WorkingPaperExample {
f(h(args ...) + args ...);
}
}
+
+namespace PR16303 {
+ template<int> struct A { A(int); };
+ template<int...N> struct B {
+ template<int...M> struct C : A<N>... {
+ C() : A<N>(M)... {} // expected-error{{pack expansion contains parameter packs 'N' and 'M' that have different lengths (2 vs. 3)}} expected-error{{pack expansion contains parameter packs 'N' and 'M' that have different lengths (4 vs. 3)}}
+ };
+ };
+ 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}}
+}
OpenPOWER on IntegriCloud