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


3137. Composite pointer type with qualification and pointer-to-member conversions

Section: 7.2.2  [expr.type]     Status: open     Submitter: Brian Bi     Date: 2025-11-25

(From submission #822.)

There is a specification gap for "composite pointer type" in the case where both a qualification conversion and a pointer-to-member conversion is needed to achieve a common type. For example:

  using P = int*;
  using CP = const int* const;
  struct B {
    P a;
  };
  struct D : B {};

  constexpr P (B::*bnc) = &B::a;
  constexpr CP (B::*bc) = &B::a;
  constexpr P (D::*dnc) = &B::a;
  constexpr CP (D::*dc) = dnc;     // work around GCC bug

  static_assert(bnc == dc);
  static_assert(bc == dnc);        // EDG rejects

Possible resolution:

Change in 7.2.2 [expr.type] bullet 3.7 and 3.8 as follows: