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 !
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.
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.
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).
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.
<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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With