C “block” caret character

前端 未结 2 1465
礼貌的吻别
礼貌的吻别 2020-12-11 20:01

I\'ve noticed that this declaration involving a caret (^) character is pinned on the cdecl.org site at the top:

// \"cast foo into block(int, long long) retu         


        
相关标签:
2条回答
  • 2020-12-11 20:12

    The caret is part of an extension to the C language to work with blocks. Blocks are an extension to C supported by Clang and Apple’s GCC. It is not strictly conforming C (that is, not part of the core C language defined by the C standard).

    0 讨论(0)
  • 2020-12-11 20:20

    It is known as Block Variable Declaration. A variable with Block type is declared using function pointer style notation substituting ^ for *.

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