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