You are on page 1of 5

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 N4778.[3]

[4]
Below is a partial list of changes that have been accepted into or have been discussed for inclusion into C++20.

Contents
New features
Possible new features
Possible library changes
Features deferred to a later standard
See also
References
External links

New features
Features 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]

[10][11]
Features voted into C++20 in the fall meeting in November 2017 include:

three-way comparison using the "spaceship operator",operator <=>


initialization of an additional variable within a range-basedfor statement
lambdas in unevaluated contexts[12][13]
[12][14]
default constructible and assignable stateless lambdas
allow pack expansions in lambdainit-capture[12][15]
string literals as template parameters[12][16]
atomic smart pointers (such asstd::atomic<shared_ptr<T>>and std::atomic<weak_ptr<T>>)[17]

[18]
Features voted into C++20 in the summer meeting in June 2018 include:

contracts[19]
feature test macros[20]
bit-casting of object representations, with less verbosity thanmemcpy() and more ability to exploit compiler
internals[21]
[22]
conditional explicit, allowing the explicit modifier to be contingent on a boolean expression

Features voted into C++20 in thefall meeting in November 2018include:


ranges (The One Ranges Proposal)[23]
concept terse syntax[24]
constexpr union,[25] try and catch[26] dynamic_cast and typeid,[27] std::pointer_traits[28]
various constexpr library bits[29]
immediate functions using the newconsteval keyword[30]
signed integers are now defined to be represented usingtwo's complement (note: this does not change
integeroverflow to be defined)[31]
[32]
refinements of the contracts facility (access control in contract conditions)
a revised memory model[33]

Features voted into C++20 in thewinter meeting in February 2019include:[34] [35]

coroutines[36] – already experimentally supported in Clang 5[37]


modules[38] – experimentally supported in Clang 5[39] and Visual Studio 2015 Update 1[40] as well as GCC[41]
various improvements to structured bindings (interaction with lambda captures, static and thread_local storage
duration)[42] [43]

Possible new features


transactional memory[44]

Possible library changes


extended futures[45]
latches and barriers[46]
task blocks[47]
text formatting[48]

Features deferred to a later standard


reflection[49][50]
metaclasses[51]
executors [52]
networking extensions,[53][54] including async, basic I/O services, timers, buf
fers and buffer-oriented streams,
sockets, and Internet protocols (blocked by executors)
properties[55]

See also
C++
C++98
C++03
C++11
C++14
C++17
C11 (C standard revision)
C18 (C standard revision)

References
1. "The next standard after C++17 will be C++20"(https://herbsutter.com/2016/06/30/trip-report-summer-iso-c-standard
s-meeting-oulu/)., by Herb Sutter
2. "Current Status : Standard C++"(https://isocpp.org/std/status).
3. "Working Draft, Standard for Programming Language C++" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/20
18/n4778.pdf) (PDF).
4. "P0592R0: To boldly suggest an overall planfor C++20" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/
p0592r0.html).
5. Herb Sutter. "Trip report: Summer ISO C++ standards meeting (Toronto)" (https://herbsutter.com/2017/07/15/trip-rep
ort-summer-iso-c-standards-meeting-toronto/)
.
6. "P0606R0: Concepts Are Ready"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0606r0.pdf)(PDF).
7. Tim Shen; Richard Smith."Designated Initialization Wording" (https://wg21.link/p0329).
8. Thomas Köppe. "Allow lambda capture [=, this]"(https://wg21.link/p0409).
9. "Familiar template syntax for generic lambdas"(https://wg21.link/p0428).
10. Herb Sutter. "Trip report: Fall ISO C++ standards meeting(Albuquerque)" (https://herbsutter.com/2017/11/11/trip-rep
ort-fall-iso-c-standards-meeting-albuquerque/).
11. Smith, Richard; Perchik, Dawn; Köppe, Thomas."N4714 Editors' Report -- Programming Languages -- C++"(https://
github.com/cplusplus/draft/blob/master/papers/n4714.md)
. C++ standards drafts. GitHub. Retrieved 27 December
2018.
12. "Trip Report: C++ Standards Meeting in Albuquerque, November 2017"(https://botondballo.wordpress.com/2017/11/
20/trip-report-c-standards-meeting-in-albuquerque-november-2017/)
. There's Waldo!. 2017-11-20. Retrieved
2017-12-11.
13. "Wording for lambdas in unevaluated contexts" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0315r4.
pdf) (PDF).
14. "Default constructible and assignable stateless lambdas"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/
p0624r2.pdf) (PDF).
15. "Pack expansion in lambda init-capture"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0780r0.html).
www.open-std.org. Retrieved 2017-12-11.
16. "String literals as non-type template parameters"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0424r
2.pdf) (PDF).
17. Meredith, Alisdair; Sutter, Herb. "Revising atomic_shared_ptr for C++20"(http://www.open-std.org/jtc1/sc22/wg21/do
cs/papers/2017/p0718r2.html). JTC1/SC22/WG21 - The C++ Standards Committee - ISOCPP . ISO. Retrieved
27 December 2018.
18. Herb Sutter. "Trip report: Summer ISO C++ standards meeting (Rapperswil)" (https://herbsutter.com/2018/07/02/trip-
report-summer-iso-c-standards-meeting-rapperswil/)
.
19. "Support for contract based programming in C++"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0542r
5.html). www.open-std.org. Retrieved 2018-11-10.
20. "Integrating feature-test macros into the C++ WD"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0941r
2.html). www.open-std.org. Retrieved 2018-11-10.
21. "Bit-casting object representations"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0476r2.html).
www.open-std.org. Retrieved 2018-11-10.
22. "explicit(bool)" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0892r2.html). www.open-std.org.
Retrieved 2018-11-13.
23. "P0896R3" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0896r3.pdf)(PDF).
24. "P1141R1 - Yet another approach for constrained declarations" (http://open-std.org/JTC1/SC22/WG21/docs/papers/
2018/p1141r1.html).
25. "P1330R0 - Changing the active member of a union inside constexpr"(http://wiki.edg.com/pub/Wg21sandiego2018/
StrawPolls/p1330r0.pdf)(PDF).
26. "P1002R0 - Try-catch blocks in constexpr functions" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p10
02r0.pdf) (PDF).
27. "P1327R0 - Allowing dynamic_cast, polymorphic typeid in Constant Expressions"
(http://wiki.edg.com/pub/Wg21san
diego2018/EvolutionWorkingGroup/P1327R0.html).
28. "P1006R1 - Constexpr in std::pointer_traits"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1006r1.pdf)
(PDF).
29. "P1032R1 - Misc constexpr bits"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1032r1.html).
30. "P1073R2 - Immediate functions"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1073r2.html).
31. "P1236R0: Alternative Wording for P0907R4 Signed Integers are Two's Complement" (http://www.open-std.org/jtc1/s
c22/wg21/docs/papers/2018/p1236r0.html).
32. "P1289R0 - Access control in contract conditions"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1289r
0.pdf) (PDF).
33. "P0668R4: Revising the C++ memory model"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0668r4.ht
ml).
34. "r/cpp - 2019-02 Kona ISO C++ Committee T rip Report (C++20 design is complete; Modules in C++20; Coroutines in
C++20; Reflection TS v1 published; work begins on a C++ Ecosystemechnical
T Report)" (https://www.reddit.com/r/c
pp/comments/au0c4x/201902_kona_iso_c_committee_trip_report_c20/) . reddit. Retrieved 2019-02-24.
35. "Trip report: Winter ISO C++ standards meeting (Kona)" (https://herbsutter.com/2019/02/23/trip-report-winter-iso-c-st
andards-meeting-kona/). Sutter’s Mill. 2019-02-23. Retrieved 2019-02-24.
36. "N4649: Working Draft, Technical Specification on C++ Extensions for Coroutines"(http://www.open-std.org/jtc1/sc2
2/wg21/docs/papers/2017/n4649.pdf)(PDF).
37. "Clang 5 Release Notes on coroutines"(http://releases.llvm.org/5.0.2/tools/clang/docs/ReleaseNotes.html#c-coroutin
es).
38. "N4637: Working Draft, Extensions to C++ for Modules" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n
4637.pdf) (PDF).
39. "Clang 5 documentation on Modules"(https://clang.llvm.org/docs/Modules.html).
40. "C++ Modules in VS 2015 Update 1"(https://blogs.msdn.microsoft.com/vcblog/2015/12/03/c-modules-in-vs-2015-up
date-1/).
41. "cxx-modules - GCC Wiki"(https://gcc.gnu.org/wiki/cxx-modules). gcc.gnu.org. Retrieved 2019-02-24.
42. www.open-std.org http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1091r1.html(http://www.open-std.org/j
tc1/sc22/wg21/docs/papers/2018/p1091r1.html) . Retrieved 2019-02-24. Missing or empty |title= (help)
43. "P1091R2: Extending structured bindings to be more like variable declarations"
(http://www.open-std.org/jtc1/sc22/w
g21/docs/papers/2018/p1091r2.html). www.open-std.org. Retrieved 2019-02-24.
44. "N3341: Transactional Language Constructsfor C++" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3
341.pdf) (PDF).
45. "Functional in C++17 and C++20"(http://www.modernescpp.com/index.php/functional-in-c-17-and-c-20).
46. "P0342R0: Timing barriers" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0342r0.html).
47. "Task Blocks" (http://www.modernescpp.com/index.php/task-blocks).
48. "Text Formatting" (http://fmtlib.net/Text%20Formatting.html).
49. "Reflections on the reflection proposals - Meeting C++"(https://meetingcpp.com/index.php/br/items/reflections-on-th
e-reflection-proposals.html). meetingcpp.com. Retrieved 2017-06-30.
50. "Static reflection" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0194r6.html). www.open-std.org.
Retrieved 2018-11-10.
51. Herb Sutter. "Metaclasses" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0707r0.pdf)(PDF).
52. "A Unified Executors Proposal for C++"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0443r10.html).
www.open-std.org. Retrieved 2019-02-24.
53. "N4734: Working Draft, C++ Extensions for Networking" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/
n4734.pdf) (PDF).
54. "ISO/IEC TS 19216:2018 Programming Languages -- C++ Extensions for Networking"
(https://www.iso.org/standard/
64030.html).
55. "A General Property Customization Mechanism"(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1393r
0.html). www.open-std.org. Retrieved 2019-02-24.

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
Retrieved from "https://en.wikipedia.org/w/index.php?title=C%2B%2B20&oldid=884865820
"

This page was last edited on 24 February 2019, at 14:47(UTC).

Text is available under theCreative Commons Attribution-ShareAlike License ; additional terms may apply. By using this
site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of theWikimedia
Foundation, Inc., a non-profit organization.

You might also like