This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10541: Is NULL a valid pointer-type template argument?
- From: Wolfgang Bangerth <bangerth at ices dot utexas dot edu>
- To: Gianni Mariani <gianni at mariani dot ws>
- Cc: gcc-bugs at gcc dot gnu dot org, <gcc-gnats at gcc dot gnu dot org>
- Date: Tue, 29 Apr 2003 12:22:51 -0500 (CDT)
- Subject: Re: c++/10541: Is NULL a valid pointer-type template argument?
> I remember reading a while back that C/C++ considers the value 0 to be a
> valid value for any pointer type. Hence 0 CAN BE of type char *.
Well, 0 is of type "signed int". It can be converted to any pointer type
implicitly. The question is whether the compiler is supposed to do
implicit conversions for template args. I don't think so.
> Other compilers seem to take this value.
icc doesn't, for example.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at ices dot utexas dot edu
www: http://www.ices.utexas.edu/~bangerth/