Created on1998-10-13.00:00:00 last changed277 months ago
Proposed Resolution (10/00):
In 11.8.3 [class.access.base] paragraph 4, remove the followingfrom the second note:
If the memberm is accessible when named in the namingclass according to the rules below, the access tom isnonetheless ill-formed if the type ofp cannot beimplicitly converted to typeT (for example, ifT is aninaccessible base class ofp's class).
Add the following as a new paragraph 5 of11.8.3 [class.access.base]:
If a class member access operator, including animplicit "this->," is used to access a nonstaticdata member or nonstatic member function, thereference is ill-formed if the left operand(considered as a pointer in the "." operator case)cannot be implicitly converted to a pointer to thenaming class of the right operand. [Note: thisrequirement is in addition to the requirement that themember be accessible as named.]
In 11.8.3 [class.access.base] paragraph 4, fix a typographicalerror by adding the missing right parenthesis following the text
(including cases where an implicit "this->" is added
Add following the first sentence of7.6.1.3 [expr.call] paragraph 4:
If the function is a nonstatic member function, the"this" parameter of the function (_N4868_.11.4.3.2 [class.this]) shallbe initialized with a pointer to the object of thecall, converted as if by an explicit type conversion(7.6.3 [expr.cast]). [Note: there is no access checking onthis conversion; the access checking is done as part ofthe (possibly implicit) class member access operator.See 11.8.3 [class.access.base].]
7.6.1.5 [expr.ref] paragraph 4should makeit clear that when a nonstatic member is referenced in a memberselection operation, the type of the left operand is implicitly castto the naming class of the member. This allows for the detection ofaccess and ambiguity errors on that implicit cast.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
| 2000-11-18 00:00:00 | admin | set | status: ready -> dr |
| 2000-05-21 00:00:00 | admin | set | status: drafting -> ready |
| 1999-09-14 00:00:00 | admin | set | messages: +msg92 |
| 1999-09-14 00:00:00 | admin | set | status: open -> drafting |
| 1998-10-13 00:00:00 | admin | create | |