Title
Incorrect example in partial specialization
Status
cd1
Section
13.7.6 [temp.spec.partial]
Submitter
Martin Sebor

Created on 2001-05-09.00:00:00 last changed 196 months ago

Messages

Date: 2002-04-15.00:00:00

[Moved to DR at 4/02 meeting.]

Date: 2001-10-15.00:00:00

Proposed Resolution (10/01):

Change class C to struct C in the example in 13.7.6.1 [temp.spec.partial.general] paragraph 6. The example becomes

    template<class T> struct A {
        struct C {
            template<class T2> struct B { };
        };
    };

    // partial specialization of A<T>::C::B<T2>
    template<class T> template<class T2>
        struct A<T>::C::B<T2*> { };

    A<short>::C::B<int*> absip; // uses partial specialization
Date: 2022-06-11.20:21:09

The example in 13.7.6.1 [temp.spec.partial.general] paragraph 6 is incorrect. It reads,

    template<class T> struct A {
        class C {
            template<class T2> struct B { };
        };
    };

    // partial specialization of A<T>::C::B<T2>
    template<class T> template<class T2>
        struct A<T>::C::B<T2*> { };

    A<short>::C::B<int*> absip; // uses partial specialization

Because C is a class rather than a struct, the use of the name B is inaccessible.

History
Date User Action Args
2008-10-05 00:00:00adminsetstatus: wp -> cd1
2003-04-25 00:00:00adminsetstatus: dr -> wp
2002-05-10 00:00:00adminsetmessages: + msg691
2002-05-10 00:00:00adminsetstatus: ready -> dr
2001-11-09 00:00:00adminsetmessages: + msg546
2001-11-09 00:00:00adminsetstatus: open -> ready
2001-05-09 00:00:00admincreate