Search code examples
c++xcodeiso

Is Xcode 6.1.1 ISO standard for C++?


Is Xcode 6.1.1 ISO standard C++ compliant? If not, how can I set it to require ISO standard C++? I have to submit my C++ project as ISO standard.


Solution

  • Xcode uses clang by default and clang definitely supports ISO C++, you just have to use the right flags.

    If you go to your projects Build Settings, you can configure the standard you want to use under Language - C++, for example C++11 or GNU C++11(which would include non-standard extensions). So you would want C++11, C++14 etc...

    Then you want to enable pedantic warnings under Warning Policies which will generate a warning for any non-standard construct you are using.

    The equivalent command line flags let's say for C++11 would be:

    -std=c++11 -pedantic