blob: 5b6ab7d1552c211d85cab821408120b92dd1a5a5 [file] [log] [blame]
Daniel Dunbara45cf5b2009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Douglas Gregorf8f86832009-02-11 18:16:40 +00002
3template<typename T, int N = 2> struct X; // expected-note{{template is declared here}}
4
5X<int, 1> *x1;
6X<int> *x2;
7
Douglas Gregor7f741122009-02-25 19:37:18 +00008X<> *x3; // expected-error{{too few template arguments for class template 'X'}}
Douglas Gregorf8f86832009-02-11 18:16:40 +00009
10template<typename U = float, int M> struct X;
11
12X<> *x4;
Anders Carlssondd096d82009-06-05 02:12:32 +000013
Anders Carlsson03c9e872009-06-05 02:45:24 +000014template<typename T = int> struct Z { };
Anders Carlssondd096d82009-06-05 02:12:32 +000015template struct Z<>;