Copying function_ref will work, it's independent of the rest of LLVM
and works with all C++11 compilers. I also expect common C++ libraries
to have an equivalent class, but I haven't checked.

On Tue, Oct 25, 2016 at 3:33 AM, Jens Alfke <j...@mooseyard.com> wrote:
>
> On Oct 24, 2016, at 12:00 PM, Benjamin Kramer <benny....@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
_______________________________________________
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users

Reply via email to