blob: 509977121f4b0d605055ecf37a23f172528d308f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++0x
// Type parameters packs
template <typename ...> struct TS1 {}; // expected-note{{template parameter is declared here}}
template struct TS1<>;
template struct TS1<int>;
template struct TS1<int, int>;
template struct TS1<int, 10>; // expected-error{{template argument for template type parameter must be a type}}
template <typename, typename ...> struct TS2 {}; // expected-note{{template is declared here}}
template struct TS2<>; // expected-error{{too few template arguments for class template 'TS2'}}
template struct TS2<int>;
template struct TS2<int, int>;
template <typename = int, typename ...> struct TS3 {}; // expected-note{{template parameter is declared here}}
template struct TS3<>; // expected-note{{previous explicit instantiation is here}}
template struct TS3<int>; // expected-error{{duplicate explicit instantiation of 'TS3}}
template struct TS3<int, int>;
template struct TS3<10>; // expected-error{{template argument for template type parameter must be a type}}
|