blob: b1ac71b88bda4c771878e3fa4fd30261e46f05e2 [file] [log] [blame]
Anders Carlsson0ceffb52009-06-13 02:08:00 +00001// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
2
3// Type parameters packs
4template <typename ...> struct TS1 {}; // expected-note{{template parameter is declared here}}
5template struct TS1<>;
6template struct TS1<int>;
7template struct TS1<int, int>;
8template struct TS1<int, 10>; // expected-error{{template argument for template type parameter must be a type}}
9
10template <typename, typename ...> struct TS2 {}; // expected-note{{template is declared here}}
11template struct TS2<>; // expected-error{{too few template arguments for class template 'TS2'}}
12template struct TS2<int>;
13template struct TS2<int, int>;
14
15template <typename = int, typename ...> struct TS3 {}; // expected-note{{template parameter is declared here}}
16template struct TS3<>; // expected-note{{previous explicit instantiation is here}}
Douglas Gregor89a5bea2009-10-15 22:53:21 +000017template struct TS3<int>; // expected-error{{duplicate explicit instantiation of 'TS3}}
Anders Carlsson0ceffb52009-06-13 02:08:00 +000018template struct TS3<int, int>;
19template struct TS3<10>; // expected-error{{template argument for template type parameter must be a type}}