typeof(),__typeof__(),__typeof()

来源:互联网 发布:java不换行 编辑:程序博客网 时间:2024/05/01 14:56

在stackoverflow上看到 一个话题 (点击打开链接)

In objective-c I often use __typeof__(obj) when dealing with blocks etc. Why not __typeof(obj)or typeof(obj). I guess typeof(obj) is used for primitives and stuff like that.

When to use which?

自己对回答内容的理解,

以上三种样式的typeof只是针对不同的 c语言编译版本 有所不同, 而在gun99和c99及以后的版本中三者通用。

具体的解决方案见上面链接

0 0