Preface
- Incremental Writing
- Acknowledgments
- Versions of This Book
About This Book
- What You Should Know Before Reading This Book
- Overall Structure of the Book
- How to Read This Book
- The Way I Implement
- The C++ Standards
- Example Code and Additional Information
- Feedback
“Hello, World” with C++23
- The New “Hello World”
Modules std and std.compat
- A First Example Using the Standard Module
std - Standard Library Modules in Detail
- Using the Standard Modules in Practice
- Afternotes
Formatted Output with std::print() and std::println()
- Basics of Formatted Output Since C++20
std::print()andstd::println()- Afternotes
Formatted Output Extensions
- Debugging Output Format for Strings and Characters
- Formatted Output of Tuples and Pairs
- Formatted Output of Containers and Ranges
- Concept
std::formattable - Afternotes
Fix of the Range-Based for Loop
- The Former Problem of the Range-Based
forLoop - Other Code Affected by a Broken Range-Based
forLoop - Possible Drawbacks of the Fix
- Afternotes
Operator Extensions
- Multi-Dimensional Operator
[] - Afternotes
Deducing this as an Explicit Object Parameter
- Introduction to Deducing
this - How to Benefit From Deducing
this - Recursive Lambdas
- The Compile Time Object Type and the CRTP Pattern
- Details of Deducing
thisas an Explicit Object Parameter - Afternotes
auto() and auto{}
- Introduction of
auto()andauto{} - Example of Using
auto()orauto{} auto()andauto{}in Detail- Afternotes
std::expected<>
- Using
std::expected<> std::expected<>Types and Operations- Special Cases
- Afternotes
Monadic Operations for std::optional<> and std::expected<>
- Basic Example of Monadic Operations
- Basic Example of Monadic Operations with
std::expected<> - Monadic Operations in Detail
- Afternotes
std::stacktrace
- Example of Using a
std::stacktrace std::stacktracein Detail- Afternotes
Views
- Introduction to Views
- Overview of All Views
- Remarkable View Extensions with C++23
- Afternotes
Pitfalls and Traps Using Views
- Overview of Pitfalls and Traps When Using Views
- Consequences of Reference Semantics
- Caching Views
constCorrectness with Views- The Filter View Fiasco
- How to Use Views in Practice
- Afternotes
Supplementary Views in Detail
- Overview of Views Introduced with C++23
- Generating Views
- Filtering Views
- Transforming Views
- Views That Split or Join Ranges
- Views That Combine Multiple Elements
- Afternotes
Extensions for Ranges and Views
- Initialize Containers with
std::from_range - Other New Container Functions to Deal with Ranges as a Whole
- Creating Containers with
std::ranges::to<>() - How
std::ranges::to<>()Operates and other Ways to Insert a Range - Performance of
std::ranges::to<>()and Usingstd::from_range - Enable Views for Pipelines
- Afternotes
Coroutine Interface std::generator<>
- A First
std::generator<>Example - Unlimited
std::generator<>Coroutines std::generator<>Coroutines with Parameters- Parallel Use of
std::generator<>Coroutines - Ending a Coroutine with
co_return - Other Basic Aspects of
std::generator<>Coroutines - Afternotes
std::generator<> in Detail
- Exception Handling of
std::generator<> - Passing
std::generator<>as Argument - Memory Management of
std::generator<>Coroutines - Using Nested
std::generator<>Coroutines - Yielding References and Proxy Types
- Class Template
std::generator<>in Detail - Afternotes
Multi-Dimensional Spans std::mdspan
- Using
std::mdspan - Other Layouts of
std::mdspan std::mdspanwith No Elements or Zero Dimensions- Using Accessors
std::mdspan<>in Detail- Afternotes
Small Improvements of the C++ Standard Library
- Updates for String Types
- Afternotes
Glossary
- A
- C
- F
- G
- I
- L
- P
- R
- S
- U
- V
- X
