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 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp index 0f409e7..6955219 100644 --- a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp +++ b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp @@ -160,9 +160,9 @@ struct TestUnexpandedTTP { }; // Test for unexpanded parameter packs in declarations. -// FIXME: Attributes? template<typename T, typename... Types> -struct TestUnexpandedDecls : T{ +// FIXME: this should test that the diagnostic reads "type contains..." +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{{declaration type contains unexpanded parameter pack 'Types'}} operator Types() const; // expected-error{{declaration type contains unexpanded parameter pack 'Types'}} @@ -185,10 +185,16 @@ struct TestUnexpandedDecls : T{ void test_initializers() { T copy_init = static_cast<Types>(0); // expected-error{{initializer contains unexpanded parameter pack 'Types'}} - T direct_init(0, static_cast<Types>(0)); // expected-error{{expression contains unexpanded parameter pack 'Types'}} + T direct_init(0, static_cast<Types>(0)); // expected-error{{initializer contains unexpanded parameter pack 'Types'}} T list_init = { static_cast<Types>(0) }; // expected-error{{initializer contains unexpanded parameter pack 'Types'}} } + T in_class_member_init = static_cast<Types>(0); // expected-error{{initializer contains unexpanded parameter pack 'Types'}} + TestUnexpandedDecls() : + Types(static_cast<Types>(0)), // expected-error{{initializer contains unexpanded parameter pack 'Types'}} + Types(static_cast<Types>(0))..., + in_class_member_init(static_cast<Types>(0)) {} // expected-error{{initializer contains unexpanded parameter pack 'Types'}} + void default_function_args(T = static_cast<Types>(0)); // expected-error{{default argument contains unexpanded parameter pack 'Types'}} template<typename = Types*> // expected-error{{default argument contains unexpanded parameter pack 'Types'}} |