Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dissolve [over.oper] #3957

Copy link
Copy link
Open
Open
Copy link
@jensmaurer

Description

@jensmaurer
Issue body actions

The subclause on operator overloading should be integrated into the sections where it belongs.

Restrictions on declaring operator functions (e.g. no default arguments) should be moved to [dcl.fct], where other restrictions on function declarations are located. We might want to split up [dcl.fct] into "function types", "function declarations", "operator functions" or so.

The actual expression rewrite (where e.g. @ cast_expression is turned into a call to cast-expression.operator@) should go into [expr.compound], near the description of the actual operator syntax. Some additional grouping might be advisable for a compact representation. For example, [expr.mul] through [expr.log.or] should be grouped under "Binary expressions".

[over.built] should also go under [expr].

This makes [expr] a lot more self-contained and clearly attaches the grammar presentation there to the complete semantics, in lieu of the hand-wavy note in [expr.pre] p2 pointing to [over.oper]. Currently, you match the grammar in [expr.compound], then do overload resolution as explained in [over.oper] (without pervasive cross-references), then you jump back to [expr.compound] for the built-in meaning, hitting seemingly out-of-place gems such as [expr.sub] p4 "A braced-init-list shall not be used with the built-in subscript operator."

Metadata

Metadata

Assignees

No one assigned

    Labels

    decision-requiredA decision of the editorial group (or the Project Editor) is required.A decision of the editorial group (or the Project Editor) is required.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.