Is there any reason not to use c++0x and the libc++0x standard library for iOS development?
Asked
Active
Viewed 571 times
4
-
1Probably not for any reason that wouldn't apply to using any other variant of c++ for iOS development; your SDK uses Objective-C, and c++ classes and Objective-C classes do not mix nicely in terms of syntax, conventions, and memory management paradigms. – aroth Feb 11 '12 at 06:35
-
2@aroth Yeah, I use a thin Objective-C layer and do the rest in C++. – Feb 11 '12 at 06:40
-
Sounds like a pain.. why not Objective-C? – Collin Feb 11 '12 at 06:48
-
@CollinHockey I am using OpenGL ES, not UIKit, so... – Feb 11 '12 at 06:51
-
2@CollinHockey: you can easier port game later to different platforms. C++ is more available that Obj-C. – Mārtiņš Možeiko Feb 11 '12 at 20:57
-
Does Apple now support C++11? – MFH Feb 13 '12 at 22:41
-
@MFH Yes, http://stackoverflow.com/q/4574246. Although it isn't working for me... – Feb 14 '12 at 00:19
-
@Jay: Interestingly Apple uses the same technique more often than not: Core Animation is a thin Objective-C layer on top of C++, Core Audio uses a C interface on top of C++, WebKit puts a slightly thicker layer of objc on C++. – Nikolai Ruhe Feb 29 '12 at 09:27
2 Answers
4
If you use C++ to be more portable to other platforms later, it might be smart to hold off for awhile. Some targets may not yet have a C++0x compiler, or the company policy may be to use an old but trusted compiler for game release builds.

Prof. Falken
- 24,226
- 19
- 100
- 173
2
@Amigable, most if not all current C++ compilers suppor C++0x to some extent. After all it is slowly become standardized.

gandolf
- 3,384
- 4
- 21
- 20
-
Now you have enough rep to post a comment. To "some extent" is not always going to cut it. – Prof. Falken Feb 29 '12 at 11:45