c++23 · iso/iec 14882:2023
Заметно компактнее 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.
Значение или ошибка как часть возвращаемого типа — явная альтернатива исключениям, вдохновлённая Result из Rust.A value or an error as part of the return type — an explicit alternative to exceptions, inspired by Rust's Result.
Ветвление внутри constexpr-функции по признаку "вычисляемся ли мы сейчас на этапе компиляции".Branching inside a constexpr function on whether it's currently being evaluated at compile time.
Явный самотип первого параметра метода — упрощает CRTP и снимает необходимость дублировать const/non-const перегрузки.An explicit self-type first parameter for methods — simplifies CRTP and removes the need to duplicate const/non-const overloads.
matrix[i, j] вместо matrix[i][j] или matrix(i, j) — operator[] теперь принимает несколько аргументов.matrix[i, j] instead of matrix[i][j] or matrix(i, j) — operator[] now accepts multiple arguments.
Явное decay-копирование значения — снять const/ссылку/cv-квалификаторы без промежуточной переменной.An explicit decay-copy of a value — stripping const/reference/cv-qualifiers without an intermediate variable.
Подсказка компилятору о всегда истинном условии для оптимизации — недоказанное предположение, не проверка.A hint to the compiler about an always-true condition for optimization — an unproven assumption, not a check.
Многомерное невладеющее представление данных — span из C++20, обобщённый на произвольную размерность и layout.A multidimensional non-owning view — C++20's span generalized to arbitrary dimensionality and layout.
Портируемый доступ к стеку вызовов без платформенных API — конец backtrace()/CaptureStackBackTrace() под #ifdef.Portable access to the call stack without platform APIs — the end of backtrace()/CaptureStackBackTrace() under #ifdef.
Готовый тип для корутин-генераторов — закрывает пробел, оставленный 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.
std::format напрямую в stdout/файл — конец std::cout << std::format(...) как обходного пути.std::format straight to stdout/a file — the end of std::cout << std::format(...) as a workaround.
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.
Ассоциативные контейнеры на отсортированном 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.