This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs won't allow constant expression as template argument of kind "pointer type"


> I want to use a constant expression as a template argument of 
> pointer type.  Here is a sample program which compiles with 
> g++ 2.8.1, but doesn't with egcs-2.91.66.

The code is ill-formed; you cannot use a null pointer constant as a
template argument. Please see 14.3.2, [temp.arg.nontype]/5 of ISO C++
for details.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]