Question

Since Xcode 5.1 includes clang 3.4, it should be possible to use std::make_unique. It seems to be defined in memory.h.

However, it needs to have _LIBCPP_STD_VER > 11 but it is still set to 11 because of the value of __cplusplus macro (still 201103L).

Is there a way to change this?

Was it helpful?

Solution

As specified in the clang website, you need to enable -std=c++1y.

Xcode does not include this option as a choice in its "C++ Language Version" option, so you will need to manually enter it. To do this, you need to go into the "Editor" menu while the project definition is open and press "Show Definitions". You should now be able to manually change the "C++ Language Dialect" option to c++1y:

Enabling "Show Definitions"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top