문제

I would like to try some of the new features that will make it to the C++2014 revision like std::make_unique and the std::filesystem functionnalities. I use ubuntu 14.04 and GCC/G++ 4.8 (with libstdc++-4.8-dev installed), and the flag -std=c++1y set. But there is no std::make_unique when including <tr1/memory>, and no <experimental/...> headers. What do I need to do to be able to use some of those new features ?

Thanks !

도움이 되었습니까?

해결책

<tr1/memory> is not a C++14 standard header. You simply want <memory>. Same for <dynarray>.

However, neither are supported in GCC 4.8. You need to upgrade to GCC 4.9 or clang 5.

The GCC compiler support status for C++1y can be checked on the Language Features status page, and the library support on the Library Support status page.

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