C++20: Difference between revisions
More http -> https changes in open-std.org URLs |
http -> https in more open-std.org URLs, plus replaced an incorrect title in one citation |
||
Line 141: | Line 141: | ||
Changes applied to the C++20 working draft in the summer meeting in June 2018 (Rapperswil) include:<ref>{{cite web|url=https://herbsutter.com/2018/07/02/trip-report-summer-iso-c-standards-meeting-rapperswil/|title=Trip report: Summer ISO C++ standards meeting (Rapperswil)|author=[[Herb Sutter]]|date=2 July 2018 |access-date=2018-11-10|archive-date=2020-05-23|archive-url=https://web.archive.org/web/20200523083708/https://herbsutter.com/2018/07/02/trip-report-summer-iso-c-standards-meeting-rapperswil/|url-status=live}}</ref> |
Changes applied to the C++20 working draft in the summer meeting in June 2018 (Rapperswil) include:<ref>{{cite web|url=https://herbsutter.com/2018/07/02/trip-report-summer-iso-c-standards-meeting-rapperswil/|title=Trip report: Summer ISO C++ standards meeting (Rapperswil)|author=[[Herb Sutter]]|date=2 July 2018 |access-date=2018-11-10|archive-date=2020-05-23|archive-url=https://web.archive.org/web/20200523083708/https://herbsutter.com/2018/07/02/trip-report-summer-iso-c-standards-meeting-rapperswil/|url-status=live}}</ref> |
||
* <s>contracts</s> ([[C++20#Deferred to a later standard|later deferred to a later standard]])<ref>{{cite web|url= |
* <s>contracts</s> ([[C++20#Deferred to a later standard|later deferred to a later standard]])<ref>{{cite web|url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0542r5.html|title=Support for contract based programming in C++|website=www.open-std.org|access-date=2018-11-10|archive-date=2020-01-15|archive-url=https://web.archive.org/web/20200115232059/http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0542r5.html|url-status=live}}</ref> |
||
* feature test macros |
* feature test macros |
||
* bit-casting of object representations, with less verbosity than <code>memcpy()</code> and more ability to exploit compiler internals |
* bit-casting of object representations, with less verbosity than <code>memcpy()</code> and more ability to exploit compiler internals |
||
Line 155: | Line 155: | ||
* immediate functions using the new <code>consteval</code> keyword |
* immediate functions using the new <code>consteval</code> keyword |
||
* [[signed integer]]s are now defined to be represented using [[two's complement]] (signed integer overflow remains [[undefined behavior]]) |
* [[signed integer]]s are now defined to be represented using [[two's complement]] (signed integer overflow remains [[undefined behavior]]) |
||
* <s>refinements of the contracts facility (access control in contract conditions)</s><ref>{{cite web|url= |
* <s>refinements of the contracts facility (access control in contract conditions)</s><ref>{{cite web|url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1289r0.pdf|title=P1289R0 - Access control in contract conditions|access-date=2018-11-11|archive-date=2018-11-11|archive-url=https://web.archive.org/web/20181111133631/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1289r0.pdf|url-status=live}}</ref> (see list of [[C++20#Deferred to a later standard|features deferred to a later standard]]) |
||
* a revised memory model |
* a revised memory model |
||
* smart pointer creation with default initialization |
* smart pointer creation with default initialization |
||
Changes applied to the C++20 working draft in the winter meeting in February 2019 (Kona) include:<ref>[ |
Changes applied to the C++20 working draft in the winter meeting in February 2019 (Kona) include:<ref>[https://open-std.org/JTC1/SC22/WG21/docs/papers/2018/n4765.pdf winter meeting in February 2019]</ref><ref>{{cite web|url=https://www.reddit.com/r/cpp/comments/au0c4x/201902_kona_iso_c_committee_trip_report_c20/|title=r/cpp - 2019-02 Kona ISO C++ Committee Trip Report (C++20 design is complete; Modules in C++20; Coroutines in C++20; Reflection TS v1 published; work begins on a C++ Ecosystem Technical Report)|website=reddit|language=en|access-date=2019-02-24|archive-date=2019-02-23|archive-url=https://web.archive.org/web/20190223234513/https://www.reddit.com/r/cpp/comments/au0c4x/201902_kona_iso_c_committee_trip_report_c20/|url-status=live}}</ref><ref>{{cite web|url=https://herbsutter.com/2019/02/23/trip-report-winter-iso-c-standards-meeting-kona/|title=Trip report: Winter ISO C++ standards meeting (Kona)|date=2019-02-23|website=Sutter's Mill|language=en|access-date=2019-02-24|archive-date=2019-02-24|archive-url=https://web.archive.org/web/20190224030105/https://herbsutter.com/2019/02/23/trip-report-winter-iso-c-standards-meeting-kona/|url-status=live}}</ref> |
||
* [[coroutine]]s |
* [[coroutine]]s |
||
Line 165: | Line 165: | ||
* various improvements to structured bindings (interaction with lambda captures, <code>static</code> and <code>thread_local</code> storage duration) |
* various improvements to structured bindings (interaction with lambda captures, <code>static</code> and <code>thread_local</code> storage duration) |
||
Changes applied to the C++20 working draft in the summer meeting in July 2019 (Cologne) include:<ref>{{Cite web|url= |
Changes applied to the C++20 working draft in the summer meeting in July 2019 (Cologne) include:<ref>{{Cite web|url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n4783.pdf|title=2019 Cologne Meeting Invitation and Information}}</ref><ref>{{cite web|url=https://www.reddit.com/r/cpp/comments/cfk9de/201907_cologne_iso_c_committee_trip_report_the/|title=r/cpp - 2019-07 Cologne ISO C++ Committee Trip Report — 🚀 The C++20 Eagle has Landed 🚀 (C++20 Committee Draft shipped; Contracts Moved From C++20 to a Study Group; 'std::format' in C++20; C++20 Synchronization Library)|website=reddit|language=en|access-date=2019-09-15|archive-date=2020-04-20|archive-url=https://web.archive.org/web/20200420142050/https://www.reddit.com/r/cpp/comments/cfk9de/201907_cologne_iso_c_committee_trip_report_the/|url-status=live}}</ref><ref>{{cite web|url=https://botondballo.wordpress.com/2019/07/26/trip-report-c-standards-meeting-in-cologne-july-2019/|title=Trip Report: C++ Standards Meeting in Cologne, July 2019|author=Botond Ballo|access-date=2019-08-05|archive-date=2020-02-26|archive-url=https://web.archive.org/web/20200226062236/https://botondballo.wordpress.com/2019/07/26/trip-report-c-standards-meeting-in-cologne-july-2019/|url-status=live}}</ref><ref>{{cite web|url=https://herbsutter.com/2019/07/20/trip-report-summer-iso-c-standards-meeting-cologne/|title=Trip report: Summer ISO C++ standards meeting (Cologne)|last=Sutter|first=Herb|access-date=2019-07-21|archive-date=2020-04-17|archive-url=https://web.archive.org/web/20200417181512/https://herbsutter.com/2019/07/20/trip-report-summer-iso-c-standards-meeting-cologne/|url-status=live}}</ref> |
||
* contracts were removed (see list of [[C++20#Deferred to a later standard|features deferred to a later standard]])<ref>{{cite web|url= |
* contracts were removed (see list of [[C++20#Deferred to a later standard|features deferred to a later standard]])<ref>{{cite web|url=https://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1823r0.pdf|title=P1823R0: Remove Contracts from C++20|last=Josuttis|first=Nicolai|access-date=2019-08-20|archive-date=2020-08-13|archive-url=https://web.archive.org/web/20200813202348/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1823r0.pdf|url-status=live}}</ref> |
||
* use of comma operator in subscript expressions has been deprecated<ref name="open-std.org">{{cite web|url= |
* use of comma operator in subscript expressions has been deprecated<ref name="open-std.org">{{cite web|url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1161r2.html|title=P1161R2: Deprecate uses of the comma operator in subscripting expressions|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-07-20|archive-url=https://web.archive.org/web/20190720101000/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1161r2.html|url-status=live}}</ref> |
||
* <code>constexpr</code> additions (trivial default initialization,<ref>{{cite web|url= |
* <code>constexpr</code> additions (trivial default initialization,<ref>{{cite web|url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1331r1.pdf|title=Permitting trivial default initialization in constexpr contexts|access-date=2019-07-20|archive-date=2020-10-19|archive-url=https://web.archive.org/web/20201019233314/http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1331r1.pdf|url-status=live}}</ref> unevaluated inline-assembly<ref>{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1668r1.html|title=P1668R1: Enabling Constexpr Intrinsics By Permitting Unevaluated inline-asm in Constexpr Functions|website=www.open-std.org|access-date=2019-07-20|archive-date=2020-01-19|archive-url=https://web.archive.org/web/20200119114611/http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1668r1.html|url-status=live}}</ref>) |
||
* using scoped <code>enum</code>s<ref name="P1099R5: Using Enum">{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1099r5.html|title=P1099R5: Using Enum|date=2019-07-20|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-08-20|archive-url=https://web.archive.org/web/20190820001959/http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1099r5.html|url-status=live}}</ref> |
* using scoped <code>enum</code>s<ref name="P1099R5: Using Enum">{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1099r5.html|title=P1099R5: Using Enum|date=2019-07-20|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-08-20|archive-url=https://web.archive.org/web/20190820001959/http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1099r5.html|url-status=live}}</ref> |
||
* various changes to the spaceship operator<ref>{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1186r3.html|title=P1186R3: When do you actually use <=>?|date=2019-07-20|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-08-20|archive-url=https://web.archive.org/web/20190820001956/http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1186r3.html|url-status=live}}</ref><ref>{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1630r1.html|title=P1630R1: Spaceship needs a tune-up|date=2019-07-20|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-08-20|archive-url=https://web.archive.org/web/20190820001956/http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1630r1.html|url-status=live}}</ref> |
* various changes to the spaceship operator<ref>{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1186r3.html|title=P1186R3: When do you actually use <=>?|date=2019-07-20|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-08-20|archive-url=https://web.archive.org/web/20190820001956/http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1186r3.html|url-status=live}}</ref><ref>{{cite web|url=http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1630r1.html|title=P1630R1: Spaceship needs a tune-up|date=2019-07-20|website=www.open-std.org|access-date=2019-07-20|archive-date=2019-08-20|archive-url=https://web.archive.org/web/20190820001956/http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1630r1.html|url-status=live}}</ref> |
Revision as of 15:39, 22 September 2023
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
C++ language revisions |
---|
C++20 is a version of the ISO/IEC 14882 standard for the C++ programming language. C++20 replaced the prior version of the C++ standard, called C++17.[1] The standard was technically finalized[2] by WG21 at the meeting in Prague in February 2020,[3] approved on 4 September 2020,[4][5] and published in December 2020.[6]
Features
C++20 adds more new major features than C++14 or C++17.[7] Changes that have been accepted into C++20 include:[8]
Language
- concepts,[9] with terse syntax[10]
- modules[11]
- designated initializers[12] (based on the C99 feature, and common g++ extension)
[=, this]
as a lambda capture[13]- template parameter lists on lambdas[14]
- three-way comparison using the "spaceship operator",
operator <=>
- initialization of an additional variable within a range-based
for
statement[15] - lambdas in unevaluated contexts[16][17]
- default constructible and assignable stateless lambdas[16][18]
- allow pack expansions in lambda init-capture[16][19]
- class types in non-type template parameters, also allowing string literals as template parameters[20]
- removing the need for
typename
in certain circumstances[21] - new standard attributes
[[no_unique_address]]
,[22][[likely]]
and[[unlikely]]
[23] - conditional
explicit
, allowing theexplicit
modifier to be contingent on a boolean expression[24] - expanded
constexpr
: virtual functions,[25]union
,[26]try
andcatch
,[27]dynamic_cast
andtypeid
,[28]std::pointer_traits
[29] - immediate functions using the new
consteval
keyword[30] - signed integers are now defined to be represented using two's complement (signed integer overflow remains undefined behavior)[31]
- a revised memory model[32]
- various improvements to structured bindings (interaction with lambda captures,
static
andthread_local
storage duration)[33][34] - coroutines[35]
using
on scopedenum
s[36]constinit
keyword[37]
Library
- ranges (The One Ranges Proposal)[38]
std::make_shared
andstd::allocate_shared
for arrays[39]- atomic smart pointers (such as
std::atomic<shared_ptr<T>>
andstd::atomic<weak_ptr<T>>
)[40] std::to_address
to convert a pointer to a raw pointer[41]- calendar and time-zone additions to
<chrono>
[42] std::span
, providing a view to a contiguous array (analogous tostd::string_view
butspan
can mutate the referenced sequence)[43]std::erase
andstd::erase_if
, simplifying element erasure for most standard containers[44]<version>
header[45]std::bit_cast<>
for type casting of object representations, with less verbosity thanmemcpy()
and more ability to exploit compiler internals[46]- feature test macros[47]
- various constexpr library bits[48]
- smart pointer creation with default initialization[49]
contains
-method for associative containers[50]- bit operations, such as leading/trailing zero/one count,[51] and log2 operations[52][53][54]
std::bind_front
[55]
New and changed keywords
Many new keywords added (and the new "spaceship operator", operator <=>
), such as concept
, constinit
,[37] consteval
, co_await
, co_return
, co_yield
, requires
(plus changed meaning for export
), and char8_t
(for UTF-8 support).[56] And explicit
can take an expression since C++20.[57] Most of the uses of the volatile
keyword have been deprecated.[58]
In addition to keywords, there are identifiers with special meaning, including new import
and module
.
New attributes in C++20:
[[likely]]
, [[unlikely]]
, and [[no_unique_address]]
[59]
Removed and deprecated
Removed features:[60]
- The C-derived headers
<ccomplex>
,<ciso646>
,<cstdalign>
,<cstdbool>
and<ctgmath>
were removed, as they serve no purpose in C++. (The corresponding<*.h>
headers remain, for compatibility with C.) - The use of
throw()
as an exception specification was removed. - Some previously deprecated library features were removed, including
std::uncaught_exception
,std::raw_storage_iterator
,std::is_literal_type
,std::is_literal_type_v
,std::result_of
andstd::result_of_t
.
Deprecated features:
- Use of comma operator in subscript expressions has been deprecated[61]
- (most of)
volatile
has been deprecated[58]
Published as Technical Specifications
Deferred to a later standard
- Contracts – a new study group (SG21) has been formed to work on a new proposal[66]
- Reflection[67][68]
- Metaclasses[69]
- Executors[70]
- Networking extensions,[71][72] including async, basic I/O services, timers, buffers and buffer-oriented streams, sockets, and Internet protocols (blocked by executors)
- Properties[73]
- Extended futures[74]
Compiler support
Full support[75]
- Visual Studio 2019 supports all C++20 features through its
/std:c++latest
option, as of version 16.10.0.[76] An option/std:c++20
to enable C++20 mode is added in version 16.11.0.[77][78] Project properties→Configuration properties→C/C++→Language→C++ Language Standard.
Microsoft's compiler doesn't just support Windows, also Linux (and e.g. Android and iOS), while it then requires the "Visual C++ for Linux Development extension".[79]
Partial
- Clang has partial C++20 support that can be enabled with the option
-std=c++20
(version 10 and later) or-std=c++2a
(version 9 and earlier).[80] - EDG started implementing C++20 features in version 5.0 and as of version 6.1 supports most C++20 core language features.[81]
- GCC added partial, experimental C++20 support in 2017[82] in version 8 through the option
-std=c++2a
. Like Clang, GCC replaced this option with-std=c++20
in version 10. It also has an option to enable GNU extensions in addition to the experimental C++20 support,-std=gnu++20
.[83]
History
Changes applied to the C++20 working draft in July 2017 (Toronto) include:[84]
- concepts (what made it into the standard is a cut-down version; also described as "Concepts Lite"[85])
- designated initializers
[=, this]
as a lambda capture- template parameter lists on lambdas
std::make_shared
andstd::allocate_shared
for arrays
Changes applied to the C++20 working draft in the fall meeting in November 2017 (Albuquerque) include:[86][87]
- three-way comparison using the "spaceship operator",
operator <=>
- initialization of an additional variable within a range-based
for
statement - lambdas in unevaluated contexts
- default constructible and assignable stateless lambdas
- allow pack expansions in lambda init-capture
- string literals as template parameters
- atomic smart pointers (such as
std::atomic<shared_ptr<T>>
andstd::atomic<weak_ptr<T>>
) std::to_address
to convert a pointer to a raw pointer
Changes applied to the C++20 working draft in March 2018 (Jacksonville) include:[88]
- removing the need for
typename
in certain circumstances - new standard attributes
[[no_unique_address]]
,[[likely]]
and[[unlikely]]
- calendar and time-zone additions to
<chrono>
std::span
, providing a view to a contiguous array (analogous tostd::string_view
butspan
can mutate the referenced sequence)<version>
header
Changes applied to the C++20 working draft in the summer meeting in June 2018 (Rapperswil) include:[89]
contracts(later deferred to a later standard)[90]- feature test macros
- bit-casting of object representations, with less verbosity than
memcpy()
and more ability to exploit compiler internals - conditional
explicit
, allowing the explicit modifier to be contingent on a boolean expression - constexpr virtual functions
Changes applied to the C++20 working draft in the fall meeting in November 2018 (San Diego) include:[91]
- ranges (The One Ranges Proposal)
- concept terse syntax
constexpr
union
,try
andcatch
,dynamic_cast
,typeid
andstd::pointer_traits
.- various
constexpr
library bits - immediate functions using the new
consteval
keyword - signed integers are now defined to be represented using two's complement (signed integer overflow remains undefined behavior)
refinements of the contracts facility (access control in contract conditions)[92] (see list of features deferred to a later standard)- a revised memory model
- smart pointer creation with default initialization
Changes applied to the C++20 working draft in the winter meeting in February 2019 (Kona) include:[93][94][95]
- coroutines
- modules
- various improvements to structured bindings (interaction with lambda captures,
static
andthread_local
storage duration)
Changes applied to the C++20 working draft in the summer meeting in July 2019 (Cologne) include:[96][97][98][99]
- contracts were removed (see list of features deferred to a later standard)[100]
- use of comma operator in subscript expressions has been deprecated[61]
constexpr
additions (trivial default initialization,[101] unevaluated inline-assembly[102])- using scoped
enum
s[36] - various changes to the spaceship operator[103][104]
- DR: minor changes to modules[105]
constinit
keyword- changes to concepts (removal of
-> Type
return-type-requirements[106]) - (most of)
volatile
has been deprecated[58] - DR:
[[nodiscard]]
effects on constructors[107] - The new standard library concepts will not use PascalCase (rather
standard_case
, as the rest of the standard library)[108] - text formatting (
std::format
, [109][110]chrono
integration,[111] corner case fixes[112]) - bit operations[51]
constexpr INVOKE
[113]- math constants[114]
- consistency additions to atomics (
std::atomic_ref<T>
,[115]std::atomic<std::shared_ptr<T>>
[116]) - add the
<=>
operator to the standard library[117] - header units for the standard library[118]
- synchronization facilities[119] (merged from: Efficient atomic waiting and semaphores,[120] latches and barriers,[121] Improving
atomic_flag
,[122] Don't Make C++ Unimplementable On Small CPUs[123]) std::source_location
[124]constexpr
containers (std::string
,[125]std::vector
[126])std::stop_token
and joining thread (std::jthread
)[127]
Changes applied during the NB comment resolution in the fall meeting in November 2019 (Belfast) include:[128][129][130][131]
- Class Types in Non-Type Template Parameters (NTTP): The restriction of no user-defined
operator==
allowed has been removed as the meaning of template argument equality has been divorced fromoperator==
.[132] This allows also for array members in class-type NTTP. - Floating-point types,[133] pointers and references and unions and union-like classes (class types containing anonymous unions) are now allowed as NTTP.
- Function identity now also includes trailing requires-clauses (P1971)
- Constrained non-template functions have been removed
<compare>
is now available in freestanding implementations[134]std::span
s typedef was changed fromindex_type
tosize_type
to be consistent with the rest of the standard library[135]- Concept traits have been renamed to follow the renaming of the concepts as a result from the Cologne meeting
- Several fixes and additions to ranges (P1456R1: Move-only views,[136] P1391R4: Range constructor for
std::string_view
(constructor from iterator-pair of characters),[137] P1394R4: Range constructor forstd::span<ref>
,[138] P1870R1: forwarding-range<T> is too subtle[139]) - Initialization for
std::atomic<T>
has been changed to make it work with default and list initialization,[140]std::latch
andstd::barrier
can now report the maximum number of threads that the implementation supports through the new member functionmax()
std::weak_equality
andstd::strong_equality
have been removed as they are not used anymore- Algorithms in
<numeric>
have been madeconstexpr
- Missing feature-test macros for new or changed features of C++20 have been added[141]
References
- ^ "The Standard". isocpp.org. Archived from the original on 19 September 2020. Retrieved 7 September 2020.
- ^ Sutter, Herb (2019-10-01). "P1000R3: C++ IS schedule" (PDF). Archived (PDF) from the original on 2019-11-14. Retrieved 2020-02-13.
- ^ Dusíková, Hana (2019-11-06). "N4817: 2020 Prague Meeting Invitation and Information" (PDF). Archived (PDF) from the original on 2019-12-29. Retrieved 2020-02-13.
- ^ "Current Status". isocpp.org. Archived from the original on 8 September 2020. Retrieved 7 September 2020.
- ^ "C++20 Approved -- Herb Sutter". isocpp.org. Archived from the original on 11 September 2020. Retrieved 8 September 2020.
- ^ "ISO/IEC 14882:2020". Archived from the original on 2020-12-16. Retrieved 2020-12-16.
- ^ "Why does the C++ standard ship every three years?". 13 July 2019. Archived from the original on 13 July 2019. Retrieved 19 July 2019.
- ^ "P0592R0: To boldly suggest an overall plan for C++20". Archived from the original on 2017-03-08. Retrieved 2017-05-06.
- ^ "P0606R0: Concepts Are Ready" (PDF). Archived (PDF) from the original on 2017-03-28. Retrieved 2017-05-06.
- ^ "P1141R1 - Yet another approach for constrained declarations". Archived from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ "N4720: Working Draft, Extensions to C++ for Modules" (PDF). Archived (PDF) from the original on 2019-04-30. Retrieved 2019-04-30.
- ^ Tim Shen; Richard Smith. "Designated Initialization Wording". Archived from the original on 2017-10-15. Retrieved 2017-07-16.
- ^ Thomas Köppe. "Allow lambda capture [=, this]". Archived from the original on 2019-02-09. Retrieved 2017-07-16.
- ^ "Familiar template syntax for generic lambdas". Archived from the original on 2018-11-21. Retrieved 2017-07-16.
- ^ "Range-based for statements with initializer". Archived from the original on 2017-04-06. Retrieved 2019-10-30.
- ^ a b c "Trip Report: C++ Standards Meeting in Albuquerque, November 2017". There's Waldo!. 2017-11-20. Archived from the original on 2017-12-11. Retrieved 2017-12-11.
- ^ "Wording for lambdas in unevaluated contexts" (PDF). Archived (PDF) from the original on 2017-12-12. Retrieved 2017-12-11.
- ^ "Default constructible and assignable stateless lambdas" (PDF). Archived (PDF) from the original on 2017-12-12. Retrieved 2017-12-11.
- ^ "Pack expansion in lambda init-capture". www.open-std.org. Archived from the original on 2020-02-14. Retrieved 2017-12-11.
- ^ "Class Types in Non-Type Template Parameters" (PDF). www.open-std.org. 2018-06-06. Archived (PDF) from the original on 2022-02-05. Retrieved 2022-02-18.
- ^ Nina Ranns; Daveed Vandevoorde. "Down with typename!". Archived from the original on 2018-04-22. Retrieved 2019-05-18.
- ^ "Language support for empty objects". Archived from the original on 2018-04-17. Retrieved 2019-08-04.
- ^ "Proposed wording for likely and unlikely attributes (Revision 5)". Archived from the original on 2018-05-13. Retrieved 2019-05-18.
- ^ "explicit(bool)". www.open-std.org. Archived from the original on 2018-07-20. Retrieved 2018-11-13.
- ^ "Allowing Virtual Function Calls in Constant Expressions". www.open-std.org. Archived from the original on 2018-06-11. Retrieved 2019-03-11.
- ^ "P1330R0 - Changing the active member of a union inside constexpr". Archived from the original on 2019-07-26. Retrieved 2019-07-26.
- ^ "P1002R0 - Try-catch blocks in constexpr functions" (PDF). Archived (PDF) from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ "P1327R0 - Allowing dynamic_cast, polymorphic typeid in Constant Expressions". Archived from the original on 2019-07-26. Retrieved 2019-07-26.
- ^ "P1006R1 - Constexpr in std::pointer_traits" (PDF). Archived (PDF) from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ "P1073R2 - Immediate functions". Archived from the original on 2018-10-26. Retrieved 2018-11-11.
- ^ "P1236R0: Alternative Wording for P0907R4 Signed Integers are Two's Complement". Archived from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ "P0668R4: Revising the C++ memory model". Archived from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ "P1091R1: Extending structured bindings to be more like variable declarations". www.open-std.org. Archived from the original on 2019-01-26. Retrieved 2019-02-24.
- ^ "P1091R2: Extending structured bindings to be more like variable declarations". www.open-std.org. Archived from the original on 2019-01-26. Retrieved 2019-02-24.
- ^ "N4649: Working Draft, Technical Specification for C++ Extensions for Coroutines" (PDF). Archived (PDF) from the original on 2017-05-16. Retrieved 2017-05-06.
- ^ a b "P1099R5: Using Enum". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ a b "P1143R2: Adding the constinit keyword". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P0896R3" (PDF). Archived (PDF) from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ "Extending make_shared to Support Arrays". Archived from the original on 2017-09-06. Retrieved 2020-02-12.
- ^ Meredith, Alisdair; Sutter, Herb. "Revising atomic_shared_ptr for C++20". JTC1/SC22/WG21 - The C++ Standards Committee - ISOCPP. ISO. Archived from the original on 4 January 2018. Retrieved 27 December 2018.
- ^ "Utility to convert a pointer to a raw pointer". Archived from the original on 2018-02-20. Retrieved 2020-02-12.
- ^ Howard E. Hinnant; Tomasz Kamiński. "Extending <chrono> to Calendars and Time Zones". Archived from the original on 2018-05-13. Retrieved 2019-05-18.
- ^ Neil MacIntosh; Stephan T. Lavavej. "span: bounds-safe views for sequences of objects". Archived from the original on 2019-05-18. Retrieved 2019-05-18.
- ^ Alisdair Meredith; Stephan T. Lavavej (2018-10-04). "Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20". Archived from the original on 2021-03-08. Retrieved 2020-12-14.
- ^ Alan Talbot. "<version>". Archived from the original on 2019-05-18. Retrieved 2019-05-18.
- ^ "Bit-casting object representations". www.open-std.org. Archived from the original on 2018-08-18. Retrieved 2018-11-10.
- ^ "Integrating feature-test macros into the C++ WD (rev. 2)". www.open-std.org. Archived from the original on 2018-07-20. Retrieved 2018-11-10.
- ^ "P1032R1 - Misc constexpr bits". Archived from the original on 2018-10-26. Retrieved 2018-11-11.
- ^ "Smart pointer creation with default initialization". Archived from the original on 2019-01-26. Retrieved 2020-02-12.
- ^ Mikhail Maltsev. "P0458R2: Checking for Existence of an Element in Associative Containers". Archived from the original on 2022-01-16. Retrieved 2022-01-02.
- ^ a b "P0553R4: Bit operations". www.open-std.org. 2019-07-20. Archived from the original on 2019-07-20. Retrieved 2019-07-20.
- ^ "P0556R3: Integral power-of-2 operations". www.open-std.org. 2018-06-06. Archived from the original on 2019-06-26. Retrieved 2020-08-08.
- ^ "P1355R2 Exposing a narrow contract for ceil2". www.open-std.org. 2019-06-11. Archived from the original on 2019-08-05. Retrieved 2020-08-08.
- ^ "On the names of low-level bit manipulation functions" (PDF). www.open-std.org. 2020-02-11. Archived (PDF) from the original on 2020-03-24. Retrieved 2020-08-08.
- ^ Tomasz Kamiński (2017-11-09). "Simplified partial function application". Archived from the original on 2020-09-28. Retrieved 2020-11-08.
- ^ "C++ keywords - cppreference.com". en.cppreference.com. Archived from the original on 2012-03-19. Retrieved 2019-08-04.
- ^ "explicit specifier - cppreference.com". en.cppreference.com. Archived from the original on 2012-02-21. Retrieved 2019-08-04.
- ^ a b c "P1152R4: Deprecating volatile". www.open-std.org. 2019-07-20. Archived from the original on 2019-06-23. Retrieved 2019-07-20.
- ^ "attribute specifier sequence(since C++11) - cppreference.com". en.cppreference.com. Archived from the original on 2012-07-05. Retrieved 2019-08-04.
- ^ "Working Draft, Standard for Programming Language C++ (Annex C, §C.1)" (PDF). Archived (PDF) from the original on 2020-04-27. Retrieved 2020-11-18.
- ^ a b "P1161R2: Deprecate uses of the comma operator in subscripting expressions". www.open-std.org. Archived from the original on 2019-07-20. Retrieved 2019-07-20.
- ^ "C++ Extensions for Parallelism Version 2". Archived (PDF) from the original on 2022-09-21. Retrieved 2019-07-09.
- ^ "Task Blocks". Archived from the original on 2017-09-19. Retrieved 2017-07-23.
- ^ "C++ Extensions for Reflection". Archived (PDF) from the original on 2022-09-21. Retrieved 2019-07-09.
- ^ "C++ Extensions for Networking". Archived (PDF) from the original on 2022-09-21. Retrieved 2019-07-09.
- ^ Sutter, Herb (2019-07-20). "Trip report: Summer ISO C++ standards meeting (Cologne)". Sutter's Mill. Archived from the original on 2020-04-17. Retrieved 2019-07-21.
- ^ "Reflections on the reflection proposals - Meeting C++". meetingcpp.com. Archived from the original on 2017-06-23. Retrieved 2017-06-30.
- ^ "Static reflection". www.open-std.org. Archived from the original on 2020-02-22. Retrieved 2018-11-10.
- ^ Herb Sutter. "Metaclasses" (PDF). Archived (PDF) from the original on 2020-11-11. Retrieved 2017-07-23.
- ^ "A Unified Executors Proposal for C++". www.open-std.org. Archived from the original on 2020-02-20. Retrieved 2019-02-24.
- ^ "N4771: Working Draft, C++ Extensions for Networking" (PDF). Archived (PDF) from the original on 2020-04-19. Retrieved 2019-03-23.
- ^ "ISO/IEC TS 19216:2018 Programming Languages -- C++ Extensions for Networking". Archived from the original on 2019-01-15. Retrieved 2018-12-17.
- ^ "A General Property Customization Mechanism". www.open-std.org. Archived from the original on 2020-01-19. Retrieved 2019-02-24.
- ^ "A Unified Futures Proposal for C++". Archived from the original on 2022-09-21. Retrieved 2019-07-08.
- ^ "C++ compiler support - cppreference.com". en.cppreference.com. Archived from the original on 2022-08-08. Retrieved 2022-08-12.
- ^ jawiddis. "Visual Studio 2019 version 16.10 Release Notes". docs.microsoft.com. Archived from the original on 2021-08-11. Retrieved 2021-07-13.
- ^ "MSVC C++20 and the /std:c++20 Switch". docs.microsoft.com. 2 September 2021. Archived from the original on 2021-09-06. Retrieved 2021-09-07.
- ^ Visual Studio documentation for Microsoft C++, Microsoft Docs, 2022-04-19, archived from the original on 2022-04-19, retrieved 2022-04-19
- ^ "Visual Studio 2019 Compatibility". docs.microsoft.com. Archived from the original on 2020-06-03. Retrieved 2022-08-12.
- ^ "Clang - C++ Programming Language Status". clang.llvm.org. Archived from the original on 2013-07-04. Retrieved 2022-04-19.
- ^ "C++ compiler support - cppreference.com". en.cppreference.com. Archived from the original on 2020-10-03. Retrieved 2020-10-10.
- ^ "Andrew Sutton - [PATCH] Add -std=c++2a". gcc.gnu.org. Archived from the original on 2021-03-01. Retrieved 2022-04-19.
- ^ "C++ Standards Support in GCC - GNU Project". gcc.gnu.org. Archived from the original on 2022-04-20. Retrieved 2022-04-19.
- ^ Herb Sutter (15 July 2017). "Trip report: Summer ISO C++ standards meeting (Toronto)". Archived from the original on 2017-08-06. Retrieved 2017-07-16.
- ^ Andrew Sutton; Bjarne Stroustrup (2013-02-24). "Concepts Lite: Constraining Templates with Predicates". isocpp.org. isocpp.org. Archived from the original on 2021-01-16. Retrieved 2021-01-13.
- ^ Herb Sutter (11 November 2017). "Trip report: Fall ISO C++ standards meeting (Albuquerque)". Archived from the original on 2019-02-13. Retrieved 2017-12-04.
- ^ Smith, Richard; Perchik, Dawn; Köppe, Thomas. "N4714 Editors' Report -- Programming Languages -- C++". C++ standards drafts. GitHub. Archived from the original on 21 September 2022. Retrieved 27 December 2018.
- ^ Botond Ballo (28 March 2018). "Trip Report: C++ Standards Meeting in Jacksonville, March 2018". Archived from the original on 2019-05-18. Retrieved 2019-05-18.
- ^ Herb Sutter (2 July 2018). "Trip report: Summer ISO C++ standards meeting (Rapperswil)". Archived from the original on 2020-05-23. Retrieved 2018-11-10.
- ^ "Support for contract based programming in C++". www.open-std.org. Archived from the original on 2020-01-15. Retrieved 2018-11-10.
- ^ fall meeting in November 2018
- ^ "P1289R0 - Access control in contract conditions" (PDF). Archived (PDF) from the original on 2018-11-11. Retrieved 2018-11-11.
- ^ winter meeting in February 2019
- ^ "r/cpp - 2019-02 Kona ISO C++ Committee Trip Report (C++20 design is complete; Modules in C++20; Coroutines in C++20; Reflection TS v1 published; work begins on a C++ Ecosystem Technical Report)". reddit. Archived from the original on 2019-02-23. Retrieved 2019-02-24.
- ^ "Trip report: Winter ISO C++ standards meeting (Kona)". Sutter's Mill. 2019-02-23. Archived from the original on 2019-02-24. Retrieved 2019-02-24.
- ^ "2019 Cologne Meeting Invitation and Information" (PDF).
- ^ "r/cpp - 2019-07 Cologne ISO C++ Committee Trip Report — 🚀 The C++20 Eagle has Landed 🚀 (C++20 Committee Draft shipped; Contracts Moved From C++20 to a Study Group; 'std::format' in C++20; C++20 Synchronization Library)". reddit. Archived from the original on 2020-04-20. Retrieved 2019-09-15.
- ^ Botond Ballo. "Trip Report: C++ Standards Meeting in Cologne, July 2019". Archived from the original on 2020-02-26. Retrieved 2019-08-05.
- ^ Sutter, Herb. "Trip report: Summer ISO C++ standards meeting (Cologne)". Archived from the original on 2020-04-17. Retrieved 2019-07-21.
- ^ Josuttis, Nicolai. "P1823R0: Remove Contracts from C++20" (PDF). Archived (PDF) from the original on 2020-08-13. Retrieved 2019-08-20.
- ^ "Permitting trivial default initialization in constexpr contexts" (PDF). Archived (PDF) from the original on 2020-10-19. Retrieved 2019-07-20.
- ^ "P1668R1: Enabling Constexpr Intrinsics By Permitting Unevaluated inline-asm in Constexpr Functions". www.open-std.org. Archived from the original on 2020-01-19. Retrieved 2019-07-20.
- ^ "P1186R3: When do you actually use <=>?". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1630R1: Spaceship needs a tune-up". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1766R1: Mitigating minor modules maladies". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1452R2: On the non-uniform semantics of return-type-requirements". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1771R1: nodiscard for constructors" (PDF). www.open-std.org. 2019-07-20. Archived (PDF) from the original on 2022-09-21. Retrieved 2019-07-20.
- ^ "P1754R1: Rename concepts to standard_case for C++20, while we still can" (PDF). www.open-std.org. 2019-07-20. Archived (PDF) from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P0645R10: Text Formatting". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "std::format in C++20". www.zverovich.net. 2019-07-23. Archived from the original on 2019-07-23. Retrieved 2019-09-15.
- ^ "P1361R2: Integration of chrono with text formatting" (PDF). www.open-std.org. 2019-07-20. Archived (PDF) from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1652R1: Printf corner cases in std::format". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1965R2: constexpr INVOKE". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P0631R8: Math Constants" (PDF). www.open-std.org. 2019-07-20. Archived (PDF) from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1643R1: Add wait/notify to atomic_ref<T>". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1664R0: Add wait/notify to atomic<shared_ptr<T>>". www.open-std.org. 2019-07-20. Archived from the original on 2021-11-05. Retrieved 2019-07-20.
- ^ "P1614R2: The Mothership has Landed - Adding <=> to the Library". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1502R1: Standard library header units for C++20". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P1135R6: The C++20 Synchronization Library". www.open-std.org. 2019-07-20. Archived from the original on 2019-08-20. Retrieved 2019-07-20.
- ^ "P0514R4: Efficient concurrent waiting for C++20" (PDF). Archived (PDF) from the original on 2018-08-18. Retrieved 2019-07-20.
- ^ "P0666R2: Revised Latches and Barriers for C++20" (PDF). Archived (PDF) from the original on 2018-08-18. Retrieved 2019-07-20.
- ^ "P0995R1: Improving atomic_flag". Archived from the original on 2019-07-20. Retrieved 2019-07-20.
- ^ "P1285R0: Don't Make C++ Unimplementable On Small CPUs". Archived from the original on 2019-07-15. Retrieved 2019-07-20.
- ^ "P1208R6: Adopt source_location from Library Fundamentals V3 for C++20" (PDF). Archived (PDF) from the original on 2019-08-20. Retrieved 2019-08-20.
- ^ "P0980R1: Making std::string constexpr" (PDF). Archived (PDF) from the original on 2020-09-29. Retrieved 2020-07-30.
- ^ "P1004R2: Making std::vector constexpr" (PDF). Archived (PDF) from the original on 2020-09-28. Retrieved 2020-07-30.
- ^ "P0660R10: Stop Token and Joining Thread" (PDF). Archived (PDF) from the original on 2019-08-20. Retrieved 2019-08-20.
- ^ fall meeting in November 2019
- ^ "r/cpp - 2019-11 Belfast ISO C++ Committee Trip Report — Started Processing Feedback on the C++20 Committee Draft; ABI Review Group Formed". reddit. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ Sutter, Herb (2019-11-09). "Trip report: Autumn ISO C++ standards meeting (Belfast)". Sutter's Mill. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ botondballo (2019-11-15). "Trip Report: C++ Standards Meeting in Belfast, November 2019". There's Waldo!. Archived from the original on 2019-11-20. Retrieved 2019-11-24.
- ^ "P1907R0: Inconsistencies with non-type template parameters". www.open-std.org. 2019-10-07. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P1714: NTTP are incomplete without float, double, and long double! (Revision 1)". www.open-std.org. 2019-07-19. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P1855R=: Make <compare> freestanding". www.open-std.org. 2019-10-05. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P1872R0: span should have size_type not index_type" (PDF). www.open-std.org. 2019-09-16. Archived (PDF) from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P1456: Move-only views" (PDF). www.open-std.org. 2019-01-25. Archived (PDF) from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P1391: Range constructor for std::string_view" (PDF). www.open-std.org. Archived (PDF) from the original on 2020-01-04. Retrieved 2019-11-09.
- ^ "P1394: Range constructor for std::span" (PDF). www.open-std.org. 2019-08-02. Archived (PDF) from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P1870R1: forwarding-range<T> is too subtle". www.open-std.org. 6 October 2019. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "P0883: Fixing Atomic Initialization" (PDF). www.open-std.org. 2018-06-05. Archived (PDF) from the original on 2019-11-09. Retrieved 2019-11-09.
- ^ "Missing feature-test macros 2018-2019". www.open-std.org. 2019-10-06. Archived from the original on 2019-11-09. Retrieved 2019-11-09.
External links
- Link to purchase ISO/IEC 14882:2020 from the ISO online store.
- N4860, the final draft version of the standard.
- JTC1/SC22/WG21 – the ISO/IEC C++ Standard Working Group (a.k.a. the C++ Standards Committee)
- Ranges (range-v3) GitHub repository, by Eric Niebler