c++/10541: Is NULL a valid pointer-type template argument?
Wolfgang Bangerth
bangerth@ices.utexas.edu
Tue Apr 29 17:26:00 GMT 2003
The following reply was made to PR c++/10541; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
To: Gianni Mariani <gianni@mariani.ws>
Cc: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/10541: Is NULL a valid pointer-type template argument?
Date: Tue, 29 Apr 2003 12:22:51 -0500 (CDT)
> 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@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/
More information about the Gcc-prs
mailing list