C++17 is the name of the C++ standard approved in 2017. It builds upon the previous C++14 standard, improving the core language and standard library, and adding a few new language features.
C++17 is the name of the C++ standard that came after C++14. It builds upon the previous c++14 standard, improving the core language and standard library and adding a few new language features.
The ISO Standard, International Standard ISO/IEC 14882:2017 Programming Language C++, is available for purchase from the ISO website. All major changes from C++14 to C++17 have been enumerated in P0636r0.
Please tag questions about C++17 with the c++ tag, along with the c++17 tag.
New Features
Core language
- template argument deduction for class templates
- constexpr if statements
- structured bindings
- constexpr lambda expressions
- non-type template parameters with auto type
- init-statements for if and switch
- inline variables
- nested namespace definition
- fold expressions
typename
in a template template parameter- removing trigraphs
- u8 character literals
- aggregate initialization of classes with base classes
- lambda capture of *this
- guaranteed copy elision
- pack expansions in using-declarations
- hexadecimal floating-point literals
Library
- new headers:
<any>
<optional>
<variant>
<memory_resource>
<string_view>
<charconv>
<execution>
<filesystem>
- minor changes to preexisting headers