Created on 1998-12-15.00:00:00 last changed 197 months ago
[Moved to DR at 4/02 meeting.]
Proposed resolution (04/01):
Change the first sentence of 11.8.4 [class.friend] as follows:
A friend of a class is a function or class that isnot a member of the class but is allowedgiven permission to use the private and protected member names from the class.The name of a friend is not in the scope of the class, and the friend is not called with the member access operators (7.6.1.5 [expr.ref]) unless it is a member of another class.A class specifies its friends, if any, by way of friend declarations. Such declarations give special access rights to the friends, but they do not make the nominated friends members of the befriending class.
The definition of "friend" in 11.8.4 [class.friend] says:
A friend of a class is a function or class that is not a member of the class but is permitted to use the private and protected member names from the class. ...A nested class, i.e. INNER in the example below, is a member of class OUTER. The sentence above states that it cannot be a friend. I think this is a mistake.
class OUTER { class INNER; friend class INNER; class INNER {}; };
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: + msg680 |
2002-05-10 00:00:00 | admin | set | status: ready -> dr |
2001-11-09 00:00:00 | admin | set | status: review -> ready |
2001-05-20 00:00:00 | admin | set | status: ready -> review |
2000-05-21 00:00:00 | admin | set | messages: + msg312 |
2000-05-21 00:00:00 | admin | set | status: drafting -> ready |
2000-02-23 00:00:00 | admin | set | status: open -> drafting |
1998-12-15 00:00:00 | admin | create |