Title
Visibility of enumerator names
Status
open
Section
10.2 [module.interface]
Submitter
Richard Smith

Created on 2022-06-28.00:00:00 last changed 1 month ago

Messages

Date: 2022-07-01.16:50:42

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.

History
Date User Action Args
2022-06-28 00:00:00admincreate