什么是(double(^)(int))foofoo [英] What is (double (^)(int))foofoo

查看:135
本文介绍了什么是(double(^)(int))foofoo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个例子cdecl,(double(^)(int))foofoo 表示 cast foofoo into block

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

将foofoo转换为int的块是什么意思?在此上下文中,符号 ^ 是什么意思。通常是按位XOR。

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.

推荐答案

这是Apple制作的GCC扩展,块是小的未命名函数,并且语法是块的类型。请参见阻止语言规范

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.

这篇关于什么是(double(^)(int))foofoo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆