What Version of C++ is supported when I want to be able to have a fully cross compilable game working on PC,Mac,Android and iOS ? What is the least common denominator, what compiler version are used for this ?
We use the following C++11 features in UE4:
- nullptr
- auto
- Range-based-for
- Lambdas (although stateful lambdas can’t be used with our delegates… yet)
- override/final
I think you could also use variadic templates if you don’t care about VS2012 support.
VS2012 is the compiler with the most incomplete C++11 implementation that UE4 supports.
Not quiet sure what to think now. if i am building an android build using UE4 what compiler version is used then? Why would I use VS2012 ? Is VS2013 not supported ?
All of our non-Microsoft platforms use Clang, so Android would be using Clang.
I mentioned VS2012 because we still support it for Microsoft platforms, and it is the worst compiler in terms of C++11 feature support. If you have VS2013 available then we definitely recommend using that as it has much better C++11 feature support (like variadic templates, which should also work on Clang).
We are getting there, so what clang version is it and is it bundled in the UE4 toolchain and is it the same clang version for android/ios ?
Below is the result of “clang --version”. I’m not sure if we bundle these with UE4, but I imagine they come from the Android SDK and Xcode.
Android: “clang version 3.4”
OS X/iOS: “LLVM version 5.1 (clang 503.0.40)” (Apparently this is actually based on LLVM 3.4svn).