This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
794. Base-derived conversion in member type of pointer-to-member conversionSection: 7.3.13 [conv.mem] Status: NAD Submitter: CH Date: 2009-03-03Currently 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4