Created on 2009-03-03.00:00:00 last changed 24 months ago
Currently both implicit (7.3.13 [conv.mem]) and explicit (7.6.1.9 [expr.static.cast]) conversions of pointers to members permit only cases in which the type of the member is the same except for cv-qualification. It would seem reasonable to allow conversions in which one member type is a base class of the other. For example:
struct B { }; struct D: B { }; struct X { D d; }; struct Y: X { }; B Y::* pm = &X::d; // Currently ill-formed: type of d is D, not B
(See also issue 170.)
EWG 2022-11-11
The change is plausible, but needs a paper to EWG.
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-20 07:54:16 | admin | set | status: extension -> nad |
2009-11-08 00:00:00 | admin | set | status: open -> extension |
2009-03-03 00:00:00 | admin | create |