[cfe-dev] blocks with c++ lambas

Eli Friedman eli.friedman at gmail.com
Tue Sep 11 01:58:06 PDT 2012


On Mon, Sep 10, 2012 at 10:45 PM, James Gregurich <bayoubengal at me.com> wrote:
> is that conversion  a compile time operation or a runtime operation?

If you convert a lambda immediately to block pointer type (like my
original example), it's essentially free, as if you'd written the
equivalent block.  With an expression of lambda type in general,
though, the conversion happens at runtime: the lambda is copied into
an autoreleased block.

-Eli



More information about the cfe-dev mailing list