, , ,

The default in XCode 4.5.2 is for C++ 11 support, however this is not the case for the command line tools. It took some digging, but I finally arrived at the correct command line options for clang++.

It is sufficient to supply -std=c++11 and -stdlib=libc++. It also seems to accept -std=gnu++11.

Note that these options are not recognized by g++ as shipped for Mountain Lion.