c++23 · iso/iec 14882:2023

Актуальный принятый стандартThe current ratified standard

Заметно компактнее C++17/20 — доводка того, что уже заложено: std::expected как явная альтернатива исключениям, deducing this упрощает CRTP, std::mdspan и std::generator достраивают ranges/coroutines из C++20. 12 фич, каждая — отдельная страница.Noticeably smaller than C++17/20 — polishing what's already in place: std::expected as an explicit alternative to exceptions, deducing this simplifies CRTP, std::mdspan and std::generator round out C++20's ranges/coroutines. 12 features, each its own page.

Обработка ошибок и compile-timeError handling and compile-time

типобезопасные альтернативы исключениямtype-safe alternatives to exceptions

Ядро языкаCore language

синтаксис и шаблоныsyntax and templates

БиблиотекаLibrary

новое в <mdspan>, <stacktrace>, <print>, <generator>, <flat_map>new in <mdspan>, <stacktrace>, <print>, <generator>, <flat_map>
07

std::mdspan

Многомерное невладеющее представление данных — span из C++20, обобщённый на произвольную размерность и layout.A multidimensional non-owning view — C++20's span generalized to arbitrary dimensionality and layout.

08

std::stacktrace

Портируемый доступ к стеку вызовов без платформенных API — конец backtrace()/CaptureStackBackTrace() под #ifdef.Portable access to the call stack without platform APIs — the end of backtrace()/CaptureStackBackTrace() under #ifdef.

09

std::generator

Готовый тип для корутин-генераторов — закрывает пробел, оставленный C++20, где coroutines были только механизмом без готовых типов.A ready-made type for coroutine generators — closes the gap left by C++20, where coroutines were only a mechanism with no ready-made types.

10

std::print / std::println

std::format напрямую в stdout/файл — конец std::cout << std::format(...) как обходного пути.std::format straight to stdout/a file — the end of std::cout << std::format(...) as a workaround.

11

новые range-адаптерыnew range adaptors

views::zip, views::enumerate, views::chunk, views::slide и другие — доводка ranges из C++20 самыми частыми недостающими адаптерами.views::zip, views::enumerate, views::chunk, views::slide, and others — C++20's ranges rounded out with the most commonly missing adaptors.

12

std::flat_map / std::flat_set

Ассоциативные контейнеры на отсортированном std::vector — лучше кэш-локальность, чем у map/set на дереве.Associative containers backed by a sorted std::vector — better cache locality than the tree-based map/set.

порядок чтения и связи с предыдущими стандартамиreading order and links to earlier standards

std::generator стоит читать после cpp20/coroutines.html — это ровно тот "готовый тип", отсутствие которого было главной граблей C++20 coroutines. std::mdspan логично читать после cpp20/span.html — прямое обобщение той же идеи на N измерений.std::generator is worth reading after cpp20/coroutines.html — it's exactly the "ready-made type" whose absence was C++20 coroutines' main gotcha. std::mdspan is naturally read after cpp20/span.html — a direct generalization of the same idea to N dimensions.

ranges-adaptors.html дополняет cpp20/ranges-basics.html — читать после него, не вместо. deducing this лучше понимается на фоне уже знакомого CRTP-паттерна и rvalue/lvalue-перегрузок методов.ranges-adaptors.html supplements cpp20/ranges-basics.html — read it after, not instead of. deducing this is easier to grasp against the backdrop of the already-familiar CRTP pattern and rvalue/lvalue method overloads.