What is (double (^) (int)) foofoo

There is an example in cdecl that goes (double (^)(int))foofoo means cast foofoo in block (int), returning double .

What does "foofoo" mean in an "block" int? What does the symbol ^ mean in this context. This is usually a bitwise XOR.

+6
c ++ casting block objective-c-blocks
source share
1 answer

This is a GCC extension made by Apple and is also implemented in Clang. Blocks are small, unnamed functions, and this syntax is a type of block. See Block Language Specification .

+12
source share

All Articles