What's the status of C++17 support in GCC?
As of today, gcc's C++1z language support is tracked on: https://gcc.gnu.org/projects/cxx1z.html. For the C++1z status of libstdc++, see https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.201z.
There is some support already; The following two summaries are oriented on Clang's list:
Supported (as of July 5th, 2015):
auto
for function parameters is supported since 4.9. This feature is currently considered an extension but is included in the concepts proposal and called "generic functions".- trigraphs are being ignored by default since 5.1.0
typename
for template template parameters since 5.1.0- new deduction rules for direct-list-initialization since 5.1.0
static_assert
without a message in HEADu8
character literals in HEAD- Attributes for namespaces or enumerators in HEAD
Unsupported (as of July 5th, 2015; with links to a valid example usage):
- Fold expressions
- Nested namespace definitions
- Constant evaluation for all non-type template arguments
For the status of implementation of library proposals in libstdc++, the corresponding manual has a list.
Updated final nutshell answer:
- GCC 8.x (and later) fully supports all of C++17.
- GCC 7.x supports all of C++17 except for class template argument deduction.
- GCC 6.x (and earlier) has little or no support for C++17 features.
Thanks @JanVanDijk for the link to the full feature table.