Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++14 TS functionality and GCC 4.8

Tags:

c++

c++14

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 !

like image 410
Athanase Avatar asked Apr 10 '14 10:04

Athanase


People also ask

Does GCC 4.9 support C++14?

0 released, full of improved C++11 and C++14 features. GCC 4.9. 0 is now available, with further improved C++11 and C++14 conformance.

Does G ++ 4.8 5 support C++14?

My target platform (RHEL 7) ships with G++ 4.8. 5, which does not support C++14 completely. It provides the -std=c++11 option for C++11 support, and the -std=c++1y option for “The next revision of the ISO C++ standard, tentatively planned for 2017.

Which version of C++ does GCC support?

GCC supports the original ISO C++ standard published in 1998, and the 2011, 2014, 2017 and mostly 2020 revisions. The original ISO C++ standard was published as the ISO standard (ISO/IEC 14882:1998) and amended by a Technical Corrigenda published in 2003 (ISO/IEC 14882:2003).

Does G ++ 4.8 5 support C ++ 11?

Status of Experimental C++11 Support in GCC 4.8GCC provides experimental support for the 2011 ISO C++ standard. This support can be enabled with the -std=c++11 or -std=gnu++11 compiler options; the former disables GNU extensions.


1 Answers

<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.

like image 184
Konrad Rudolph Avatar answered Oct 21 '22 03:10

Konrad Rudolph