blob: 509977121f4b0d605055ecf37a23f172528d308f [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
Anders Carlsson0ceffb52009-06-13 02:08:00 +00002
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}}