Created on 2000-02-28.00:00:00 last changed 197 months ago
[Moved to DR at 10/01 meeting.]
Proposed resolution (04/01):
Modify the third bullet of the third change ("A member m is accessible...") in the resolution of issue 9 to read "public, private, or protected" instead of "private or protected."
Consider the following example:
class A { protected: static void f() {}; }; class B : A { public: using A::f; void g() { A::f(); } };
The standard says in 11.8.3 [class.access.base] paragraph 4 that the call to A::f is ill-formed:
A member m is accessible when named in class N if
- m as a member of N is public, or
- m as a member of N is private, and the reference occurs in a member or friend of class N, or
- m as a member of N is protected, and the reference occurs in a member or friend of class N, or in a member or friend of a class P derived from N, where m as a member of P is private or protected, or
- there exists a base class B of N that is accessible at the point of reference, and m is accessible when named in class B.
Here, m is A::f and N is A.
It seems clear to me that the third bullet should say "public, private or protected".
Steve Adamczyk:The words were written before using-declarations existed, and therefore didn't anticipate this case.
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | status: dr -> wp |
2002-05-10 00:00:00 | admin | set | messages: + msg679 |
2001-11-09 00:00:00 | admin | set | status: ready -> dr |
2001-05-20 00:00:00 | admin | set | messages: + msg477 |
2001-05-20 00:00:00 | admin | set | status: drafting -> ready |
2000-02-28 00:00:00 | admin | create |