[expr.prim.lambda.capture] Question about the example in p9 #1621
Labels
cwg
Issue must be reviewed by CWG.
not-editorial
Issue is not deemed editorial; the editorial issue is kept open for tracking.
This is the example in [expr.prim.lambda.capture]p9:
My question is, what is the smallest enclosing scope of the lambdas in this example?
According to my understanding, it is the function prototype scope. But then the declaration of
g4
is not OK: the smallest enclosing scope of the lambda is not a block scope, and so according to [expr.prim.lambda.capture]p3 no capture-default is allowed.Note that CWG 1632 is also about [expr.prim.lambda.capture]p3 (previously [expr.prim.lambda]p9).
The text was updated successfully, but these errors were encountered: