diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C new file mode 100644 index 000000000..600b79868 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C @@ -0,0 +1,19 @@ +// { dg-do compile { target c++11 } } + +template<class T> class A { /* ... */ }; +template<class T, class U = T> class B { /* ... */ }; +template<class... Types> class C { /* ... */ }; + +template<template<class> class P> class X { /* ... */ }; +template<template<class...> class Q> class Y { /* ... */ }; + +X<A> xA; // okay +X<B> xB; // { dg-error "mismatch" "mismatch" } +// { dg-error "expected a template" "expected" { target *-*-* } 11 } +// { dg-error "invalid type" "invalid" { target *-*-* } 11 } +X<C> xC; // { dg-error "mismatch" "mismatch" } +// { dg-error "expected a template" "expected" { target *-*-* } 14 } +// { dg-error "invalid type" "invalid" { target *-*-* } 14 } +Y<A> yA; +Y<B> yB; +Y<C> yC; // okay |