{"id":329304,"date":"2022-02-09T09:00:25","date_gmt":"2022-02-09T09:00:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=329304"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=329304","title":{"rendered":"<span>\u0421++23 \u2014 \u0438\u0442\u043e\u0433\u0438 \u0444\u0435\u0432\u0440\u0430\u043b\u044c\u0441\u043a\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg\" width=\"70%\" data-src=\"https:\/\/habrastorage.org\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  \u0411\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u043b\u043e\u0432, \u043f\u0440\u044f\u043c\u043e \u043a \u0434\u0435\u043b\u0443 \u2014 \u0432\u043e\u0442 \u043a\u0430\u043a\u0438\u0435 \u043d\u043e\u0432\u044b\u0435 \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0441 \u0436\u0434\u0430\u0442\u044c \u0432 C++23:<\/p>\n<ul>\n<li><code>std::expected<\/code> \u2014 \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043a\u043e\u0434\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430.<\/li>\n<li>constexpr-\u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u2014 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u0438 \u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u0430.<\/li>\n<li><code>std::ranges::to<\/code> \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/li>\n<li><code>std::views::join_with<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/li>\n<\/ul>\n<p>  \u0427\u0442\u043e \u043c\u044b <b>\u043d\u0435<\/b> \u0443\u0432\u0438\u0434\u0438\u043c \u0432 C++23, \u043d\u0430 \u0447\u0442\u043e \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f \u0438 \u0447\u0442\u043e \u0435\u0449\u0451 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430? \u0412\u0441\u0451 \u044d\u0442\u043e \u0436\u0434\u0451\u0442 \u0432\u0430\u0441 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>std::expected<\/h2>\n<p>  \u0412 C++ \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0437 \u0421 \u2014 \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">std::errc to_int(std::string_view str, int&amp; result) {     const auto end = str.data() + str.size();     auto [ptr, ec] = std::from_chars(str.data(), end, result);     if (ec == std::errc() &amp;&amp; ptr != end) {         ec = std::errc::invalid_argument;     }      return ec; } <\/code><\/pre>\n<p>  \u0423 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0438\u043d\u0443\u0441 \u2014 \u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. \u0410 \u0435\u0449\u0451 \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u0430\u044f, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">int result; auto err = to_int(data, result);  if (err != std::errc()) return err; \/\/ ... \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 result <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 C++ \u0443\u0436\u0435 \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">int to_int(std::string_view str) {     int result;     const auto end = str.data() + str.size();     auto [ptr, ec] = std::from_chars(str.data(), end, result);     if (ec != std::errc() || ptr != end) {         throw std::runtime_error(\"failed to parse\");     } } <\/code><\/pre>\n<p>  \u0418 \u044d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u0435\u0431\u044f \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0440\u0435\u0434\u043a\u043e, \u2014 \u0435\u0441\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u0447\u0430\u0441\u0442\u043e, \u0442\u043e \u043a\u043e\u0434 \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u043a\u043e\u0434 \u0441 \u043a\u043e\u0434\u0430\u043c\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430. \u0422\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0438\u043d\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0430 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0435\u043d:<\/p>\n<pre><code class=\"cpp\">const int result = to_int(data, result); \/\/ ... \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 result <\/code><\/pre>\n<p>  \u0412 C++23 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <code>std::expected<\/code>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0437\u0430\u043c\u0435\u043d\u044b \u043a\u043e\u0434\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u043c \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c: <\/p>\n<pre><code class=\"cpp\">std::expected&lt;int, std::errc> to_int(std::string_view str) {     int result;     const auto end = str.data() + str.size();     auto [ptr, ec] = std::from_chars(str.data(), end, result);     if (ec != std::errc()) return ec;         if (ptr != end) return std::errc::invalid_argument;      return result; } <\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043a\u0430\u043a \u043a\u043e\u0434\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">auto val = to_int(data, result); if (!val) return val; auto&amp; result = *val; <\/code><\/pre>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0440\u0435\u0434\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c:<\/p>\n<pre><code class=\"cpp\">auto result = to_int(data, result).value(); \/\/ \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441\u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0434\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0430\u043c\u0438\u043c \u0440\u0435\u0448\u0430\u0442\u044c, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 <a href=\"https:\/\/wg21.link\/P0323\">P0323<\/a>. \u041a\u0441\u0442\u0430\u0442\u0438, \u0443 \u043d\u0430\u0441 \u0432 \u042f\u043d\u0434\u0435\u043a\u0441\u0435 \u043c\u043d\u043e\u0433\u043e \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u0435\u0431\u044f \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0432\u0432\u043e\u0434\u043e\u043c \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p>\n<h2>constexpr<\/h2>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432 C++ \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code>constexpr unique_ptr<\/code> \u0432 <a href=\"https:\/\/wg21.link\/P2273\">P2273<\/a> \u0438 <code>constexpr &lt;cmath><\/code> \u0432 <a href=\"https:\/\/wg21.link\/P0533\">P0533<\/a>. \u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438\u0434\u0435\u044f\u043c\u0438, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \ud83d\ude09<\/p>\n<h2>std::ranges::join_with<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430 Python \u043f\u043e\u0441\u043b\u0435 C++, \u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u043b\u0438 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c:<\/p>\n<pre><code class=\"python\">values = ('Hello', 'world') print(', '.join(values)  # \u0412\u044b\u0432\u043e\u0434\u0438\u0442 Hello, world <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0438 \u0432 C++:<\/p>\n<pre><code class=\"cpp\">for (const auto&amp; val : {'Hello', 'world'} | std::views::join_with(\", \"))     std::cout &lt;&lt; val;  \/\/ \u0412\u044b\u0432\u043e\u0434\u0438\u0442 Hello, world <\/code><\/pre>\n<p>  \u0412\u0441\u0451 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044e <a href=\"https:\/\/wg21.link\/P2441\">P2441<\/a>. \u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>boost::algorithm::join<\/code> \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u041d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435, \u043a\u0441\u0442\u0430\u0442\u0438, \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">std::map&lt;int, std::string> m{     {41, \"Hello\"},     {42, \"world\"}, }; auto s = std::format(\"{:m}\", m); \/\/ {41: \"Hello\", 42: \"world\"} <\/code><\/pre>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0438\u0434\u0435\u044f \u0438\u0437 <a href=\"https:\/\/wg21.link\/P2286\">P2286<\/a> \u0435\u0449\u0451 \u0443\u0441\u043f\u0435\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 C++23.<\/p>\n<h2>\u041d\u043e\u0432\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b ranges<\/h2>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043d\u0430\u0434 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c\u0438:<\/p>\n<ul>\n<li><code>std::ranges::iota(range, x)<\/code> \u2014 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <code>x++<\/code> (<a href=\"https:\/\/wg21.link\/P2440\">P2440<\/a>).<\/li>\n<li><code>std::ranges::shift_left(range, n)<\/code> \u0438 <code>std::ranges::shift_right(range, n)<\/code> \u2014 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0441\u043e \u0441\u0434\u0432\u0438\u0433\u043e\u043c <code>n<\/code>, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 <code>std::shift_left<\/code>\/<code>std::shift_right<\/code> (<a href=\"https:\/\/wg21.link\/P2440\">P2440<\/a>).<\/li>\n<li><code>std::views::chunk(range, n)<\/code> \u2014 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0438\u0437 <code>n<\/code> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (<a href=\"https:\/\/wg21.link\/P2442\">P2442<\/a>).<\/li>\n<li><code>std::views::slide(range, n)<\/code> \u2014 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e <code>n<\/code> \u0441\u043c\u0435\u0436\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u0448\u0430\u0433\u043e\u043c 1, \u0430\u043d\u0430\u043b\u043e\u0433 <code>std::views::adjacent&lt;n><\/code> \u0441 \u0440\u0430\u043d\u0442\u0430\u0439\u043c-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c <code>n<\/code> (<a href=\"https:\/\/wg21.link\/P2442\">P2442<\/a>).<\/li>\n<li><code>std::views::chunk_by(range, pred)<\/code> \u2014 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0434\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u043f\u043e \u043f\u0440\u0435\u0434\u0438\u043a\u0430\u0442\u0443 <code>pred<\/code> (<a href=\"https:\/\/wg21.link\/P2443\">P2443<\/a>).<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">std::vector&lt;char> v; v.resize(4, 'b');                 \/\/ v == {'b', 'b', 'b', 'b'} std::ranges::iota(v, 'm');  \/\/ v == {'m', 'n', 'o', 'p'} std::ranges::shift_left(v, 1);  \/\/ v == {'n', 'o', 'p', 'p'} v | std::views::chunk(2);  \/\/ {['n', 'o'], ['p', 'p']} v | std::views::slide(2);  \/\/ {['n', 'o'], ['o', 'p'], ['p', 'p']} v | std::views::chunk_by([](auto x, auto y) {     return x != y; });  \/\/ {['n', 'o', 'p'], ['p']} <\/code><\/pre>\n<p>  <\/p>\n<h2>std::ranges::to<\/h2>\n<p>  \u0414\u043e C++23 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0438\u043f\u0430\u0437\u043e\u043d \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u0430\u043c\u043e\u0439 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">auto c = std::views::iota('a', 'z') | std::views::common; std::vector v(c.begin(), c.end()); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u0440\u043e\u0449\u0435:<\/p>\n<pre><code class=\"cpp\">auto v = std::views::iota('a', 'z') | std::ranges::to&lt;std::vector>(); <\/code><\/pre>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0435\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u043c\u0438: <\/p>\n<ul>\n<li><code>c.insert_range(it, r)<\/code> \u2014 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>r<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 c \u043f\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0443 <code>it<\/code>.<\/li>\n<li>c<code>.assign_range(r)<\/code> \u2014 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 <code>c<\/code> \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>r<\/code>.<\/li>\n<li><code>c.append_range(r)<\/code> \u2014 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>r<\/code> \u0432 \u043a\u043e\u043d\u0435\u0446 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 <code>c<\/code>.<\/li>\n<li><code>c.prepend_range(r)<\/code> \u2014 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>r<\/code> \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 <code>c<\/code>.<\/li>\n<\/ul>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043d\u043e\u0432\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 <code>std::string<\/code> \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"cpp\">std::string s{\"world\"}; std::string_view hello{\"Hello \"};  std::cout &lt;&lt; s.prepend_range(hello).append_range(\"!!!\"); \/\/ Hello world!!! <\/code><\/pre>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 <code>std::ranges::to<\/code> \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (rvalue) \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>std::views::move<\/code> (\u043d\u0435 \u043f\u0443\u0442\u0430\u0439\u0442\u0435 \u0441 <code>std::move<\/code>):<\/p>\n<pre><code class=\"cpp\">namespace views = std::views; using std::ranges::to;  std::vector&lt;std::u8string> strs{u8\"\u041f\u0440\u0438\u0432\u0435\u0442\", u8\"\u0434\u043e\u0440\u043e\u0433\u043e\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c\"}; auto s0 = strs | to&lt;std::deque>(); \/\/ \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 strs auto s1 = strs | views::move | to&lt;std::deque>(); \/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 strs  so.append_range(s1); \/\/ \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 s1 so.append_range(std::move(s1)); \/\/ \u0412\u0441\u0451 \u0435\u0449\u0451 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 s1 so.append_range(s1 | views::move); \/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 s1 <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 <a href=\"https:\/\/wg21.link\/P1206\">P1206<\/a>.<\/p>\n<h2>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 | \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 ranges<\/h2>\n<p>  \u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u043e\u0432\u044b\u0435 views \u0434\u043b\u044f ranges, \u043d\u0435\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0451\u0448\u044c\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: \u00ab\u0410 \u043a\u0430\u043a \u043d\u0430\u043c \u0441\u0430\u043c\u0438\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 view?\u00bb <a href=\"https:\/\/wg21.link\/P2387\">P2387<\/a> \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0438 \u0432\u0432\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:<\/p>\n<ul>\n<li><code>std::ranges::range_adaptor_closure&lt;T><\/code> \u2014 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 closure objects, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043c\u043e\u0433\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 | \u0434\u043b\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/li>\n<li><code>std::bind_back(f, args&amp;&amp;...)<\/code> \u2014 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043a\u043e\u043d\u0446\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0437\u043e\u0432 <code>std::bind_back(f, a3, a4)(a1, a2)<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 <code>f(a1, a2, a3, a4)<\/code>.<\/li>\n<\/ul>\n<p>  \u041d\u043e \u0434\u0430\u0436\u0435 \u0441 \u044d\u0442\u0438\u043c\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u044d\u043a\u0440\u0430\u043d \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 view \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 |. \u0421\u043a\u043e\u0440\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0434\u043e\u0441\u043f\u0435\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 view.<\/p>\n<h2>\u041f\u0440\u043e\u0447\u0438\u0435 \u043c\u0435\u043b\u043e\u0447\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0412 <a href=\"https:\/\/wg21.link\/P0627\">P0627<\/a> \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>std::unreachable()<\/code> \u0434\u043b\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u0445 \u043a\u043e\u0434\u0430 (\u0442\u0430\u043a\u0438\u0445, \u043a\u0443\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f).<\/li>\n<li>\u0412 <a href=\"https:\/\/wg21.link\/P1413\">P1413<\/a> \u043f\u043e\u043c\u0435\u0442\u0438\u043b\u0438 \u0430\u043b\u0438\u0430\u0441\u044b \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 <code>std::aligned_storage_t&lt;sizeof(T), alignof(T)><\/code> \u043a\u0430\u043a deprecated \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>alignas(T) std::byte t_buff[sizeof(T)];<\/code>.<\/li>\n<li>\u0412 <a href=\"https:\/\/wg21.link\/P2255\">P2255<\/a> \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0442\u0440\u0435\u0439\u0442 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043b\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 <code>std::tuple<\/code> \u0438 <code>std::pair<\/code>.<\/li>\n<li>\u0412 <a href=\"https:\/\/wg21.link\/P2173\">P2173<\/a> \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043a \u043b\u044f\u043c\u0431\u0434\u0430\u043c: <code>[][[noreturn]]() { std::abort(); }<\/code>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>Feature freeze<\/h2>\n<p>  \u041a\u043e\u043c\u0438\u0442\u0435\u0442 C++ \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f:<\/p>\n<ul>\n<li>Library Incubator (LEWGI);<\/li>\n<li>Library Evolution (LEWG);<\/li>\n<li>Library Wording (LWG);<\/li>\n<li>Language Evolution Incubator (EWGI);<\/li>\n<li>Core Language Evolution (EWG);<\/li>\n<li>Core Language Wording (\u0421WG).<\/li>\n<\/ul>\n<p>  \u041b\u044e\u0431\u043e\u0435 \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0438 \u0438\u0437 \u043d\u0438\u0445: <code>LEWGI -> LEWG -> LWG<\/code> \u0438\u043b\u0438 <code>EWGI -> EWG -> \u0421WG<\/code>. \u0422\u0430\u043a \u0432\u043e\u0442, LEWGI, LEWG, EWGI \u0438 EWG \u043f\u0440\u0435\u043a\u0440\u0430\u0442\u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u0421++23 \u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f C++26. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0438 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0438\u0434\u0435\u0438:<\/p>\n<ul>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 stacktrace \u0438\u0437 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439;<\/li>\n<li>Networking;<\/li>\n<li>Reflection;<\/li>\n<li>\u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u0430\u043c\u0438.<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u043e\u0432\u0438\u043d\u043a\u0438 \u0443\u0436\u0435 \u043f\u0440\u043e\u0448\u043b\u0438 \u044d\u0442\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u0438\u043c\u0435\u044e\u0442 \u0448\u0430\u043d\u0441 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432 C++23: <\/p>\n<ul>\n<li>mdspan;<\/li>\n<li>flat_map;<\/li>\n<li>float16_t;<\/li>\n<li>generator.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0442\u043e\u0433\u043e\u0432<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438, \u043a\u0430\u043a \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044f\u0437\u044b\u043a C++, \u2014 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441 \u043d\u0430\u043c\u0438 \u043d\u0430 <a href=\"https:\/\/stdcpp.ru\/proposals\/\">\u0441\u0430\u0439\u0442\u0435 \u0420\u041321: stdcpp.ru<\/a>. C++23 \u0432\u0441\u0451 \u0431\u043b\u0438\u0436\u0443 \u043a \u0440\u0435\u043b\u0438\u0437\u0443, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u0431\u0430\u0433\u0430\u0445 \u0438 \u043d\u0435\u0434\u043e\u0447\u0451\u0442\u0430\u0445 \u044f\u0437\u044b\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u043e\u0442 \u0420\u043e\u0441\u0441\u0438\u0438.<\/p>\n<p>  \u041d\u0443 \u0438 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u2014 17 \u0444\u0435\u0432\u0440\u0430\u043b\u044f \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0434\u0451\u043c \u0432\u0441\u0442\u0440\u0435\u0447\u0443 \u0420\u041321, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u043e \u0433\u043e\u0442\u043e\u0432\u044f\u0449\u0438\u0445\u0441\u044f \u043d\u043e\u0432\u0438\u043d\u043a\u0430\u0445 C++, \u043f\u043e\u0434\u0435\u043b\u0438\u043c\u0441\u044f \u0438\u043d\u0441\u0430\u0439\u0442\u0430\u043c\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u043c \u043d\u0430 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c <a href=\"https:\/\/events.yandex.ru\/events\/rg21-cxx-17_02_2022\/?from=habr\">\u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/649497\/\"> https:\/\/habr.com\/ru\/company\/yandex\/blog\/649497\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg\" width=\"70%\" data-src=\"https:\/\/habrastorage.org\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg\" data-blurred=\"true\"\/><\/div>\n<p>  \u0411\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u0441\u043b\u043e\u0432, \u043f\u0440\u044f\u043c\u043e \u043a \u0434\u0435\u043b\u0443 \u2014 \u0432\u043e\u0442 \u043a\u0430\u043a\u0438\u0435 \u043d\u043e\u0432\u044b\u0435 \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0441 \u0436\u0434\u0430\u0442\u044c \u0432 C++23:<\/p>\n<ul>\n<li><code>std::expected<\/code> \u2014 \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u043a\u043e\u0434\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430.<\/li>\n<li>constexpr-\u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u2014 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0447\u0438\u0441\u0435\u043b \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u043a\u0438 \u0438 \u043e\u043a\u0440\u0443\u0433\u043b\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u0430.<\/li>\n<li><code>std::ranges::to<\/code> \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/li>\n<li><code>std::views::join_with<\/code> \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/li>\n<\/ul>\n<p>  \u0427\u0442\u043e \u043c\u044b <b>\u043d\u0435<\/b> \u0443\u0432\u0438\u0434\u0438\u043c \u0432 C++23, \u043d\u0430 \u0447\u0442\u043e \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f \u0438 \u0447\u0442\u043e \u0435\u0449\u0451 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430? \u0412\u0441\u0451 \u044d\u0442\u043e \u0436\u0434\u0451\u0442 \u0432\u0430\u0441 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-329304","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=329304"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329304\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}