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


761. Inferred return type of closure object call operator

Section:7.5.6.2  [expr.prim.lambda.closure]    Status:CD2    Submitter:Daveed Vandevoorde    Date:5 February, 2009

[Voted into the WP at the July, 2009 meeting as part of N2927.]

According to 7.5.6 [expr.prim.lambda] paragraph 10, the followinglambda expressions are ill-formed because the return types of thegeneratedoperator() functions are an array type and a functiontype, respectively:

    void f() {      []{ return ""; };      []{ return f; };    }

It would seem reasonable to expect the array-to-pointer andfunction-to-pointer decay to apply to these return values andhence to the inferred return type ofoperator().

Proposed resolution (July, 2009)

See document PL22.16/09-0117 = WG21 N2927.




[8]ページ先頭

©2009-2026 Movatter.jp