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::print
allows for more flexible printing with format specifiers -
std::generator
is a new coroutine feature -
std::span
is improved with operator overloading -
std::views
have new functionality, includingzip
,transform
, andchunk
-
std::optional
andstd::expected
have improved APIs -
std::multiple_view
is a new feature for working with multidimensional arrays -
std::byte_swap
is a new function for swapping byte order -
std::attribute
allows for adding attributes to lambdas -
std::std::stack_trace
is a new feature for debugging
-
-
Coroutines in C++23:
-
std::generator
is a coroutine that can be resumed and paused - Coroutines have improved language support
-
-
Memory management:
-
std::unique_ptr
is used as a smart pointer -
std::shared_ptr
is used for shared ownership
-
-
Code organization:
-
Code can be organized into modules using
import
andstd
modules -
std::compat
module imports C API names into the global namespace
-
Code can be organized into modules using
-
Error handling:
-
std::optional
andstd::expected
have improved error handling -
std::expected
allows for more detailed error information
-