Can I use C++11 with Xcode?

Xcode 4.2 had finally added support for C++0X:

  1. In the project build settings screen, switch on “All” options.

  2. In the “Build Options” section, set compiler to “Apple LLVM compiler 3.0”.

  3. Scroll down to “Apple LLVM Compiler 3.0 – Language” section and set “C++ Language Dialect” to “C++0X” and “C++ Standard Library” to “libc++”.

The std::move(), move constructor and R-Value reference are known to work as expected, and I’m testing on the std::thread and std::atomic.

Leave a Comment