Closed
Description
If a pointer p whose static type is “pointer to class B” is pointing to an object of class D, derived from B, the dynamic type of the expression *p is “D”.
In normal, according to the pointer conversion, a static type of “pointer to class B” is pointing to the base class subobject B
rather than the complete object D
. The implication of the note would result in the misreading to [expr.unary.op] p1
the result is an lvalue referring to the object or function to which the expression points.
The note may be clear if we say
If a pointer p whose static type is “pointer to class B” is pointing to the base class
B
subobject of class D, derived from B, the dynamic type of the expression *p is “D”.
Metadata
Metadata
Assignees
Labels
No labels