This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


500. Access in base-specifiers of friend and nested classes

Section: 11.8.4  [class.friend]     Status: CD1     Submitter: Andreas Hommel     Date: 25 Jan 2005

[Voted into WP at the October, 2006 meeting.]

I don't know the reason for this distinction, but it seems to be surprising that Base::A is legal and D is illegal in this example:

    class D;
    class Base
        class A;
        class B;
        friend class D;
    class Base::B
    class Base::A : public Base::B  // OK because of issue 45
    class D : public Base::B        // illegal because of 11.4p4

Shouldn't this be consistent (either way)?

Notes from the April, 2005 meeting:

In discussing issue 372, the CWG decided that access in the base-specifiers of a class should be the same as for its members, and that resolution will apply to friend declarations, as well.

Proposed resolution (October, 2005):

This issue is resolved by the resolution of issue 372.