Incorrect example for member access expression with using enum
in [enum.udecl] CWG2959
#7368
Labels
cwg
Issue must be reviewed by CWG.
not-editorial
Issue is not deemed editorial; the editorial issue is kept open for tracking.
[enum.udecl]/2 contains this example:
While it is correct that name lookup for
orange
ins.orange
will findfruit::orange
, the member access expression itself is not ok, because [expr.ref]/7.5 only specifies its behavior for member enumerators.using enum
however doesn't make the enumerator a member enumerator ([class.mem.general]/3.5, [class.mem.general]/4).Currently [expr.ref] simply lacks a statement about the behavior in this situation, but CWG issue 2902's proposed resolution would clarify that it is ill-formed.
From issue reported to Clang here.
The text was updated successfully, but these errors were encountered: