[tiny] In-class explicit specializations forbidden but not partial specializations
Faisal Vali

Created on 2012-10-27.00:00:00, last changed 2014-01-16.19:25:10.


Date: 2014-01-16.19:25:10

I had submitted a DR (727) about this in October 2008 - and it was classified as an extension - I wonder if Spertus' DR (1077) that was also classified as an extension should be considered along with this one. 14.7.3 [temp.expl.spec] paragraph 2 requires that explicit specializations of member templates be declared in namespace scope, not in the class definition. This restriction does not apply to partial specializations of member templates; that is,

    struct A {
      template<class T> struct B;
      template <class T> struct B<T*> { }; // well-formed
      template <> struct B<int*> { }; // ill-formed
There does not seem to be a good reason for this inconsistency.

Bristol 2013: Defer to Core, with the guidance to reopen the DR mentioned and remove the restriction.

Before this can go over to Core, it needs wording. It's likely that it needs a paper. Vali should create either the wording or the paper.

Date User Action Args
2014-01-16 19:25:10adminsetstatus: ready -> open
2013-04-28 20:20:29adminsetstatus: open -> ready
2012-10-27 00:00:00admincreate