SUPPORT THE WORK

GetWiki

C++20

ARTICLE SUBJECTS
aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
critical  →
discussion  →
forked  →
imported  →
original  →
C++20
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{Short description|2020 edition of the C++ programming language standard}}{hide}multiple issues|
{{prose|date=December 2020{edih}
{{primary sources|date=December 2020}}
{{Cleanup|reason=Article reads like a |date=February 2023}}}}{{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, and was later replaced by C++23.WEB, The Standard,weblink isocpp.org, 7 September 2020, 19 September 2020,weblink live, The standard was technically finalizedWEB,weblink P1000R3: C++ IS schedule, Sutter, Herb, 2019-10-01, 2020-02-13, 2019-11-14,weblink" title="web.archive.org/web/20191114141143weblink">weblink live, by WG21 at the meeting in Prague in February 2020,WEB,weblink N4817: 2020 Prague Meeting Invitation and Information, Dusíková, Hana, 2019-11-06, live,weblink" title="web.archive.org/web/20191229102449weblink">weblink 2019-12-29, 2020-02-13, had its final draft version announced in March 2020,WEB,weblink N4859 Editors' Report -- Programming Languages -- C++, 2023-09-22,weblink 2022-12-09, live, was approved on 4 September 2020,WEB, Current Status,weblink isocpp.org, 7 September 2020, 8 September 2020,weblink live, WEB, C++20 Approved -- Herb Sutter,weblink isocpp.org, 8 September 2020, 11 September 2020,weblink live, and published in December 2020.WEB,weblink ISO/IEC 14882:2020, 2020-12-16, 2020-12-16,weblink live,

Features

C++20 adds more new major features than C++14 or C++17.WEB,weblink Why does the C++ standard ship every three years?, 13 July 2019, 19 July 2019, 13 July 2019,weblink live, Changes that have been accepted into C++20 include:WEB,weblink P0592R0: To boldly suggest an overall plan for C++20, 2017-05-06, 2017-03-08,weblink" title="web.archive.org/web/20170308143910weblink">weblink live,

Language

  • concepts,WEB,weblink P0606R0: Concepts Are Ready, 2017-05-06, 2017-03-28,weblink" title="web.archive.org/web/20170328144243weblink">weblink live, with terse syntaxWEB,weblink P1141R1 - Yet another approach for constrained declarations, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133625weblink">weblink live,
  • modulesWEB,weblink N4720: Working Draft, Extensions to C++ for Modules, 2019-04-30, 2019-04-30,weblink live,
  • designated initializersWEB,weblink Designated Initialization Wording, Tim Shen, Richard Smith, 2017-07-16, 2017-10-15,weblink live, (based on the C99 feature, and common g++ extension)
  • [=, this] as a lambda captureWEB,weblink Allow lambda capture [=, this], Thomas Köppe, 2017-07-16, 2019-02-09,weblink live,
  • template parameter lists on lambdasWEB,weblink Familiar template syntax for generic lambdas, 2017-07-16, 2018-11-21,weblink live,
  • three-way comparison using the "spaceship operator", operator <=>
  • initialization of an additional variable within a range-based for statementWEB,weblink Range-based for statements with initializer, 2019-10-30, 2017-04-06,weblink" title="web.archive.org/web/20170406231710weblink">weblink live,
  • lambdas in unevaluated contextsNEWS,weblink Trip Report: C++ Standards Meeting in Albuquerque, November 2017, 2017-11-20, There's Waldo!, 2017-12-11, en-US, 2017-12-11,weblink live, WEB,weblink Wording for lambdas in unevaluated contexts, 2017-12-11, 2017-12-12,weblink" title="web.archive.org/web/20171212031428weblink">weblink live,
  • default constructible and assignable stateless lambdasWEB,weblink Default constructible and assignable stateless lambdas, 2017-12-11, 2017-12-12,weblink" title="web.archive.org/web/20171212031425weblink">weblink live,
  • allow pack expansions in lambda init-captureWEB,weblink Pack expansion in lambda init-capture, www.open-std.org, 2017-12-11, 2020-02-14,weblink" title="web.archive.org/web/20200214081039weblink">weblink live,
  • class types in non-type template parameters, also allowing string literals as template parametersWEB,weblink Class Types in Non-Type Template Parameters, 2018-06-06, www.open-std.org, 2022-02-18, 2022-02-05,weblink" title="web.archive.org/web/20220205083651weblink">weblink live,
  • removing the need for typename in certain circumstancesWEB,weblink Down with typename!, Nina Ranns, Daveed Vandevoorde, 2019-05-18, 2018-04-22,weblink" title="web.archive.org/web/20180422180216weblink">weblink live,
  • new standard attributes no_unique_address,WEB,weblink Language support for empty objects, 2019-08-04, 2018-04-17,weblink" title="web.archive.org/web/20180417180340weblink">weblink live, likely and unlikelyWEB,weblink Proposed wording for likely and unlikely attributes (Revision 5), 2019-05-18, 2018-05-13,weblink" title="web.archive.org/web/20180513080343weblink">weblink live,
  • conditional explicit, allowing the explicit modifier to be contingent on a boolean expressionWEB,weblink explicit(bool), www.open-std.org, 2018-11-13, 2018-07-20,weblink" title="web.archive.org/web/20180720061629weblink">weblink live,
  • expanded constexpr: virtual functions,WEB,weblink Allowing Virtual Function Calls in Constant Expressions, www.open-std.org, 2019-03-11, 2018-06-11,weblink" title="web.archive.org/web/20180611142757weblink">weblink live, union,WEB,weblink P1330R0 - Changing the active member of a union inside constexpr, 2019-07-26, 2019-07-26,weblink live, try and catch,WEB,weblink P1002R0 - Try-catch blocks in constexpr functions, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133628weblink">weblink live, dynamic_cast and typeid,WEB,weblink P1327R0 - Allowing dynamic_cast, polymorphic typeid in Constant Expressions, 2019-07-26, 2019-07-26,weblink live, std::pointer_traitsWEB,weblink P1006R1 - Constexpr in std::pointer_traits, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133625weblink">weblink live,
  • immediate functions using the new consteval keywordWEB,weblink P1073R2 - Immediate functions, 2018-11-11, 2018-10-26,weblink" title="web.archive.org/web/20181026124307weblink">weblink live,
  • signed integers are now defined to be represented using two's complement (signed integer overflow remains undefined behavior)WEB,weblink P1236R0: Alternative Wording for P0907R4 Signed Integers are Two's Complement, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133642weblink">weblink live,
  • a revised memory modelWEB,weblink P0668R4: Revising the C++ memory model, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133634weblink">weblink live,
  • various improvements to structured bindings (interaction with lambda captures, static and thread_local storage duration)WEB,weblink P1091R1: Extending structured bindings to be more like variable declarations, www.open-std.org, 2019-02-24, 2019-01-26,weblink" title="web.archive.org/web/20190126105655weblink">weblink live, WEB,weblink P1091R2: Extending structured bindings to be more like variable declarations, www.open-std.org, 2019-02-24, 2019-01-26,weblink" title="web.archive.org/web/20190126112016weblink">weblink live,
  • coroutinesWEB,weblink N4649: Working Draft, Technical Specification for C++ Extensions for Coroutines, 2017-05-06, 2017-05-16,weblink" title="web.archive.org/web/20170516185504weblink">weblink live,
  • using on scoped enums
  • constinit keywordWEB,weblink P1143R2: Adding the constinit keyword, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001957weblink">weblink live,

Library

  • ranges (The One Ranges Proposal)WEB,weblink P0896R3, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133612weblink">weblink live,
  • std::make_shared and std::allocate_shared for arraysWEB,weblink Extending make_shared to Support Arrays, 2020-02-12, 2017-09-06,weblink" title="web.archive.org/web/20170906070027weblink">weblink live,
  • atomic smart pointers (such as std::atomic and std::atomic)WEB, Meredith, Alisdair, Sutter, Herb, Revising atomic_shared_ptr for C++20,weblink JTC1/SC22/WG21 - The C++ Standards Committee - ISOCPP, International Organization for Standardization, ISO, 27 December 2018, 4 January 2018,weblink" title="web.archive.org/web/20180104184159weblink">weblink live,
  • std::to_address to convert a pointer to a raw pointerWEB,weblink Utility to convert a pointer to a raw pointer, 2020-02-12, 2018-02-20,weblink" title="web.archive.org/web/20180220012525weblink">weblink live,
  • calendar and time-zone additions to WEB,weblink Extending to Calendars and Time Zones, Howard E. Hinnant, Tomasz KamiÅ„ski, 2019-05-18, 2018-05-13,weblink" title="web.archive.org/web/20180513074927weblink">weblink live,
  • std::span, providing a view to a contiguous array (analogous to std::string_view but span can mutate the referenced sequence)WEB,weblink span: bounds-safe views for sequences of objects, Neil MacIntosh, Stephan T. Lavavej, 2019-05-18, 2019-05-18,weblink" title="web.archive.org/web/20190518102826weblink">weblink live,
  • std::erase and std::erase_if, simplifying element erasure for most standard containersWEB,weblink Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20, 2018-10-04, Alisdair Meredith, Stephan T. Lavavej, 2020-12-14, 2021-03-08,weblink" title="web.archive.org/web/20210308123055weblink">weblink live,
  • headerWEB,weblink Alan Talbot, 2019-05-18, 2019-05-18,weblink" title="web.archive.org/web/20190518102900weblink">weblink live,
  • std::bit_cast for type casting of object representations, with less verbosity than memcpy() and more ability to exploit compiler internalsWEB,weblink Bit-casting object representations, www.open-std.org, 2018-11-10, 2018-08-18,weblink" title="web.archive.org/web/20180818190426weblink">weblink live,
  • feature test macrosWEB,weblink Integrating feature-test macros into the C++ WD (rev. 2), www.open-std.org, 2018-11-10, 2018-07-20,weblink" title="web.archive.org/web/20180720144603weblink">weblink live,
  • various constexpr library bitsWEB,weblink P1032R1 - Misc constexpr bits, 2018-11-11, 2018-10-26,weblink" title="web.archive.org/web/20181026124238weblink">weblink live,
  • smart pointer creation with default initializationWEB,weblink Smart pointer creation with default initialization, 2020-02-12, 2019-01-26,weblink" title="web.archive.org/web/20190126111714weblink">weblink live,
  • contains-method for associative containersWEB, P0458R2: Checking for Existence of an Element in Associative Containers,weblink Mikhail Maltsev, 2022-01-02, 2022-01-16,weblink live,
  • bit operations, such as leading/trailing zero/one count, and log2 operationsWEB,weblink P0556R3: Integral power-of-2 operations, 2018-06-06, www.open-std.org, 2020-08-08, 2019-06-26,weblink live, WEB,weblink P1355R2 Exposing a narrow contract for ceil2, 2019-06-11, www.open-std.org, 2020-08-08, 2019-08-05,weblink" title="web.archive.org/web/20190805104347weblink">weblink live, WEB,weblink On the names of low-level bit manipulation functions, 2020-02-11, www.open-std.org, 2020-08-08, 2020-03-24,weblink" title="web.archive.org/web/20200324173059weblink">weblink live,
  • std::bind_frontWEB,weblink Simplified partial function application, Tomasz KamiÅ„ski, 2017-11-09, 2020-11-08, 2020-09-28,weblink" title="web.archive.org/web/20200928182706weblink">weblink live,

New and changed keywords

Many new keywords added (and the new "spaceship operator", operator <=>), such as concept, constinit, consteval, co_await, co_return, co_yield, requires (plus changed meaning for export), and char8_t (for UTF-8 support).WEB,weblink C++ keywords - cppreference.com, en.cppreference.com, 2019-08-04, 2012-03-19,weblink live, And explicit can take an expression since C++20.WEB,weblink explicit specifier - cppreference.com, en.cppreference.com, 2019-08-04, 2012-02-21,weblink live, Most of the uses of the volatile keyword have been deprecated.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_addressWEB,weblink attribute specifier sequence(since C++11) - cppreference.com, en.cppreference.com, 2019-08-04, 2012-07-05,weblink live,

Removed and deprecated

Removed features:WEB,weblink Working Draft, Standard for Programming Language C++ (Annex C, §C.1), 2020-11-18, 2020-04-27,weblink" title="web.archive.org/web/20200427145844weblink">weblink live,
  • The C-derived headers , , , and were removed, as they serve no purpose in C++. (The corresponding 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 and std::result_of_t.
Deprecated features:
  • Use of comma operator in subscript expressions has been deprecated
  • (most of) volatile has been deprecated

Published as Technical Specifications

  • Parallelism TS v2WEB,weblink C++ Extensions for Parallelism Version 2, 2019-07-09, 2022-09-21,weblink live, (including task blocksWEB,weblink Task Blocks, 3 March 2017, 2017-07-23, 2017-09-19,weblink" title="web.archive.org/web/20170919141316weblink">weblink live, )
  • Reflection TS v1WEB,weblink C++ Extensions for Reflection, 2019-07-09, 2022-09-21,weblink live,
  • Networking TS v1WEB,weblink C++ Extensions for Networking, 2019-07-09, 2022-09-21,weblink live,

Deferred to a later standard

  • Contracts{{snd}} a new study group (SG21) has been formed to work on a new proposalWEB,weblink Trip report: Summer ISO C++ standards meeting (Cologne), Sutter, Herb, 2019-07-20, Sutter's Mill, en, 2019-07-21, 2020-04-17,weblink live,
  • ReflectionWEB,weblink Reflections on the reflection proposals - Meeting C++, meetingcpp.com, en, 2017-06-30, 2017-06-23,weblink" title="web.archive.org/web/20170623034739weblink">weblink live, WEB,weblink Static reflection, www.open-std.org, 2018-11-10, 2020-02-22,weblink" title="web.archive.org/web/20200222002039weblink">weblink live,
  • MetaclassesWEB,weblink Metaclasses, Herb Sutter, 2017-07-23, 2020-11-11,weblink" title="web.archive.org/web/20201111204111weblink">weblink live,
  • ExecutorsWEB,weblink A Unified Executors Proposal for C++, www.open-std.org, 2019-02-24, 2020-02-20,weblink" title="web.archive.org/web/20200220055757weblink">weblink live,
  • Networking extensions,WEB,weblink N4771: Working Draft, C++ Extensions for Networking, 2019-03-23, 2020-04-19,weblink" title="web.archive.org/web/20200419011113weblink">weblink live, WEB,weblink ISO/IEC TS 19216:2018 Programming Languages -- C++ Extensions for Networking, 2018-12-17, 2019-01-15,weblink live, including async, basic I/O services, timers, buffers and buffer-oriented streams, sockets, and Internet protocols (blocked by executors)
  • PropertiesWEB,weblink A General Property Customization Mechanism, www.open-std.org, 2019-02-24, 2020-01-19,weblink" title="web.archive.org/web/20200119114436weblink">weblink live,
  • Extended futuresWEB,weblink A Unified Futures Proposal for C++, 2019-07-08, 2022-09-21,weblink live,

Compiler support

Full supportWEB, C++ compiler support - cppreference.com,weblink 2022-08-12, en.cppreference.com, 2022-08-08,weblink live,
  • Visual Studio 2019 supports all C++20 features through its /std:c++latest option, as of version 16.10.0.WEB, jawiddis, Visual Studio 2019 version 16.10 Release Notes,weblink 2021-07-13, docs.microsoft.com, en-us, 2021-08-11,weblink live, An option /std:c++20 to enable C++20 mode is added in version 16.11.0.WEB, MSVC C++20 and the /std:c++20 Switch,weblink 2021-09-07, docs.microsoft.com, 2 September 2021, en-us, 2021-09-06,weblink live, {{Citation |title=Visual Studio documentation for Microsoft C++ |date=2022-04-19 |url=https://github.com/MicrosoftDocs/cpp-docs/blob/578dd21279a897661686617375dff80f1eb2f40c/docs/overview/cpp-conformance-improvements.md |publisher=Microsoft Docs |access-date=2022-04-19 |archive-date=2022-04-19 |archive-url=https://web.archive.org/web/20220419161220weblink |url-status=live }}
Microsoft's compiler does not just support Windows, also Linux (and e.g. Android and iOS), while it then requires the "Visual C++ for Linux Development extension".WEB, Visual Studio 2019 Compatibility,weblink 2022-08-12, docs.microsoft.com, en-us, 2020-06-03,weblink live, 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).WEB, Clang - C++ Programming Language Status,weblink 2022-04-19, clang.llvm.org, 2013-07-04,weblink" title="web.archive.org/web/20130704124639weblink">weblink live,
  • EDG started implementing C++20 features in version 5.0 and as of version 6.1 supports most C++20 core language features.WEB, C++ compiler support - cppreference.com,weblink en.cppreference.com, 2020-10-10, 2020-10-03,weblink live,
  • GCC added partial, experimental C++20 support in 2017WEB, Andrew Sutton - [PATCH] Add -std=c++2a,weblink 2022-04-19, gcc.gnu.org, 2021-03-01,weblink live, 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.WEB, C++ Standards Support in GCC - GNU Project,weblink 2022-04-19, gcc.gnu.org, 2022-04-20,weblink live,

History

Changes applied to the C++20 working draft in July 2017 (Toronto) include:WEB,weblink Trip report: Summer ISO C++ standards meeting (Toronto), Herb Sutter, 15 July 2017, 2017-07-16, 2017-08-06,weblink live,
  • concepts (what made it into the standard is a cut-down version; also described as "Concepts Lite"WEB, Concepts Lite: Constraining Templates with Predicates,weblink isocpp.org, 2013-02-24, Andrew Sutton, Bjarne Stroustrup, 2021-01-13, 2021-01-16,weblink live, )
  • designated initializers
  • [=, this] as a lambda capture
  • template parameter lists on lambdas
  • std::make_shared and std::allocate_shared for arrays
Changes applied to the C++20 working draft in the fall meeting in November 2017 (Albuquerque) include:WEB,weblink Trip report: Fall ISO C++ standards meeting (Albuquerque), Herb Sutter, 11 November 2017, 2017-12-04, 2019-02-13,weblink live, WEB, Smith, Richard, Perchik, Dawn, Köppe, Thomas, N4714 Editors' Report -- Programming Languages -- C++,weblink C++ standards drafts, GitHub, 27 December 2018, 21 September 2022,weblink live,
  • 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 and std::atomic)
  • std::to_address to convert a pointer to a raw pointer
Changes applied to the C++20 working draft in March 2018 (Jacksonville) include:WEB,weblink Trip Report: C++ Standards Meeting in Jacksonville, March 2018, Botond Ballo, 28 March 2018, 2019-05-18, 2019-05-18,weblink live,
  • removing the need for typename in certain circumstances
  • new standard attributes no_unique_address, likely and unlikely
  • calendar and time-zone additions to
  • std::span, providing a view to a contiguous array (analogous to std::string_view but span can mutate the referenced sequence)
  • header
Changes applied to the C++20 working draft in the summer meeting in June 2018 (Rapperswil) include:WEB,weblink Trip report: Summer ISO C++ standards meeting (Rapperswil), Herb Sutter, 2 July 2018, 2018-11-10, 2020-05-23,weblink live,
  • contracts (later deferred to a later standard)WEB,weblink Support for contract based programming in C++, www.open-std.org, 2018-11-10, 2020-01-15,weblink" title="web.archive.org/web/20200115232059weblink">weblink live,
  • 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:fall meeting in November 2018
  • ranges (The One Ranges Proposal)
  • concept terse syntax
  • constexpr union, try and catch, dynamic_cast, typeid and std::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)WEB,weblink P1289R0 - Access control in contract conditions, 2018-11-11, 2018-11-11,weblink" title="web.archive.org/web/20181111133631weblink">weblink live, (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:winter meeting in February 2019WEB,weblink 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, 23 February 2019, en, 2019-02-24, 2019-02-23,weblink live, WEB,weblink Trip report: Winter ISO C++ standards meeting (Kona), 2019-02-23, Sutter's Mill, en, 2019-02-24, 2019-02-24,weblink live,
  • coroutines
  • modules
  • various improvements to structured bindings (interaction with lambda captures, static and thread_local storage duration)
Changes applied to the C++20 working draft in the summer meeting in July 2019 (Cologne) include:WEB,weblink 2019 Cologne Meeting Invitation and Information, WEB,weblink 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, 20 July 2019, en, 2019-09-15, 2020-04-20,weblink live, WEB,weblink Trip Report: C++ Standards Meeting in Cologne, July 2019, Botond Ballo, 26 July 2019, 2019-08-05, 2020-02-26,weblink live, WEB,weblink Trip report: Summer ISO C++ standards meeting (Cologne), Sutter, Herb, 20 July 2019, 2019-07-21, 2020-04-17,weblink live,
  • contracts were removed (see list of features deferred to a later standard)WEB,weblink P1823R0: Remove Contracts from C++20, Josuttis, Nicolai, 2019-08-20, 2020-08-13,weblink" title="web.archive.org/web/20200813202348weblink">weblink live,
  • use of comma operator in subscript expressions has been deprecatedWEB,weblink P1161R2: Deprecate uses of the comma operator in subscripting expressions, www.open-std.org, 2019-07-20, 2019-07-20,weblink" title="web.archive.org/web/20190720101000weblink">weblink live,
  • constexpr additions (trivial default initialization,WEB,weblink Permitting trivial default initialization in constexpr contexts, 2019-07-20, 2020-10-19,weblink" title="web.archive.org/web/20201019233314weblink">weblink live, unevaluated inline-assemblyWEB,weblink P1668R1: Enabling Constexpr Intrinsics By Permitting Unevaluated inline-asm in Constexpr Functions, www.open-std.org, 2019-07-20, 2020-01-19,weblink" title="web.archive.org/web/20200119114611weblink">weblink live, )
  • using scoped enumsWEB,weblink P1099R5: Using Enum, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001959weblink">weblink live,
  • various changes to the spaceship operatorWEB,weblink P1186R3: When do you actually use ?, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001956weblink">weblink live, WEB,weblink P1630R1: Spaceship needs a tune-up, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001956weblink">weblink live,
  • DR: minor changes to modulesWEB,weblink P1766R1: Mitigating minor modules maladies, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820002001weblink">weblink live,
  • constinit keyword
  • changes to concepts (removal of -> Type return-type-requirementsWEB,weblink P1452R2: On the non-uniform semantics of return-type-requirements, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001954weblink">weblink live, )
  • (most of) volatile has been deprecatedWEB,weblink P1152R4: Deprecating volatile, 2019-07-20, www.open-std.org, 2019-07-20, 2019-06-23,weblink" title="web.archive.org/web/20190623042109weblink">weblink live,
  • DR: nodiscard effects on constructorsWEB,weblink P1771R1: nodiscard for constructors, 2019-07-20, www.open-std.org, 2019-07-20, 2022-09-21,weblink live,
  • The new standard library concepts will not use PascalCase (rather standard_case, as the rest of the standard library)WEB,weblink P1754R1: Rename concepts to standard_case for C++20, while we still can, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001957weblink">weblink live,
  • text formatting (std::format, WEB,weblink P0645R10: Text Formatting, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820002001weblink">weblink live, WEB,weblink std::format in C++20, 2019-07-23, www.zverovich.net, 2019-09-15, 2019-07-23,weblink" title="web.archive.org/web/20190723193126weblink">weblink live, chrono integration,WEB,weblink P1361R2: Integration of chrono with text formatting, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820002000weblink">weblink live, corner case fixesWEB,weblink P1652R1: Printf corner cases in std::format, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001955weblink">weblink live, )
  • bit operationsWEB,weblink P0553R4: Bit operations, 2019-07-20, www.open-std.org, 2019-07-20, 2019-07-20,weblink" title="web.archive.org/web/20190720101004weblink">weblink live,
  • constexpr INVOKEWEB,weblink P1965R2: constexpr INVOKE, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001957weblink">weblink live,
  • math constantsWEB,weblink P0631R8: Math Constants, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001958weblink">weblink live,
  • consistency additions to atomics (std::atomic_ref,WEB,weblink P1643R1: Add wait/notify to atomic_ref, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001955weblink">weblink live, std::atomicWEB,weblink P1664R0: Add wait/notify to atomic, 2019-07-20, www.open-std.org, 2019-07-20, 2021-11-05,weblink" title="web.archive.org/web/20211105153653weblink">weblink live, )
  • add the operator to the standard libraryWEB,weblink P1614R2: The Mothership has Landed - Adding to the Library, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820002002weblink">weblink live,
  • header units for the standard libraryWEB,weblink P1502R1: Standard library header units for C++20, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001955weblink">weblink live,
  • synchronization facilitiesWEB,weblink P1135R6: The C++20 Synchronization Library, 2019-07-20, www.open-std.org, 2019-07-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001959weblink">weblink live, (merged from: Efficient atomic waiting and semaphores,WEB,weblink P0514R4: Efficient concurrent waiting for C++20, 2019-07-20, 2018-08-18,weblink" title="web.archive.org/web/20180818190437weblink">weblink live, latches and barriers,WEB,weblink P0666R2: Revised Latches and Barriers for C++20, 2019-07-20, 2018-08-18,weblink" title="web.archive.org/web/20180818190352weblink">weblink live, Improving atomic_flag,WEB,weblink P0995R1: Improving atomic_flag, 2019-07-20, 2019-07-20,weblink" title="web.archive.org/web/20190720101004weblink">weblink live, Don't Make C++ Unimplementable On Small CPUsWEB,weblink P1285R0: Don't Make C++ Unimplementable On Small CPUs, 2019-07-20, 2019-07-15,weblink" title="web.archive.org/web/20190715230819weblink">weblink live, )
  • std::source_locationWEB,weblink P1208R6: Adopt source_location from Library Fundamentals V3 for C++20, 2019-08-20, 2019-08-20,weblink" title="web.archive.org/web/20190820002002weblink">weblink live,
  • constexpr containers (std::string,WEB,weblink P0980R1: Making std::string constexpr, 2020-07-30, 2020-09-29,weblink" title="web.archive.org/web/20200929222645weblink">weblink live, std::vectorWEB,weblink P1004R2: Making std::vector constexpr, 2020-07-30, 2020-09-28,weblink" title="web.archive.org/web/20200928192253weblink">weblink live, )
  • std::stop_token and joining thread (std::jthread)WEB,weblink P0660R10: Stop Token and Joining Thread, 2019-08-20, 2019-08-20,weblink" title="web.archive.org/web/20190820001959weblink">weblink live,
Changes applied during the NB comment resolution in the fall meeting in November 2019 (Belfast) include:fall meeting in November 2019WEB,weblink r/cpp - 2019-11 Belfast ISO C++ Committee Trip Report — Started Processing Feedback on the C++20 Committee Draft; ABI Review Group Formed, reddit, 9 November 2019, en-US, 2019-11-09, 2019-11-09,weblink live, WEB,weblink Trip report: Autumn ISO C++ standards meeting (Belfast), Sutter, Herb, 2019-11-09, Sutter's Mill, en, 2019-11-09, 2019-11-09,weblink live, WEB,weblink Trip Report: C++ Standards Meeting in Belfast, November 2019, botondballo, 2019-11-15, There's Waldo!, en, 2019-11-24, 2019-11-20,weblink live,
  • 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 from operator==.WEB,weblink P1907R0: Inconsistencies with non-type template parameters, 2019-10-07, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111420weblink">weblink live, This allows also for array members in class-type NTTP.
  • Floating-point types,WEB,weblink P1714: NTTP are incomplete without float, double, and long double! (Revision 1), 2019-07-19, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111421weblink">weblink live, 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
  • is now available in freestanding implementationsWEB,weblink P1855R=: Make freestanding, 2019-10-05, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111422weblink">weblink live,
  • std::spans typedef was changed from index_type to size_type to be consistent with the rest of the standard libraryWEB,weblink P1872R0: span should have size_type not index_type, 2019-09-16, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111423weblink">weblink live,
  • 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,WEB,weblink P1456: Move-only views, 2019-01-25, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111425weblink">weblink live, P1391R4: Range constructor for std::string_view (constructor from iterator-pair of characters),WEB,weblink P1391: Range constructor for std::string_view, www.open-std.org, 2019-11-09, 2020-01-04,weblink" title="web.archive.org/web/20200104215539weblink">weblink live, P1394R4: Range constructor for std::span,WEB,weblink P1394: Range constructor for std::span, 2019-08-02, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111421weblink">weblink live, P1870R1: forwarding-range is too subtleWEB,weblink P1870R1: forwarding-range is too subtle, 6 October 2019, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111421weblink">weblink live, )
  • Initialization for std::atomic has been changed to make it work with default and list initialization,WEB,weblink P0883: Fixing Atomic Initialization, 2018-06-05, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111419weblink">weblink live, std::latch and std::barrier can now report the maximum number of threads that the implementation supports through the new member function max()
  • std::weak_equality and std::strong_equality have been removed as they are not used anymore
  • Algorithms in have been made constexpr
  • Missing feature-test macros for new or changed features of C++20 have been addedWEB,weblink Missing feature-test macros 2018-2019, 2019-10-06, www.open-std.org, 2019-11-09, 2019-11-09,weblink" title="web.archive.org/web/20191109111423weblink">weblink live,

References

{{reflist}}

External links

{{C++ProLang}}{{ISO standards}}

- content above as imported from Wikipedia
- "C++20" does not exist on GetWiki (yet)
- time: 5:07am EDT - Sat, May 18 2024
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 23 MAY 2022
GETWIKI 09 JUL 2019
Eastern Philosophy
History of Philosophy
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
CONNECT