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

p2579r0 vs. https://eel.is/c++draft/basic.scope#block-2 CWG2838 #6536

Copy link
Copy link
Open
@jakubjelinek

Description

@jakubjelinek
Issue body actions

Is

void foo () {
  auto f = [i = 5] () { int i; return 0; };
}

supposed to be valid after the P2579R0 changes? Before that paper and before P2036R3 this wouldn't be valid, because
the capture inhabited the same scope as int i; P2036R3 changed it to inhabit the parameter scope, so parent scope of it
and then https://eel.is/c++draft/basic.scope#block-2 triggered there. But P2579R0 says that the init capture inhabits
lambda scope and isn't that the parent scope of the parameter scope, i.e. grandparent scope of the lambda's compound statement's scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    cwgIssue must be reviewed by CWG.Issue must be reviewed by CWG.not-editorialIssue is not deemed editorial; the editorial issue is kept open for tracking.Issue is not deemed editorial; the editorial issue is kept open for tracking.

    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.