We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
What’s New in C++23 - Sy Brand - CppCon 2022
Explore the latest features and improvements in C++23, including flexible printing, improved coroutines, and enhanced error handling, with Sy Brand's expert insights at CppCon 2022.
-
New features in C++23:
-
std::printallows for more flexible printing with format specifiers -
std::generatoris a new coroutine feature -
std::spanis improved with operator overloading -
std::viewshave new functionality, includingzip,transform, andchunk -
std::optionalandstd::expectedhave improved APIs -
std::multiple_viewis a new feature for working with multidimensional arrays -
std::byte_swapis a new function for swapping byte order -
std::attributeallows for adding attributes to lambdas -
std::std::stack_traceis a new feature for debugging
-
-
Coroutines in C++23:
-
std::generatoris a coroutine that can be resumed and paused - Coroutines have improved language support
-
-
Memory management:
-
std::unique_ptris used as a smart pointer -
std::shared_ptris used for shared ownership
-
-
Code organization:
-
Code can be organized into modules using
importandstdmodules -
std::compatmodule imports C API names into the global namespace
-
Code can be organized into modules using
-
Error handling:
-
std::optionalandstd::expectedhave improved error handling -
std::expectedallows for more detailed error information
-