blob: eadea901c7fef2056e3a93a2b8130b5459c90a76 [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}}
17template struct TS3<int>; // expected-error{{duplicate explicit instantiation of 'TS3<>'}}
18template struct TS3<int, int>;
19template struct TS3<10>; // expected-error{{template argument for template type parameter must be a type}}