blob: 57a6cdb9454225426336f68caa9918d9e85305e7 [file] [log] [blame]
Douglas Gregor5d290d52009-02-10 17:43:50 +00001// RUN: clang -fsyntax-only -verify %s
2
3class X;
4
5// C++ [temp.param]p4
6typedef int INT;
7enum E { enum1, enum2 };
8template<int N> struct A1;
9template<INT N, INT M> struct A2;
10template<enum E x, E y> struct A3;
11template<int &X> struct A4;
12template<int *Ptr> struct A5;
13template<int (&f)(int, int)> struct A6;
14template<int (*fp)(float, double)> struct A7;
15template<int X::*pm> struct A8;
16template<float (X::*pmf)(float, int)> struct A9;
17template<typename T, T x> struct A10;
18
19template<float f> struct A11; // expected-error{{a non-type template parameter cannot have type 'float'}}
20
21
22// C++ [temp.param]p8
23template<int X[10]> struct A5;
24template<int f(float, double)> struct A7;
25
26
27