C++17
C++17 is a version of the ISO/IEC 14882 standard for the C++ programming language.[src] C++17 replaced the prior version of the C++ standard, called C++14, and was later replaced by C++20.[src]
C++17 is a version of the ISO/IEC 14882 standard for the C++ programming language.[src] C++17 replaced the prior version of the C++ standard, called C++14, and was later replaced by C++20.[src] ==History== Before the C++ Standards Committee fixed a 3-year release cycle, C++17's release date was uncertain.[src] In that time period, the C++17 revision was also called C++1z, following C++0x or C++1x for C++11 and C++1y for C++14.[src] The C++17 specification reached the Draft International Standard (DIS) stage in March 2017.[src] This DIS was unanimously approved, with only editorial comments, and the final standard was published as ISO/IEC 14882:2017 in December 2017.[src] Few changes were made to the C++ Standard Template Library, although some algorithms in the header were given support for explicit parallelization and some syntactic enhancements were made.[src] ==New features== C++17 introduced many new features.[src] The following lists may be incomplete.[src] ===Language=== Making the text message for optional Allow (as an alternative to ) in a template template parameter New rules for deduction from braced-init-list Nested namespace definitions, e.g., instead of {{code|2=cpp|1=namespace X { namespace Y { ...[src] } } }} Allowing attributes for namespaces and enumerators New standard attributes , and UTF-8 ( ) character literals (UTF-8 string literals have existed since C++11; C++17 adds the corresponding character literals for consistency, though as they are restricted to a single byte they can only store "Basic Latin" and C0 control codes, i.e.[src] ASCII) Hexadecimal floating-point literals Use of as the type for a non-type template parameter Constant evaluation for all non-type template arguments Fold expressions, for variadic templates A compile-time static with the form Structured binding declarations, allowing Initializers in and statements copy-initialization and direct-initialization of objects of type from prvalue expressions of type (ignoring top-level cv-qualifiers) shall result in no copy or move constructors from the prvalue expression.[src] See copy elision for more information.[src] Some extensions on over-aligned memory allocation (CTAD), introducing constructor deduction guides, e.g.[src] allowing instead of requiring explicit constructor arguments types or an additional helper template function .[src] Inline variables, which allows the definition of variables in header files without violating the one definition rule.[src] The rules are effectively the same as inline functions , allowing the availability of a header to be checked by preprocessor directives Value of changed to Exception specifications were made part of the function type Lambda expressions can capture " *this " by value ===Library=== Most of Library Fundamentals TS I, including: header: std::string_view , a read-only non-owning reference to a character sequence or string-slice : std::optional , for representing optional objects, a data type that may not always be returned by a given algorithm with support for non-return : std::any , for representing the any type, which holds a single value of any type std::uncaught_exceptions , as a replacement of std::uncaught_exception in exception handling.[src] Located in .[src] uncaught_exceptions counts the number of exceptions in the current thread that have been thrown/rethrown and not yet entered a matching catch clause, whereas uncaught_exception only detects whether stack unwinding is in progress.[src] New insertion functions try_emplace and insert_or_assign for std::map (a tree map) and std::unordered_map (a hash map) key-value associative data structures Uniform container access: std::size , std::empty and std::data Definition of "contiguous iterators" : a file system library, std::filesystem (based on boost::filesystem ) Parallel versions of STL algorithms : additional mathematical special functions, including elliptic integrals and Bessel functions : std::variant , a tagged union container std::byte , allowing char to be replaced for data types intending to model a byte of data as a byte rather than a character Logical operator traits: std::conjunction , std::disjunction and std::negation header, for polymorphic memory resources ==Removed features== This revision of C++ not only added new features but also removed a few.[src] Trigraphs were removed.[src] Some deprecated types and functions were removed from the standard library, including std::auto_ptr , std::random_shuffle , and old function adaptors.[src] These were superseded in C++11 by improved facilities such as std::unique_ptr , std::shuffle , std::bind , and lambdas.[src] The (formerly deprecated) use of the keyword as a storage class specifier was removed.[src] This keyword is still reserved but now unused.[src] ==Compiler support== GCC has had complete support for C++17 language features since version 8.[src] Clang 5 and later supports all C++17 language features.[src] Visual Studio 2017 15.8 (MSVC 19.15) and later supports all C++17 language features.[src] ==Library support== libstdc++ since version 9.1 has complete support for C++17 (8.1 without Parallelism TS and referring to C99 instead of C11) libc++ as of version 9 has partial support for C++17, with the remainder "in progress" Visual Studio 2017 15.8 (MSVC 19.15) Standard Library and later supports all C++17 library features except for "Elementary String Conversions" and referring to C99 instead of C11.[src] "Elementary String Conversions" is added in Visual Studio 2019 16.4 ==See also== C17 (C standard revision) C++ compilers ==References==[src]
32 sentences · 32 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"C++17." encyclopegia.org, 2026, https://encyclopegia.org/wiki/c-17. Accessed 30 November 2026.
Chicago
"C++17." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/c-17.
APA
encyclopegia.org. (2026). C++17. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/c-17
Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| publication date | 2017 | Wikipedia |