Title
__func__ in a lambda body
Status
c++14
Section
7.5.5 [expr.prim.lambda]
Submitter
Switzerland/Canada

Created on 2013-09-24.00:00:00 last changed 114 months ago

Messages

Date: 2014-02-15.00:00:00

[Moved to DR at the February, 2014 meeting.]

Date: 2013-09-15.00:00:00

Proposed resolution (September, 2013):

Change 7.5.5 [expr.prim.lambda] paragraph 7 as follows:

The lambda-expression's compound-statement yields the function-body... —end example] Further, a variable __func__ is implicitly defined at the beginning of the compound-statement of the lambda-expression, with semantics as described in 9.5.1 [dcl.fct.def.general].
Date: 2013-09-24.00:00:00
N3690 comment CH 5
N3690 comment CA 22

It is not clear whether __func__ in the body of a lambda refers to the operator() of the closure class or to the containing function (if any). Since lambdas can appear in non-function scope, it would be preferable for them to refer to the closure class's operator().

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: + msg4941
2014-03-03 00:00:00adminsetstatus: ready -> dr
2013-10-14 00:00:00adminsetmessages: + msg4581
2013-09-24 00:00:00admincreate