Skip to content

CWG2548 [expr.add] and array prvalues #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
languagelawyer opened this issue Mar 8, 2022 · 1 comment
Closed

CWG2548 [expr.add] and array prvalues #18

languagelawyer opened this issue Mar 8, 2022 · 1 comment

Comments

@languagelawyer
Copy link

languagelawyer commented Mar 8, 2022

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

@jensmaurer
Copy link
Member

CWG2548

@jensmaurer jensmaurer changed the title [expr.add] and array prvalues CWG2548 [expr.add] and array prvalues Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants