Leanpub Header

Skip to main content

C++23 - The Complete Guide

Bu kitap % 95 tamamlandıBu kitabın son güncelleme zamanı 2026-07-30.
+12,342 words in the last 30 days

All new language and library features of C++23 (for those who know C++20)

The book presents all new language and library features of C++23. Learn how this impacts day-to-day programming, to benefit in practice, to combine new features, and to avoid all new traps.

Buy early, pay less, free updates

Current Content: www.cppstd23.com

Other leanpub books by this author:

C++20

C++17

C++ Move Semantics

En düşük fiyat

$29.90

$47.90

Ödeyeceğiniz Miktar

Yazarın kazandığı

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
Hakkında

Hakkında

Kitap Hakkında

C++23 is the next evolution in modern C++ programming and is now supported by the latest version of gcc, clang, and Visual C++. It is the first release after introducing several new key features with C++20, which can be seen as the beginning of a new C++ release cycle.

C++23 contains both significant extensions and improvement of various features introduced with C++20 and a couple of new language and library features.

As usual, not everything is self-explanatory, combining new features gives even more power, and there are hidden traps.

This book presents all the new language and library features of C++23. It covers the motivation and context of each new feature with examples and background information. The focus is on how these features impact day-to-day programming, what it means to combine them, and how to benefit from C++23 in practice.

Testimonials:

"What really stands out to me is how Nicolai doesn't just catalog the new C++23 language and library features, but grounds each one in its motivation and context. Walking through why a feature exists before showing how to use it makes the material land in a way pure reference books rarely manage. I especially appreciate the honesty about the hidden traps that show up when combining new features. That's the kind of detail that only comes from someone who actually lives inside the language, not just read the spec." Rebecca Yarros

Buy early, pay less, free updates

Note that this book is published step-by-step. The first public version will be published probably in 2024. After that, the content will grow with new chapters, examples, and caveats about the features of C++23 and I integrate all feedback I get for the pages already published.

As written, once you bought the ebook you will get all updates for free.

PDF versus Other Formats

I write the book in LaTeX and generate PDF from it (the way I wrote my other books). The other formats (epub, mobi, and online reading) come from the leanpub markdown interface, for which I generate the necessary input from LaTeX by script.

Thus, the PDF layout has a better quality than the other formats. For example, the syntax highlighting rules for the formats other than PDF have to get fixed as soon as possible and the index is missing yet. Leanpub and me are working on corresponding improvements.

I hope you enjoy and benefit.

Nico

#cpp23tcg

Bu kitabı Paylaş

Kategoriler

Yazar

Yazar Hakkında

Nicolai M. Josuttis

Nicolai Josuttis (http://www.josuttis.com) is well known in the programming community because he not only speaks and writes with authority, being the (co-)author of the world-wide best sellers

but is also an innovative presenter, having talked at various conferences and events.

He is an independent trainer and speaker being active in C++ standardization for more than 20 years.

The Leanpub Podcast

Podcast

Podcast Episode

İçerik

İçindekiler

Preface

  1. Incremental Writing
  2. Acknowledgments
  3. Versions of This Book

About This Book

  1. What You Should Know Before Reading This Book
  2. Overall Structure of the Book
  3. How to Read This Book
  4. The Way I Implement
  5. The C++ Standards
  6. Example Code and Additional Information
  7. Feedback

“Hello, World” with C++23

  1. The New “Hello World”

Modules std and std.compat

  1. A First Example Using the Standard Module std
  2. Standard Library Modules in Detail
  3. Using the Standard Modules in Practice
  4. Afternotes

Formatted Output with std::print() and std::println()

  1. Basics of Formatted Output Since C++20
  2. std::print() and std::println()
  3. Afternotes

Formatted Output Extensions

  1. Debugging Output Format for Strings and Characters
  2. Formatted Output of Tuples and Pairs
  3. Formatted Output of Containers and Ranges
  4. Concept std::formattable
  5. Afternotes

Fix of the Range-Based for Loop

  1. The Former Problem of the Range-Based for Loop
  2. Other Code Affected by a Broken Range-Based for Loop
  3. Possible Drawbacks of the Fix
  4. Afternotes

Operator Extensions

  1. Multi-Dimensional Operator []
  2. Afternotes

Deducing this as an Explicit Object Parameter

  1. Introduction to Deducing this
  2. How to Benefit From Deducing this
  3. Explicit Object Parameters for Lambdas
  4. The Compile Time Object Type and the CRTP Pattern
  5. Details of Deducing this as an Explicit Object Parameter
  6. Afternotes

auto() and auto{}

  1. Introduction of auto() and auto{}
  2. Example of Using auto() or auto{}
  3. auto() and auto{} in Detail
  4. Afternotes

std::expected<>

  1. Using std::expected<>
  2. std::expected<> Types and Operations
  3. Special Cases
  4. Afternotes

Monadic Operations for std::optional<> and std::expected<>

  1. Basic Example of Monadic Operations
  2. Basic Example of Monadic Operations with std::expected<>
  3. Monadic Operations in Detail
  4. Afternotes

std::stacktrace

  1. Example of Using a std::stacktrace
  2. std::stacktrace in Detail
  3. Afternotes

Views

  1. Introduction to Views
  2. Overview of All Views
  3. Remarkable View Extensions with C++23
  4. Afternotes

Pitfalls and Traps Using Views

  1. Overview of Pitfalls and Traps When Using Views
  2. Consequences of Reference Semantics
  3. Caching Views
  4. const Correctness with Views
  5. The Filter View Fiasco
  6. How to Use Views in Practice
  7. Afternotes

Supplementary Views in Detail

  1. Overview of Views Introduced with C++23
  2. Generating Views
  3. Filtering Views
  4. Transforming Views
  5. Views That Deal with Subsequences
  6. Views That Split Ranges
  7. Views That Join Ranges
  8. Afternotes

Extensions for Ranges and Views

  1. Initialize Containers with std::from_range
  2. Container Functions to Deal with Ranges as a Whole
  3. Creating Containers with std::ranges::to<>()
  4. Performance of std::ranges::to<>() and Using std::from_range
  5. Enable Views for Pipelines
  6. Afternotes

New Algorithms

  1. Algorithms starts_with() and ends_with()
  2. Algorithms contains() and contains_subrange()
  3. find_last() Algorithms
  4. Fold Algorithms
  5. Additional Algorithms in the Namespace std::ranges
  6. Afternotes

Coroutine Interface std::generator<>

  1. A First std::generator<> Example
  2. Unlimited std::generator<> Coroutines
  3. std::generator<> Coroutines with Parameters
  4. Parallel Use of std::generator<> Coroutines
  5. Ending a Coroutine with co_return
  6. Other Basic Aspects of std::generator<> Coroutines
  7. Afternotes

std::generator<> in Detail

  1. Exception Handling of std::generator<>
  2. Passing std::generator<> as Argument
  3. Memory Management of std::generator<> Coroutines
  4. Using Nested std::generator<> Coroutines
  5. Yielding References and Proxy Types
  6. Class Template std::generator<> in Detail
  7. Afternotes

Multi-Dimensional Spans std::mdspan

  1. Using std::mdspan
  2. Layouts of std::mdspan
  3. std::mdspan with No Elements or Zero Dimensions
  4. Using Accessors
  5. std::mdspan<> in Detail
  6. Afternotes

Flat Containers std::flat_set and std::flat_map

  1. Motivation for Flat Containers
  2. First Examples of Using Flat Containers
  3. Internal Layout of Flat Containers
  4. Differences between Flat and Associative Containers
  5. Flat Containers in Detail
  6. Flat Sets and Flat Multisets in Detail
  7. Flat Maps and Flat Multimaps in Detail
  8. Afternotes

Small Improvements of the C++23 Language

  1. Literal Suffix uz for std::size_t
  2. New Preprocessor Directives
  3. Attribute [[assume()]]
  4. if consteval
  5. Enum Helper std::to_underlying()
  6. Afternotes

Small Improvements of the C++ Standard Library

  1. Updates for String Types
  2. Helper std::byteswap()
  3. std::move_only_function()
  4. Afternotes

Small Improvements for Experts

  1. Static operator(), operator[], and Static Lambdas
  2. Perfect Forwarding with std::forward_like<>()
  3. std::start_lifetime_as<>()
  4. Afternotes

Glossary

  1. A
  2. C
  3. F
  4. G
  5. I
  6. L
  7. P
  8. R
  9. S
  10. U
  11. V
  12. X

Leanpub Önkoşulsuz, Risksiz, %100 Mutluluk Garantilidir

Leanpub'tan yaptığınız alışverişlerde, 60 günlük sürede %100 iade garantisi mevcut, bunun için sadece iki tıklama yeterli. Detaylar için (ingilizce) kullanım sözleşmesini okuyunuz.

10$ değerinde bir satıştan 8$, 20$ değerinde bir satıştan 16$ kazanın

7,99$ veya üzeri satışlarda %80 telif, 0,99$ ile 7,98$ arasındaki satışlarda 50 sent sabit ücret düşülerek %80 telif ödüyoruz. 10$'lık bir satıştan 8$, 20$'lık bir satıştan 16$ kazanıyorsunuz. Yani, kitabınızın iade edilmemiş 5000 kopyasını 20$'dan satarsak, 80.000$ kazanacaksınız.

(Evet, bazı yazarlar Leanpub'da bundan çok daha fazlasını kazandılar.)

Gerçekte, yazarlar Leanpub'da yazarak, yayınlayarak ve satarak 14 milyon dolardan fazla kazandılar.

Leanpub'da yazmak hakkında daha fazla bilgi edinin

Ücretsiz Güncellemeler. DRM İçermez.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Leanpub'ın e-kitap formatları ve bunları nerede okuyabileceğiniz hakkında daha fazla bilgi edinin

Leanpub üzerinde Yazın ve Yayımlayın

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Leanpub üzerinde nasıl yazabileceğinizi öğrenin