xref: /aosp_15_r20/external/clang/test/CXX/temp/temp.param/p7.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li 
3*67e74705SXin Li // A non-type template-parameter shall not be declared to have
4*67e74705SXin Li // floating point, class, or void type.
5*67e74705SXin Li struct A;
6*67e74705SXin Li 
7*67e74705SXin Li template<double d> class X; // expected-error{{cannot have type}}
8*67e74705SXin Li template<double* pd> class Y; //OK
9*67e74705SXin Li template<double& rd> class Z; //OK
10*67e74705SXin Li 
11*67e74705SXin Li template<A a> class X0; // expected-error{{cannot have type}}
12*67e74705SXin Li 
13*67e74705SXin Li typedef void VOID;
14*67e74705SXin Li template<VOID a> class X01; // expected-error{{cannot have type}}
15*67e74705SXin Li 
16