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
The closure type for a lambda-expression has a public inline function call operator (for a non-generic lambda) or function call operator template (for a generic lambda) ([over.call]) whose parameters and return type are described by the lambda-expression's parameter-declaration-clause and trailing-return-type respectively, and whose template-parameter-list consists of the specified template-parameter-list, if any.
we just mention the case where trailing-return-type is omitted in [expr.prim.lambda.general] p5
If the lambda-declarator does not include a trailing-return-type, the lambda return type is auto,
we didn't explicitly associate the return type of the function call operator(template) of a lambda with the lambda return type. we merely defined the return type of the function call operator(template) as determined from the trailing-return-type.
I think we should change [expr.prim.lambda.general] p5 to
If the lambda-declarator does not include a trailing-return-type, it is as if its trailing-return-type is ->auto.
I also think saying lambda return type does not make sense. Since a lambda expression is a prvalue of a closure type and only the function call operator(template) of its closure type has a return type.
The text was updated successfully, but these errors were encountered:
[expr.prim.lambda.closure] p3 says
we just mention the case where trailing-return-type is omitted in [expr.prim.lambda.general] p5
we didn't explicitly associate the return type of the function call operator(template) of a lambda with the lambda return type. we merely defined the return type of the function call operator(template) as determined from the trailing-return-type.
I think we should change [expr.prim.lambda.general] p5 to
I also think saying lambda return type does not make sense. Since a lambda expression is a prvalue of a closure type and only the function call operator(template) of its closure type has a return type.
The text was updated successfully, but these errors were encountered: