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