xref: /minix3/external/bsd/llvm/dist/clang/test/CXX/temp/temp.param/p7.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 -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 
16