[Bug c++/48582] Template non-type arguments doesn't accept null pointer constant value

gintensubaru at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Aug 25 20:21:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48582

--- Comment #1 from Takaya Saito <gintensubaru at gmail dot com> 2011-08-25 20:09:49 UTC ---
Current C++0x draft 14.3.2/5 says 0 is not a valid template-argument
for a non-type template-parameter of pointer type.

So, `f<0>();' is ill-formed, as current gcc rejects it.

But 14.3.2/5 says both `(void*)0' and `nullptr' are valid,
so the other codes should be accepted.



More information about the Gcc-bugs mailing list