This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/48582] Template non-type arguments doesn't accept null pointer constant value
- From: "gintensubaru at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Aug 2011 20:09:49 +0000
- Subject: [Bug c++/48582] Template non-type arguments doesn't accept null pointer constant value
- Auto-submitted: auto-generated
- References: <bug-48582-4@http.gcc.gnu.org/bugzilla/>
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.