Skip to content

[basic.def.odr] Avoid double-negation when defining whether a function is named by an expression #7900

Open
@zygoloid

Description

@zygoloid

[basic.def.odr]/4.1 is currently relatively hard to parse due to the double-negation "unless [....] is not":

A function is named by an expression or conversion if it is the selected member of an overload set ([basic.lookup], [over.match], [over.over]) in an overload resolution performed as part of forming that expression or conversion, unless it is a pure virtual function and either the expression is not an id-expression naming the function with an explicitly qualified name or the expression forms a pointer to member ([expr.unary.op]).

Perhaps it could be rephrased to avoid this:

A function is named by an expression or conversion if it is the selected member of an overload set ([basic.lookup], [over.match], [over.over]) in an overload resolution performed as part of forming that expression or conversion, and either unless it is not a pure virtual function or and either the expression is not an id-expression naming the function with an explicitly qualified name or that does not form the expression forms a pointer to member ([expr.unary.op]).

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