C ++ 14 TS and GCC 4.8

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

Thanks!

+7
c ++ c ++ 14
source share
1 answer

<tr1/memory> not a standard C ++ 14 header. You just want a <memory> . The same goes for <dynarray> .

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

GCC compiler support status for C ++ 1y can be checked on the language characteristics status page and library support in the Library support page .

+13
source share

All Articles