You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
either the local entity is not *this, or an enclosing class or non-lambda function parameter scope exists and, if the innermost such scope is a function parameter scope, it corresponds to a non-static member function, and
for each intervening scope ([basic.scope.scope]) between the point at which the entity is introduced and the scope (where *this is considered to be introduced within the innermost enclosing class or non-lambda function definition scope), either:
the intervening scope is a block scope, or
the intervening scope is the function parameter scope of a lambda-expression that has a simple-capture naming the entity or has a capture-default, and the block scope of the lambda-expression is also an intervening scope.
I believe a lambda expression introduces three nested scopes, in this order: a lambda scope, a function parameter scope and a block scope.
Shouldn't the lambda scope introduced by the lambda expression be allowed to be one of the intervening scopes in the definition of "odr-usable"?
Thank you!
The text was updated successfully, but these errors were encountered:
RazvanAM
changed the title
[basic.def.odr] "Lambda scope" should be included as a possible "intervening scope"
[basic.def.odr] "Lambda scope" should be included as a possible "intervening scope" in definition of "odr-usable"
Dec 19, 2023
Hello,
[basic.def.odr] p. 10 states that:
I believe a lambda expression introduces three nested scopes, in this order: a lambda scope, a function parameter scope and a block scope.
Shouldn't the lambda scope introduced by the lambda expression be allowed to be one of the intervening scopes in the definition of "odr-usable"?
Thank you!
The text was updated successfully, but these errors were encountered: