OSDN Git Service

PR c++/51107
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / variadic-ex14.C
1 // { dg-options "-std=gnu++0x" }
2
3 template<class T> class A { /* ... */ };
4 template<class T, class U = T> class B { /* ... */ };
5 template<class... Types> class C { /* ... */ };
6
7 template<template<class> class P> class X { /* ... */ };
8 template<template<class...> class Q> class Y { /* ... */ };
9
10 X<A> xA; // okay
11 X<B> xB; // { dg-error "mismatch" }
12 // { dg-error "expected a template" "" { target *-*-* } 11 }
13 // { dg-error "invalid type" "" { target *-*-* } 11 }
14 X<C> xC; // { dg-error "mismatch" }
15 // { dg-error "expected a template" "" { target *-*-* } 14 }
16 // { dg-error "invalid type" "" { target *-*-* } 14 }
17 Y<A> yA;
18 Y<B> yB;
19 Y<C> yC; // okay