Created on 2002-01-29.00:00:00 last changed 207 months ago
[Voted into WP at April 2003 meeting.]
Proposed Resolution (4/02):
Fix the example in 13.9.4 [temp.expl.spec] paragraph 18 to read:
  template<class T1> class A {
    template<class T2> class B {
      template<class T3> void mf1(T3);
      void mf2();
    };
  };
  template<> template<class X>
    class A<int>::B {
      template<class T> void mf1(T);
    };
  template<> template<> template<class T>
    void A<int>::B<double>::mf1(T t) { }
  template<class Y> template<>
    void A<Y>::B<double>::mf2() { } // ill-formed; B<double> is specialized but
                                    // its enclosing class template A is not
		The examples corrected by issue 24 are still wrong in one case.
In item #4 (a correction to the example in paragraph 18), the proposed resolution is:
  template<class T1> class A {
    template<class T2> class B {
      template<class T3> void mf1(T3);
        void mf2();
      };
  };
  template<> template<class X>
    class A<int>::B { };
  template<> template<> template<class T>
    void A<int>::B<double>::mf1(T t) { }
  template<class Y> template<>
    void A<Y>::B<double>::mf2() { } // ill-formed; B<double> is specialized but
                                    // its enclosing class template A is not
The explicit specialization of member A<int>::B<double>::mf1 is ill-formed. The class template A<int>::B is explicitly specialized and contains no members, so any implicit specialization (such as A<int>::B<double>) would also contain no members.
| History | |||
|---|---|---|---|
| Date | User | Action | Args | 
| 2008-10-05 00:00:00 | admin | set | status: wp -> cd1 | 
| 2003-04-25 00:00:00 | admin | set | messages: + msg875 | 
| 2003-04-25 00:00:00 | admin | set | status: ready -> wp | 
| 2002-11-08 00:00:00 | admin | set | status: drafting -> ready | 
| 2002-05-10 00:00:00 | admin | set | messages: + msg645 | 
| 2002-05-10 00:00:00 | admin | set | status: open -> drafting | 
| 2002-01-29 00:00:00 | admin | create | |