Skip to content

CWG2548 [expr.add] and array prvalues #18

Closed
@languagelawyer

Description

@languagelawyer

Full name of submitter (unless configured in github; will be published with the issue): Andrey Erokhin

Reference (section label): [expr.add]

Link to reflector thread (if any):

Issue description:
I've filed a Clang issue that it erroneously accepts

int main()
{
    using IA = int[];

    IA{ 1, 2, 3 } + 0;
}

but was asked to promote this to a CWG issue.
Current wording doesn't allow array prvalues as the binary + operands, neither there is wording requiring the array-to-pointer/temporary materialization/whatever conversions on such an operand.

Personally, I think such meaningless code should not become well-formed, thus

Suggested resolution: NAD

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