Movatterモバイル変換


[0]ホーム

URL:


Issue 755 - WG21 CWG Issues
Title
Generalized lambda-captures
Status
cd3
Section
7.5.6.3 [expr.prim.lambda.capture]
Submitter
John Freeman

Created on2008-12-11.00:00:00 last changed145 months ago

Messages

msg2035 (view)
Date: 2014-03-03.00:00:00

Rationale, March, 2009:

This idea was discussed and rejected by the EWG.

This issue was addressed by the adoption of N3648, adopted at theApril, 2013 (Bristol) meeting.

msg1873 (view)
Date: 2022-11-20.07:54:16

In the current specification of lambda expressions, a name appearingin alambda-capture must refer to a local variable or referencewith automatic storage duration (7.5.6 [expr.prim.lambda] paragraph3). This restriction seems unnecessary and possibly confusing.

One possibility would be to extend the syntax of thelambda-capture to be something like

v =expr

with the meaning that the closure object would have a membernamedv initialized with the valueexpr. With thisextension, the current syntax could be viewed as an abbreviationfor

v = v
History
DateUserActionArgs
2014-03-03 00:00:00adminsetstatus: extension -> cd3
2009-03-23 00:00:00adminsetmessages: +msg2035
2009-03-23 00:00:00adminsetstatus: open -> extension
2008-12-11 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp