instancetype和id的区别

1.instancetype在类型表示上,跟id一样,可以表示任何对象类型

2.instancetype只能用在返回值类型上,不能跟id一样用在参数上

3.编译器会检测instancetype的真实类型

posted @ 2015-06-28 12:33  百川hl  阅读(112)  评论(0编辑  收藏  举报