Skip to content

[expr.assign] [expr.yield] Inconsistent grammar #9443

Backlog

Description

@Halalaluyafail3

The grammar for an assignment operator [expr.assign] and the grammar for a co_yield operator [expr.yield] are:

assignment-expression:
conditional-expression
yield-expression
throw-expression
logical-or-expression assignment-operator initializer-clause

yield-expression:
co_yield assignment-expression
co_yield braced-init-list

Would it make sense to update the grammar of yield-expression to refer to initializer-clause similar to what assignment-expression does? The grammar of initializer-clause [dcl.init.general] just allows both an assignment-expression and a braced-init-list:

initializer-clause:
assignment-expression
braced-init-list

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions