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

2024-10-26


1931. Default-constructible and copy-assignable closure types

Section: 7.5.6.2  [expr.prim.lambda.closure]     Status: CD5     Submitter: Ryou Ezoe     Date: 2014-05-24

[Accepted at the November, 2017 meeting as part of paper P0624R2.]

It would be more consistent if the closure type of a lambda expression with no lambda-capture were default-constructible and copy-assignable, since such lambdas are already convertible to a function pointer, which has those characteristics.

Rationale (June, 2014):

CWG was sympathetic to this request, although it felt that the conversion to a function pointer was irrelevant to this question. However, EWG should examine this request for a language change before any action is taken.