[cfe-users] C++ lambdas more expensive than blocks?

Jens Alfke via cfe-users cfe-users at lists.llvm.org
Mon Oct 24 18:33:42 PDT 2016


> On Oct 24, 2016, at 12:00 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> 
> a helper class such as llvm::function_ref[1] might come
> in handy, which acts like a function pointer but also allows captures
> to be passed around.

Thanks. Is that class something I can just copy-and-paste into my code? Will it work with other compilers like GCC or MSVC?
(Sorry if these are naive questions; I’m not knowledgeable enough about templates to be able to understand that source code.)

—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20161024/d6e8de49/attachment.html>


More information about the cfe-users mailing list