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]
Other format: [Raw text]

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/



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