Objective-C, .m / .mm performance difference?

前端 未结 2 1997
执笔经年
执笔经年 2020-12-14 15:46

I tend to use the .mm extension by default when creating new classes so that I can use ObjC++ later on if I require it.

Is there any disadvantage to doing this? When

2条回答
  •  渐次进展
    2020-12-14 16:20

    If you only use C features, .mm files should generate code that performs very similar to .m

    There is also no downside to renaming a file from .m to .mm later when you desire C++ features

提交回复
热议问题