C++20/C++23 features
Creator
HlC44W6cOAT4s90O5qHtwtzi6lm2
constinit variables are initialized at compile time or during static initialization, avoiding dynamic initialization.
Allows attributes to have namespaces.
The spaceship operator (<=>) allows comparing two objects and returns one of the std::strong_ordering, std::weak_ordering, or std::partial_ordering values.
The standard library now includes support for calendar and timezone operations.
std::latch is a synchronization primitive that allows one or more threads to block until a counter reaches zero.
Improvements to string handling.
Deducing this allows deducing the type of the object the member function is being called on.
The ability to label the closing brace of a block with the construct it closes.
Ranges provide a way to work with sequences of data in a more declarative and composable way.
Coroutines enable writing asynchronous code in a sequential manner, improving readability and maintainability.
Allows specifying that a parameter is an alias.
Template parameter lists can now use abbreviated syntax in some contexts.
char8_t is a character type for UTF-8 encoded characters.
std::format provides a type-safe and extensible way to format data.
constexpr algorithms provide compile-time evaluation of standard algorithms.
Features can be conditionally compiled based on compiler support using feature test macros.
[[likely]] and [[unlikely]] attributes provide hints to the compiler for branch prediction.
jthread is a thread class that automatically joins on destruction.
std::mdspan provides a view over multi-dimensional arrays.
std::barrier is a synchronization primitive that allows multiple threads to wait until all threads have reached a certain point.
constexpr new and delete allow dynamic memory allocation at compile time.
Modules improve build times and code organization by replacing header files.
Source location provides a way to capture the file name, line number, and function name of the current location in the code.
Enhancements to support reflection capabilities in C++.
Support for stack traces, which can be useful for debugging.
Designated initializers allow initializing struct/class members by name, improving code clarity.
consteval functions must produce a value at compile time.
#warning and #error can now be used with preprocessor expressions.
if consteval allows branching based on whether the code is being executed in a consteval context.
Allows the compiler to elide copies even when side effects are present.
std::span provides a non-owning view over a contiguous sequence of elements.
Atomic smart pointers provide atomic operations on shared_ptr and unique_ptr.
Concepts provide a way to specify requirements on template arguments, enabling better error messages and generic code.
Bit-fields can now have a specified type.
Synchronized output streams provide thread-safe output.