This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


2127. Partial specialization and nullptr

Section: 13.7.6  [temp.spec.partial]     Status: drafting     Submitter: Faisal Vali     Date: 2015-05-18

An example like the following would seem to be plausible:

  template<class T, T*> struct X { };
  // We want to partially specialize for all nullptrs...
  template<class T> struct X<T, nullptr> { ... }; // NOT OK

This is disallowed by the rule in bullet 9.2 of 13.7.6.1 [temp.spec.partial.general]:

(See also issues 1315, 1647, and 2033.)