The ISO International Standard ISO/IEC 14882:2017(E) – Programming Language C++, known as C++17, is the result of excellent efforts by the ISO C++ Standard Foundation Committee to introduce new simple and elegant powerful features to C++.
Adrian D. Finlay, Software Engineer, summarized on Nov 17, 2017, the new C++17 language features that are helpful to competitive programming lovers as well as to professional software engineers and software developers as follows.
"The never-ending journey into learning C++ features….
New Language Features
Addition of __has_include macro
UTF 8 Character Literals
Hexadecimal Floating Point Literals
- New rules for deduction of single member list using auto
Update to __cplusplus value
inline variables
New Syntax for Nested Namespace definitions
Initializers added to if/switch statements
constexpr if
New standard attributes fallthrough, maybe_unused &nodiscard ^
Attributes for Enumerator & Namespaces
Error message for static_assert now optional
Structured binding declarations
Keyword typename now allowed in lieu of class in a template’s template paramater
Constant evaluation for non-type template arguments
Class template argument deduction
Extensions on over-aligned Memory Allocation
Fold expressions
List-style Initialization of Enumerations
Specifying non-type template parameters with auto
constexpr lambda expressions
Lambda this by value (*this)
Extending Aggregate Initialization to Base Types
Unknown Attributes Required to be Ignored
Pack Expansions legal in using declarations
Generalization of Range-based for loop
The byte data type ^^
Using attribute namespaces without repetition
Stricter Order of Evaluation Rules
Exception Specifications are part of type definitions
Template-Template Parameters match compatible arguments
Guaranteed Copy Elision
Changes to Specification on Inheriting Constructors
^These are three features grouped into one, which consequently when expanded would make the new feature list count 35.
^^This is implemented in std::byte () and is not a part of the actual language such as the other primitive data types. It is considered a basic type as much as std::string is considered a basic type.
C++17 also introduced a revision to Elementary string conversions".
Structured bindings are super nice for competitive programming! You can now unpack stuff easily, as in the for-loop below:
without awkward usage of
std::tie
.Yes, the ISO C++ Standard Foundation Committee did a gratefully appreciated excellent job in developing the ISO International Standard ISO/IEC 14882:2017(E) – Programming Language C++, known as C++17, and introduced many simple and elegant features to C++, that are helpful to competitive programming lovers as well as to professional software engineers and software developers.
Best wishes,