Movatterモバイル変換


[0]ホーム

URL:


This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-12-20


1772.__func__ in a lambda body

Section:7.5.6  [expr.prim.lambda]    Status:C++14    Submitter:Switzerland/Canada    Date:2013-09-24

N3690 comment CH 5
N3690 comment CA 22

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

It is not clear whether__func__ in the body of a lambdarefers to theoperator() of the closure class orto the containing function (if any). Since lambdas can appear innon-function scope, it would be preferable for them to refer to theclosure class'soperator().

Proposed resolution (September, 2013):

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

Thelambda-expression'scompound-statement yieldsthefunction-body... —end example]Further, avariable__func__ is implicitly defined at the beginning ofthecompound-statement of thelambda-expression, withsemantics as described in 9.6.1 [dcl.fct.def.general].



[8]ページ先頭

©2009-2026 Movatter.jp