C++20
C++20 is the informal name for the revision of the ISO/IEC standard for the C++ programming language expected to follow C++17.[1] The C++ Standards Committee began planning C++20 in July 2017.[2] The current draft is N4750.[3]
Below is a partial list of changes that have been proposed or discussed for inclusion into C++20.[4]
Possible new language features
The following were voted into the C++20 draft in July 2017:[5]
- Concepts[6]
- Designated initializers[7] (based on the C99 feature)
[=, this]
as a lambda capture[8]- Template parameter lists on lambdas[9]
Features voted into C++20 in the fall meeting in November 2017 include:[10]
- Three-way comparison using the "spaceship operator",
operator <=>
- Initialization of an additional variable within a range-based
for
statement - Bit-casting of object representations, with less verbosity than
memcpy()
and more ability to exploit compiler internals - A specialization of
std::atomic
forstd::shared_ptr
- Lambdas in unevaluated contexts.[11][12]
- Default constructible and assignable stateless lambdas.[11][13]
- Allow pack expansions in lambda init-capture.[11][14]
- String literals as template parameters.[11][15]
Other possible new language features:
- Coroutines[16] – experimentally supported in Clang 5[17]
- Modules[18] – experimentally supported in Clang 5[19] and Visual Studio 2015 Update 1[20]
- Transactional memory[21]
- Reflection[22]
- Metaclasses[23]
Possible library changes
See also
References
- ↑ "The next standard after C++17 will be C++20". , by Herb Sutter
- ↑ "Current Status : Standard C++".
- ↑ "Working Draft, Standard for Programming Language C++" (PDF).
- ↑ "P0592R0: To boldly suggest an overall plan for C++20".
- ↑ Herb Sutter. "Trip report: Summer ISO C++ standards meeting (Toronto)".
- ↑ "P0606R0: Concepts Are Ready" (PDF).
- ↑ Tim Shen; Richard Smith. "Designated Initialization Wording".
- ↑ Thomas Köppe. "Allow lambda capture [=, this]".
- ↑ "Familiar template syntax for generic lambdas".
- ↑ Herb Sutter. "Trip report: Fall ISO C++ standards meeting (Albuquerque)".
- 1 2 3 4 "Trip Report: C++ Standards Meeting in Albuquerque, November 2017". There's Waldo!. 2017-11-20. Retrieved 2017-12-11.
- ↑ "Wording for lambdas in unevaluated contexts" (PDF).
- ↑ "Default constructible and assignable stateless lambdas" (PDF).
- ↑ "Pack expansion in lambda init-capture". www.open-std.org. Retrieved 2017-12-11.
- ↑ "String literals as non-type template parameters" (PDF).
- ↑ "N4649: Working Draft, Technical Specification on C++ Extensions for Coroutines" (PDF).
- ↑ "Clang 5 Release Notes on coroutines".
- ↑ "N4637: Working Draft, Extensions to C++ for Modules" (PDF).
- ↑ "Clang 5 documentation on Modules".
- ↑ "C++ Modules in VS 2015 Update 1".
- ↑ "N3341: Transactional Language Constructs for C++" (PDF).
- ↑ "Reflections on the reflection proposals - Meeting C++". meetingcpp.com. Retrieved 2017-06-30.
- ↑ Herb Sutter. "Metaclasses" (PDF).
- ↑ "Atomic Smart Pointers".
- ↑ "Functional in C++17 and C++20".
- ↑ "P0342R0: Timing barriers".
- ↑ "N4734: Working Draft, C++ Extensions for Networking" (PDF).
- ↑ "N4651: Working Draft, C++ Extensions for Ranges" (PDF).
- ↑ "Task Blocks".
External links
- 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
This article is issued from
Wikipedia.
The text is licensed under Creative Commons - Attribution - Sharealike.
Additional terms may apply for the media files.