Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / g++.dg / cpp0x / pr39639.C
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin: PR c++/39639
3 // { dg-do compile }
4 // { dg-options "-std=c++0x" }
5 // { dg-prune-output "template argument 1 is invalid" }
6
7 template <class... Types>
8 struct S
9   : S<...Types>, // { dg-error "expected parameter pack before '...'" }
10     S<...Types...>, // { dg-error "expected parameter pack before '...'" }
11     S<...> // { dg-error "expected parameter pack before '...'" }
12 {
13   static int f () { return 1;}
14 };
15
16 int
17 main ()
18 {
19   return S<void>::f ();
20 }
21