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

2024-10-26


2607. Visibility of enumerator names

Section: 10.2  [module.interface]     Status: drafting     Submitter: Richard Smith     Date: 2022-06-28

Consider:

  // module interface unit
  export module M;
  export enum E : int;
  enum E : int { e };

  // other translation unit
  import M;
  auto a = E::e;  // #1: OK?
  auto b = e;     // #2: OK?

It is unclear whether the enumerator name e is or ought to be visible in the other translation unit.

See also issues 2588 (friend declarations) and 2480.

CWG 2022-11-10

See 10.2 [module.interface] paragraph 7.