简体   繁体   中英

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

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

What does it mean to cast foofoo into a "block" of int ? What does the symbol ^ exactly mean in this context. Usually it is bitwise XOR.

It's a GCC extension made by Apple, and implemented also in Clang. Blocks are small unnamed functions and that syntax is the type of a block. See Block Language Spec .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM