This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Accepted as a DR at the June, 2023 meeting.]
The descriptions of explicit(7.6.1.9 [expr.static.cast] paragraph 9) andimplicit (7.3.13 [conv.mem] paragraph 2)pointer-to-member conversions differ in two significant ways:
(This situation cannot arise in an implicit pointer-to-memberconversion where the source value is something like&X::f,since you can only implicitly convert from pointer-to-base-memberto pointer-to-derived-member. However, if the source value isthe result of an explicit "up-cast," the target type of theconversion might still not contain the member referred to by thesource value.)
The first difference seems like an oversight. It is not clearwhether the latter difference is intentional or not.
(See alsoissue 794.)
CWG 2022-11-09
The second concern is NAD; implicit conversions allow chaining apointer-to-member conversion with a qualification conversion.
Proposed resolution (approved by CWG 2023-02-06):
Change in 7.3.13 [conv.mem] paragraph 2 as follows:
A prvalue of type “pointer to member of B of type cv T”,where B is a class type, can be converted to a prvalue of type“pointer to member of D of type cv T”, where D is acomplete class derived (11.7 [class.derived]) from B. If B is aninaccessible (11.8 [class.access]), ambiguous(6.5.2 [class.member.lookup]), or virtual (11.7.2 [class.mi])base class of D, or a base class of a virtual base class of D, aprogram that necessitates this conversion is ill-formed.If class D does not contain the original member and is not a base class of the class containing the original member, the behavior is undefined. Otherwise,Thethe result ofthe conversion refers to the same member as the pointer to memberbefore the conversion took place, but it refers to the base classmember as if it were a member of the derived class. The result refersto the member in D's instance of B. Since the result has type“pointer to member of D of type cv T”, indirection throughit with a D object is valid. The result is the same as if indirectingthrough the pointer to member of B with the B subobject of D. Thenull member pointer value is converted to the null member pointervalue of the destination type. [ Footnote: ... ]
Change in 7.6.1.9 [expr.static.cast] paragraph 13 as follows:
... If class B contains the original member, or is a baseorderivedclass of the class containing the original member, theresulting pointer to member points to the original member. ...