C++20
suggest changeC++20 was published as ISO/IEC 14882:2020 and was a major revision following C++17. The following lists highlight—not exhaustively—its most visible changes.
Language Extensions
- Concepts and
requiresexpressions - Modules
- Coroutines
- The three-way comparison operator (
<=>) - Designated initializers
constevalandconstinit- Expanded
constexprsupport - Template parameter lists for lambdas
Library Extensions
- Ranges algorithms and views
std::spanstd::formatstd::jthreadand cooperative cancellation withstd::stop_token- Semaphores, latches, barriers, and atomic waiting
- Calendar and time-zone support in
<chrono> std::source_location- Bit-manipulation utilities in
<bit>
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents