문제

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?

도움이 되었습니까?

해결책

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"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top