This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs won't allow constant expression as template argument of kind "pointer type"
- To: zooko at wildgoose dot tandu dot com
- Subject: Re: egcs won't allow constant expression as template argument of kind "pointer type"
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Fri, 2 Jul 1999 10:33:01 +0200
- CC: egcs-bugs at egcs dot cygnus dot com
- References: <m10x1ld-00000vC@wildgoose.tandu.com>
> 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