Skip to content

[expr.unary.op] does not handle non-lvalue qualified-ids #2919

Closed
@jensmaurer

Description

@jensmaurer

[expr.unary.op] p3 does not properly handle a case like this:

enum E { e };
int x = &E::e, 0;

&E::e is a qualified-id, so the "shall" conditions are satisfied, yet &E::e is obviously nonsense.
Suggestion: Drop the initial "shall" sentence, make the regular pointer case dependent on getting an lvalue, and add a trailing "Otherwise, the program is ill-formed."

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @jensmaurer

    Issue actions

      [expr.unary.op] does not handle non-lvalue qualified-ids · Issue #2919 · cplusplus/draft