https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124173

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Looking at C++14, [temp.arg.nontype]/1 says
A template-argument for a non-type template-parameter shall be a converted
constant expression of the type of the template-parameter.
Looking at C++1, [temp.arg.nontype]/1 says there
A template-argument for a non-type, non-template template-parameter shall be
one of:
— for a non-type template-parameter of integral or enumeration type, a
converted constant expression of the type of the template-parameter; or
...
— a constant expression that evaluates to a null pointer value; or
So, I think at least for C++14 NULLPTR_TYPE_P should be added next to
integral/enumeral check, for C++11 dunno what the actual difference between
converted constant expression vs. constant expression.

Reply via email to