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]

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


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.


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