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

2024-11-11


2453. Deduced return types and coroutine lambdas

Section: 9.2.9.7.1  [dcl.spec.auto.general]     Status: NAD     Submitter: Lewis Baker     Date: 2020-02-14

According to 9.2.9.7.1 [dcl.spec.auto.general] paragraph 15,

A function declared with a return type that uses a placeholder type shall not be a coroutine (9.5.4 [dcl.fct.def.coroutine]).

This should also apply to coroutine lambdas.

Rationale (July, 2020):

No change is needed. The restriction applies to functions, and the lambda's operator() is a function.