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

后端 未结 1 866
伪装坚强ぢ
伪装坚强ぢ 2021-01-18 10:05

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

What does

相关标签:
1条回答
  • 2021-01-18 11:00

    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.

    0 讨论(0)
提交回复
热议问题