This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2026-04-17


3166. Protected access rule for a pointer-to-member from a reflect-expression

Section: 7.6.2.10  [expr.reflect]     Status: open     Submitter: Brian Bi     Date: 2026-02-17

(From submission #852.)

Consider:

  class A {
  protected:
    void f();
  };

  struct B : A {
    static constexpr auto r = ^^A::f;
  };

Do the restrictions in 11.8.5 [class.protected] on the use of expression &A::f apply to the reflect-expression?

Suggested resolution:

Change in 7.6.2.10 [expr.reflect] bullet 7.2 as follows:

A reflect-expression R of the form ^^id-expression represents an entity determined as follows: