Title
Lambda expression introduces a scope
Status
open
Section
6.4.1 [basic.scope.scope]
Submitter
US

Created on 2025-10-01.00:00:00 last changed yesterday

Messages

Date: 2025-10-12.15:36:38

Suggested resolution:

Change in 6.4.1 [basic.scope.scope] paragraph 1 as follows:

The declarations in a program appear in a number of scopes that are in general discontiguous. The global scope contains the entire program; every other scope S is introduced by a declaration, parameter-declaration-clause, statement, handler, lambda-expression, or contract assertion (as described in the following subclauses of 6.4 [basic.scope]) appearing in another scope, which thereby contains S. An enclosing scope at a program point is any scope that contains it; the smallest such scope is said to be the immediate scope at that point. A scope intervenes between a program point P and a scope S (that does not contain P ) if it is or contains S but does not contain P .
Date: 2025-10-01.00:00:00
N5028 comment AT 4-099

A lambda-expression introduces a scope, but it is missing from the list in 6.4.1 [basic.scope.scope] paragraph 1.

History
Date User Action Args
2025-10-12 15:36:38adminsetmessages: + msg8164
2025-10-01 00:00:00admincreate