3 ms·
> It also gives you blocks/closure support in C (needs Clang). You get block statements just with Clang don't you? No need for libdispatch? And you can kinda
by shakna 7y ago
> It also gives you blocks/closure support in C (needs Clang).
You get block statements just with Clang don't you? No need for libdispatch?
And you can kinda get blocks with GCC as well using a similar construct. (For the love of all that is holy, don't actually use this macro).
#define lambda(ret_type, _body) ({ ret_type _ _body _; })
I don't quite remember, but from when I was working things out, this worked _most_ of the time for both GCC and clang.