[cfe-dev] blocks with c++ lambas

Eli Friedman eli.friedman at gmail.com
Mon Sep 10 20:24:30 PDT 2012

On Mon, Sep 10, 2012 at 7:50 PM, James Gregurich <bayoubengal at me.com> wrote:
> thanks.
> I had two problems. one was not using .mm and the other was I was attempting to use a lambda that took an argument. Since the argument was of the wrong type, the type didn't match for dispatch_async.
> Question. does the lambda need to be defined in an objc++ file or can a .cpp translation unit pass the lambda to the objc++ translation unit which can then call dispatch_async()?

The conversion from a lambda to a block pointer requires objc++.


More information about the cfe-dev mailing list