Douglas Gregor | 247baca | 2009-06-13 06:59:07 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -fsyntax-only -verify %s |
| 2 | |
| 3 | // A non-type template-parameter shall not be declared to have |
| 4 | // floating point, class, or void type. |
| 5 | struct A; |
| 6 | |
| 7 | template<double d> class X; // expected-error{{cannot have type}} |
| 8 | template<double* pd> class Y; //OK |
| 9 | template<double& rd> class Z; //OK |
| 10 | |
| 11 | template<A a> class X0; // expected-error{{cannot have type}} |
| 12 | |
| 13 | typedef void VOID; |
| 14 | template<VOID a> class X01; // expected-error{{cannot have type}} |
| 15 | |