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-05-20


3190. Ambiguous lookup for type aliases in reflection

Section: 7.6.2.10  [expr.reflect]     Status: review     Submitter: Richard Smith     Date: 2026-05-06     Liaison: EWG

Consider:

  namespace A {
    using T = int;
  }
  namespace B {
    using T = int;
  }
  using namespace A;
  using namespace B;
  T t;                // #1, OK
  auto r = ^^T;       // #2, ???

While 6.1 [basic.pre] paragraph 8 clarifies that #1 is well-formed by considering the underlying type, the treatment of #2 is unclear.

Possible resolution (option 2) [SUPERSEDED]:

Change in 7.6.2.10 [expr.reflect] paragraph 5 as follows:

Proposed resolution (approved by CWG 2026-05-19):

Change in 7.6.2.10 [expr.reflect] paragraph 5 as follows:

CWG 2026-05-19

Seeking EWG's approval via paper issue #2795.