{"id":465544,"date":"2025-07-01T15:27:44","date_gmt":"2025-07-01T15:27:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=465544"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=465544","title":{"rendered":"<span>\u0412\u0441\u0442\u0440\u0435\u0447\u0430 ISO C++ \u0432 \u0421\u043e\u0444\u0438\u0438: \u0421++26 \u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body 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\/w1560\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg\" width=\"70%\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> \u041f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u043d\u0442\u043e\u043d \u041f\u043e\u043b\u0443\u0445\u0438\u043d \u0438\u0437 \u0422\u0435\u0445\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0413\u043e\u0440\u043e\u0434\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u042f\u043d\u0434\u0435\u043a\u0441\u0430, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u043e\u0444\u0438\u0439\u0441\u043a\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u041c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430 \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f C++, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u0435. \u042d\u0442\u043e \u0431\u044b\u043b\u0430 <b>\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f<\/b> \u0432\u0441\u0442\u0440\u0435\u0447\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 \u044f\u0437\u044b\u043a\u0430, \u0441 \u043f\u0440\u0435\u0434\u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0445 \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c, \u0435\u0449\u0451 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 C++26.<\/p>\n<p> \u0418 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0432\u0437\u043e\u0448\u0451\u043b \u0432\u0441\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f: <\/p>\n<ul>\n<li>compile-time-\u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f<\/li>\n<li>\u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/li>\n<li>\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/li>\n<li><code>std::optional&lt;T&amp;\u200d&gt;<\/code><\/li>\n<li>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/li>\n<\/ul>\n<p> <a name=\"habracut\"><\/a> <\/p>\n<h1>Compile-time \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f<\/h1>\n<p> \u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432 C++26! \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u044b\u0435 \u043d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u0438\u0435 \u043e\u0436\u0438\u0434\u0430\u043b\u0438 \u044d\u0442\u0443 \u0444\u0438\u0447\u0443 \u2014 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u0436\u0435 \u0447\u0435\u0448\u0443\u0442\u0441\u044f \u0440\u0443\u043a\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0441 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e.<br \/> \u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0432 C++ \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u0435\u0434\u044c \u043e\u043d\u0430: <\/p>\n<ul>\n<li>Compile-time \u2014 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438.<\/li>\n<li>Type-erased \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 (\u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, namespace) \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0442\u0438\u043f: <code>std::meta::info<\/code>.<\/li>\n<li>\u0418\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 \u0438\u0434\u0451\u0442 \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u043c \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u043c\u0435\u0442\u0430\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432).<\/li>\n<li>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u044f\u0437\u044b\u043a\u0430, \u0430 \u043d\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/li>\n<li>\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (public, private) \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/li>\n<li>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441ompile-time-\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p> \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u043e\u0449\u043d\u044b\u0439 \u2014 \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0431\u0440\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e boilerplate code \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 (\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c) \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f (enum) \u043d\u0430 \u0435\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0412 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 bimap:<\/p>\n<pre><code class=\"cpp\">enum class Colors { kRed, kOrange, kYellow, kGreen, kBlue, kViolet };   constexpr userver::utils::TrivialBiMap kColorSwitch = [](auto selector) {     return selector()         .Case(\"Red\", Colors::kRed)         .Case(\"Orange\", Colors::kOrange)         .Case(\"Yellow\", Colors::kYellow)         .Case(\"Green\", Colors::kGreen)         .Case(\"Blue\", Colors::kBlue)         .Case(\"Violet\", Colors::kViolet); };   TEST(TrivialBiMap, EnumToString) {     EXPECT_EQ(kColorSwitch.TryFind(Colors::kGreen), \"Green\");     EXPECT_EQ(kColorSwitch.TryFind(\"Orange\"), Colors::kOrange); } <\/code><\/pre>\n<p> \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0438 \u2014 \u0432\u0435\u0441\u044c\u043c\u0430 \u0440\u0443\u0442\u0438\u043d\u043d\u0430\u044f \u0438 \u0441\u043a\u0443\u0447\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b:<\/p>\n<pre><code class=\"cpp\">namespace impl {     template &lt;typename E&gt;     consteval auto MakeEnumLambda() {         auto lambda = [](auto selector) {             auto s = selector();             template for (std::meta::info e : std::meta::enumerators_of(^^E)) {                 s.Case(                     std::meta::extract&lt;E&gt;(e),                     std::meta::identifier_of(e).remove_prefix(1)  \/\/ \u0443\u0434\u0430\u043b\u044f\u0435\u043c `k`                 );             });             return s;         };         return lambda;     } } \/\/ namespace impl  template &lt;typename E&gt;   requires std::is_enum_v&lt;E&gt; inline constexpr userver::utils::TrivialBiMap kEnum = impl::MakeEnumLambda&lt;E&gt;(); <\/code><\/pre>\n<p> \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">enum class Colors { kRed, kOrange, kYellow, kGreen, kBlue, kViolet };   TEST(TrivialBiMap, EnumToString) {     EXPECT_EQ(kEnum&lt;Colors&gt;.TryFind(Colors::kGreen), \"Green\");     EXPECT_EQ(kEnum&lt;Colors&gt;.TryFind(\"Orange\"), Colors::kOrange); } <\/code><\/pre>\n<p> <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0427\u0442\u043e \u0437\u0430 utils::TrivialBiMap?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u042d\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0445 \u043d\u0430 compile-time-\u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043e\u043b\u043d\u0438\u0435\u043d\u043e\u0441\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0438 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0437\u0430 O(1). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c unordered-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438 flat_map. \u041c\u044b \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \ud83d\udc19 userver \u0432 \u0422\u0435\u0445\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0413\u043e\u0440\u043e\u0434\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u042f\u043d\u0434\u0435\u043a\u0441\u0430. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/userver-framework\/userver\/blob\/develop\/universal\/include\/userver\/utils\/trivial_map.hpp\">\u043d\u0430 \u0413\u0438\u0442\u0445\u0430\u0431\u0435<\/a>, \u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0435\u0441\u0442\u044c <a href=\"https:\/\/vkvideo.ru\/video-77278886_456239838?t=27m35s\">\u0432 \u0432\u0438\u0434\u0435\u043e<\/a>. <\/div>\n<\/p><\/div>\n<p> \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 <a href=\"https:\/\/wg21.link\/P2996\">P2996<\/a>. \u0421 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 <code>template for<\/code> (expansion statement, compile-time \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b\u0439 \u0446\u0438\u043a\u043b) \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 <a href=\"https:\/\/wg21.link\/P1306\">P1306<\/a>.<\/p>\n<p> \u041e\u0442 \u043c\u0435\u043d\u044f, \u043a\u0430\u043a \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u044f\u0437\u044b\u043a\u0430 C++, \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c \u043b\u044e\u0434\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439! \u042d\u0442\u043e \u0431\u044b\u043b \u0434\u043e\u043b\u0433\u0438\u0439 \u043f\u0443\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0430\u043b\u0441\u044f \u0432 2007 \u0433\u043e\u0434\u0443 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>constepxr<\/code>. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u041a\u043e\u043c\u0438\u0442\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 compile-time-\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439: \u0434\u043e\u0431\u0430\u0432\u0438\u043b <code>constepxr<\/code>-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0440\u0430\u0437\u043c\u0435\u0442\u0438\u043b \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u0430\u043a <code>constepxr<\/code>, \u0432\u0432\u0451\u043b <code>consteval<\/code>, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b <code>constepxr<\/code>-\u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0432 <code>constepxr<\/code>\u2026 \u2014 \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u0440\u0438\u0448\u0451\u043b \u043a P2996!<\/p>\n<p> \u041f\u0440\u0438\u044f\u0442\u043d\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c, \u0447\u0442\u043e <a href=\"https:\/\/stdcpp.ru\/\">\u0420\u0430\u0431\u043e\u0447\u0430\u044f \u0413\u0440\u0443\u043f\u043f\u0430 21<\/a> \u0442\u043e\u0436\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u043b\u0430 \u0440\u0443\u043a\u0443 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443: <a href=\"https:\/\/wg21.link\/P0031\">P0031<\/a>, <a href=\"https:\/\/wg21.link\/P0426\">P0426<\/a>, <a href=\"https:\/\/wg21.link\/P0639\">P0639<\/a>, <a href=\"https:\/\/wg21.link\/P0202\">P0202<\/a>, <a href=\"https:\/\/wg21.link\/P0858\">P0858<\/a>, <a href=\"https:\/\/wg21.link\/P0879\">P0879<\/a>, <a href=\"https:\/\/wg21.link\/P1032\">P1032<\/a>, <a href=\"https:\/\/wg21.link\/P2291\">P2291<\/a>, <a href=\"https:\/\/wg21.link\/P2417\">P2417<\/a>\u2026 \u0425\u043e\u0442\u044f \u043d\u0430\u0448 \u0432\u043a\u043b\u0430\u0434 \u043d\u0435\u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439, \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 Daveed Vandevoorde, Hana Dus\u00edkov\u00e1, Faisal Vali, Andrew Sutton, Barry Revzin, Dan Katz, Peter Dimov, Wyatt Childers \u0438 \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438, \u0433\u043e\u0434\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u043c\u0438 \u043d\u0430\u0434 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0435\u0439 \u0438 <code>constepxr<\/code>-\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<h1>\u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h1>\n<p> \u041f\u0440\u0430\u0437\u0434\u043d\u0438\u043a \u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438 P2996 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f. \u0412\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/wg21.link\/P3096\">P3096<\/a> \u0438 <a href=\"https:\/\/wg21.link\/P3394\">P3394<\/a>.<\/p>\n<p> \u041f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0438\u043f\u044b \u0438 \u0438\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0438 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u2014 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u042d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439, \u043d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0445\u0440\u0443\u043f\u043a\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a C++ \u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0438 \u043e\u043d\u0438 \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a \u0438\u043c\u0435\u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0431\u0435\u0437 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p> \u0412\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438!), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0438 \u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p> \u0423 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0435\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>[[=constant-expression]]<\/code>, \u0433\u0434\u0435 <code>constant-expression<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p> \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u0435\u0437 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">namespace my_reflection {  template &lt;typename T&gt; void PrintKeyValue(const T&amp; value) {     template for (constexpr auto field : nonstatic_data_members_of(^^T)) {         std::println(\"{}: {}\", identifier_of(field), value.[: field :]);     } }  }  \/\/ namespace my_reflection  \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: struct Pair {     int first;     int y; }; my_reflection::PrintKeyValue(Pair{1, 2}); \/\/ \u0412\u044b\u0432e\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c: \/\/ first: 1 \/\/ y: 2 <\/code><\/pre>\n<p> \u0410 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u0435\u0439:<\/p>\n<pre><code class=\"cpp\">namespace my_reflection {  struct Name{ std::string_view name; };  template &lt;typename T&gt; void PrintKeyValue(const T&amp; value) {     template for (constexpr auto field : nonstatic_data_members_of(^^T)) {         constexpr auto annotation_vec = annotations_of(field);         constexpr std::string_view name = (             annotation_vec.size() == 1                 &amp;&amp; type_of(annotation_vec[0]) == ^^my_reflection::Name             ? std::meta::extract&lt;my_reflection::Name&gt;(annotation_vec[0]).name             : identifier_of(field)         );         std::println(\"{}: {}\", name, value.[: field :]);     } }  }  \/\/ namespace my_reflection  \/\/ \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: struct Pair {     int first;     [[=my_reflection::Name{\"second\"}]]     int y; }; my_reflection::PrintKeyValue(Pair{1, 2}); \/\/ \u0412\u044b\u0432e\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c: \/\/ first: 1 \/\/ second: 2 <\/code><\/pre>\n<p> \u0415\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u0441\u0430\u043c\u043e\u043c <a href=\"https:\/\/wg21.link\/P3394\">\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438 P3394<\/a>.<\/p>\n<h1>std::optional&lt;T&amp;\u200d&gt;<\/h1>\n<p> \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Boost.Optional \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>boost::optional&lt;T&amp;\u200d&gt;<\/code>. \u0412 <a href=\"https:\/\/wg21.link\/P2988\">P2988<\/a> \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0435\u0445\u0430\u043b\u0430 \u0438 \u0434\u043e C++26.<\/p>\n<p> \u041d\u043e \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e <code>T*<\/code>, \u0437\u0430\u0447\u0435\u043c \u0436\u0435 \u043d\u0443\u0436\u0435\u043d <code>std::optional&lt;T&amp;\u200d&gt;<\/code>? \u0423 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u043b\u044e\u0441\u044b: <\/p>\n<ul>\n<li>\u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u044f \u043e\u0442 \u0447\u0430\u0441\u0442\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a;<\/li>\n<li>\u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u043d\u0438\u044f (\u0430 \u043d\u0430\u0434\u043e \u043b\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e?);<\/li>\n<li>\u0438\u043c\u0435\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u043d\u0430\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 value_or()-\u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/li>\n<li>\u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432 ranges.<\/li>\n<\/ul>\n<h1>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/h1>\n<p> \u0420\u0430\u0434\u043e\u0441\u0442\u043d\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438. \u0421 \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0435\u043c \u0432 C++26 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f <a href=\"https:\/\/wg21.link\/P3179\">P3179<\/a> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>std::execution::par_unseq<\/code>) \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u0432 <code>std::ranges<\/code>.<\/p>\n<p> \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, Ruslan Arutyunyan, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0444\u0438\u0448\u043a\u0443 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 <a href=\"https:\/\/wg21.link\/P3179\">P3179<\/a> <code>ranges<\/code> \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u0412\u043c\u0435\u0441\u0442\u043e <code>std::ranges::copy(std::execution::par, in, out.begin());<\/code> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u0438\u0434\u0430 <code>std::ranges::copy(std::execution::par, in, out);<\/code>. <\/p>\n<p> \u0415\u0441\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439, \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u043f\u0440\u043e\u0435\u0437\u0434\u0430 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u2014 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043b \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043f\u043e \u043e\u0448\u0438\u0431\u043a\u0435, \u0443 \u043d\u0435\u0433\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c: \u0432\u0441\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0442\u043e\u0447\u043a\u0443, \u0434\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0438 \u0441\u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0439\u0442\u0438 \u0432\u043e \u0432\u0445\u043e\u0434\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 (\u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430\u0445). \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u044d\u0442\u043e\u043c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f ranges::reverse_copy \u0438 ranges::rotate_copy. \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u0432\u0443\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445 \u0432 <a href=\"https:\/\/wg21.link\/P3179\">P3179<\/a> \u0438 \u0432 <a href=\"https:\/\/wg21.link\/P3709\">P3709<\/a><\/p>\n<p> \u0413\u0440\u0443\u0441\u0442\u043d\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0441 schedulers \u0438 senders \u0438\u0437 \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0432 C++26 <a href=\"https:\/\/wg21.link\/P2300\">P2300<\/a>. \u0420\u0430\u0431\u043e\u0442\u0430 \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0441\u044f \u0443\u0436\u0435 \u0432 C++29 (\u0432 <a href=\"https:\/\/wg21.link\/P2500\">P2500<\/a>).<\/p>\n<p> \u0412 <a href=\"https:\/\/wg21.link\/P3111\">P3111<\/a> \u0434\u043b\u044f C++26 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0418\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u044b <code>void store_<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>fetch_<\/code>, \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u0438\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<p> \u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043f\u0440\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b? \u0410 \u0432\u043e\u0442 \u0447\u0442\u043e: \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443, \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>atomic::fetch_<\/code> \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445 \u0441 <code>std::execution::*unseq<\/code>. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 <code>atomic::store_<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u2014 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 <code>std::execution::*unseq<\/code>.<\/p>\n<h1>\u0415\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e ranges<\/h1>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0438\u0433\u0440\u0430\u0435\u043c \u0432 \u0443\u0433\u0430\u0434\u0430\u0439\u043a\u0443! \u041a\u0430\u043a \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f?<\/p>\n<pre><code class=\"cpp\">for (auto x : std::ranges::iota(0, some_vector.size())) {     std::cout &lt;&lt; some_vector[x] &lt;&lt; std::endl; } <\/code><\/pre>\n<p> <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0430\u0437\u0433\u0430\u0434\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041a\u043e\u0434 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u043c\u0438 <code>no matching function for call to 'iota_view(int, long unsigned int)'<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a iota \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. <\/div>\n<\/p><\/div>\n<p> \u041a\u0430\u043a \u0440\u0430\u0437 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0438 \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0433\u043e, \u0432 C++26 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d <code>std::ranges::indices<\/code> \u0432 <a href=\"https:\/\/wg21.link\/P3060\">P3060<\/a>:<\/p>\n<pre><code class=\"cpp\">for (auto x : std::ranges::indices(some_vector.size())) {     std::cout &lt;&lt; some_vector[x] &lt;&lt; std::endl; } <\/code><\/pre>\n<p> \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0441 \u043d\u0430\u0448\u0435\u0439 \u0443\u0433\u0430\u0434\u0430\u0439\u043a\u043e\u0439. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0433\u0430\u0434\u043a\u0430 \u043e\u0442 Nicolai Josuttis. \u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435?<\/p>\n<pre><code class=\"cpp\">std::vector&lt;std::string&gt; coll1{\"Amsterdam\", \"Berlin\", \"Cologne\", \"LA\"};   \/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440   auto large = [](const auto&amp; s) { return s.size() &gt; 5; };   auto sub = coll1 | std::views::filter(large)                    | std::views::reverse                    | std::views::as_rvalue                    | std::ranges::to&lt;std::vector&gt;(); <\/code><\/pre>\n<p> <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0420\u0430\u0437\u0433\u0430\u0434\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0410 \u0432\u043e\u0442 \u0442\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0435\u0437\u0434 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 Segmentation Fault. \u041f\u043e\u0447\u0435\u043c\u0443? \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c <a href=\"https:\/\/www.godbolt.org\/z\/qrMYb3G4d\">\u0441\u0441\u044b\u043b\u043a\u043e\u0439<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>std::println<\/code> \u0432 \u0444\u0438\u043b\u044c\u0442\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c. <\/div>\n<\/p><\/div>\n<p> \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u0434\u0438\u0437\u0430\u0439\u043d\u0435 <code>std::views::filter<\/code>. \u0423\u0432\u044b, \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d \u043d\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0435. \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u00ab\u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c\u00bb \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c, \u0438 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f\u0445 \u0444\u0438\u043b\u044c\u0442\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441 \u0443\u043c\u0430. Nicolai Josuttis \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0435\u0449\u0451 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c (undefined behavior, UB) \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0443\u043c\u0435\u0440\u0448\u0438\u0445 \u043c\u043e\u043d\u0441\u0442\u0440\u043e\u0432 \u043a \u0436\u0438\u0437\u043d\u0438 auto dead = [] (const auto&amp; m) { return m.isDead(); }; for (auto&amp; m : monsters | std::views::filter(dead)) {   m.bringBackToLive();  \/\/ undefined behavior } <\/code><\/pre>\n<p> \u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u043e\u0441\u043b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0431\u044b\u043b \u0435\u0449\u0451, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>std::views::reverse<\/code>, \u043a\u043e\u0434 \u043c\u043e\u0433 \u0431\u044b \u0441\u043b\u043e\u043c\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p> \u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0443\u0436\u0430\u0441\u044b c <code>std::views::filter<\/code>, \u0432 <a href=\"https:\/\/wg21.link\/P3725\">P3725<\/a> (\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043a\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d) \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c<br \/> <code>std::views::input_filter<\/code>, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0431\u0438\u0440\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435\u043d <code>filter_view(to_input_view(E), P)<\/code>. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u0443 \u043d\u043e\u0432\u0438\u043d\u043a\u0443 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043a\u0430\u043a \u0431\u0430\u0433\u0444\u0438\u043a\u0441 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u0432 C++26.<\/p>\n<h1>\u041f\u0440\u043e\u0447\u0438\u0435 \u043d\u043e\u0432\u0438\u043d\u043a\u0438<\/h1>\n<p> <\/p>\n<ul>\n<li><code>std::string <\/code>\u043e\u0431\u0437\u0430\u0432\u0451\u043b\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>subview<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 <code>substr<\/code>, \u043d\u043e, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>std::string_view<\/code> (<a href=\"https:\/\/wg21.link\/P3044\">P3044<\/a>).<\/li>\n<li><code>std::simd<\/code> \u043e\u0431\u0440\u043e\u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 <a href=\"https:\/\/wg21.link\/P2876\">P2876<\/a>, <a href=\"https:\/\/wg21.link\/P3480\">P3480<\/a>, <a href=\"https:\/\/wg21.link\/P2664\">P2664<\/a>, <a href=\"https:\/\/wg21.link\/P3691\">P3691<\/a>.<\/li>\n<li>\u0418\u0437 <code>std::exception_ptr<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043d\u0435 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u044f \u0435\u0433\u043e, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>std::exception_ptr_cast&lt;Exception&gt;(exception_ptr)<\/code> (<a href=\"https:\/\/wg21.link\/P2927\">P2927<\/a>). \u0418 \u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u0436\u0435 \u0432 compile-time (<a href=\"https:\/\/wg21.link\/P3748\">P3748<\/a>, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e\u0437\u0436\u0435).<\/li>\n<li>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0441\u043a\u043e\u0447\u0438\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435<a href=\"https:\/\/wg21.link\/P3560\">P3560<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0434\u043b\u044f \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438. \u0422\u043e, \u0447\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043b\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c, \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044b\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u2014 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u043e\u0432\u0438\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c.<\/li>\n<li>\u0418\u0437 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043c\u0435\u043b\u043e\u0447\u0435\u0439 \u2014 \u0432 C++26 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 <code>std::constant_wrapper<\/code> \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e constexpr <code>std::cw<\/code>. \u042d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0442\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u043d\u0430 \u0434\u043b\u044f <code>std::integral_constant<\/code>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u0432\u0441\u0435\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u043d\u0438\u0436\u0435\u043b\u0435\u0436\u0430\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0430\u043a compile-time-\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b:<\/li>\n<\/ul>\n<p> <\/p>\n<pre><code class=\"cpp\">  void sum_is_42(auto x, auto y) {     static_assert(x + y == 42);   }   sum_is_42(std::cw&lt;40&gt;, std::cw&lt;2&gt;); <\/code><\/pre>\n<p> <\/p>\n<ul>\n<li><code>std::cw<\/code> \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f <a href=\"https:\/\/wg21.link\/P2781\">P2781<\/a> \u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0443\u0434\u043e\u0431\u0435\u043d \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <code>std::mdspan<\/code>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>std::mdspan(data, std::integral_constant&lt;std::size_t, 10&gt;{}, std::integral_constant&lt;std::size_t, 20&gt;{}, std::integral_constant&lt;std::size_t, 30&gt;{});<\/code>, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432 <code>std::mdspan(data, std::cw&lt;10&gt;, std::cw&lt;20&gt;, std::cw&lt;30&gt;);<\/code><\/li>\n<li>\u0412 executors \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <code>std::execution::task<\/code> \u0432 <a href=\"https:\/\/wg21.link\/P3552\">P3552<\/a> \u0438 <code>std::execution::write_env<\/code> + <code>std::execution::unstoppable<\/code> sender-\u0430\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0432 <a href=\"https:\/\/wg21.link\/P3284\">P3284<\/a>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0449\u0430\u0442\u044c executors \u0438 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, <s>\u0447\u0442\u043e\u0431\u044b \u0435\u0449\u0451 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0441\u043c\u0443\u0449\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u0433 \u043d\u0430 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e<\/s>.<\/li>\n<li>\u041d\u0430\u043a\u043e\u043d\u0435\u0446 \u0432 <a href=\"https:\/\/wg21.link\/P3697\">P3697<\/a> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u043d\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u0430\u0435\u043a \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e, \u0438 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043e\u0431\u0440\u043e\u0441\u043b\u0438 hardening-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438.<\/li>\n<\/ul>\n<h1>\u0418\u0442\u043e\u0433\u0438<\/h1>\n<p> C++26 \u0442\u0435\u043f\u0435\u0440\u044c feature complete! \u0418 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0432 \u043d\u0451\u043c \u0431\u0443\u0434\u0435\u0442!<\/p>\n<p> \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u0430\u043f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0421++: \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u0438 \u0441\u0442\u0440\u0430\u043d \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442 \u0441\u0432\u043e\u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043a C++26, \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u0430\u0436\u043d\u044b\u0435 \u0431\u0430\u0433\u0438 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0422\u0443\u0442 \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u044e \u043b\u0435\u043f\u0442\u0443! \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043a C++26 \u0438\u043b\u0438 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u043c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u0430\u0434\u0430\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0433, \u0430 \u043c\u043e\u0436\u0435\u0442, \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u0440\u0430\u0437\u0434\u0435\u043b \u00ab<a href=\"https:\/\/stdcpp.ru\/proposals\">\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>\u00bb: \u0438 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0432\u0430\u0448\u0438 (\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c\u044b\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435) \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432 ISO. \u0420\u0430\u0437\u0431\u043e\u0440\u0430\u043c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u0431\u0430\u0433\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0435 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u041c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430.<\/p>\n<p> \u041d\u0430 \u044d\u0442\u043e\u043c \u0443 \u043c\u0435\u043d\u044f \u0432\u0441\u0451. \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0435 \u043f\u043e\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/clck.ru\/3MpN9W\">C++ Zero Cost Conf<\/a> 2 \u0430\u0432\u0433\u0443\u0441\u0442\u0430, \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u043e\u043a\u043b\u0430\u0434\u044b \u0438 \u043f\u043e\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 userver \u043d\u0430 \u0441\u0442\u0435\u043d\u0434\u0435 \u0433\u043e\u0440\u043e\u0434\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u042f\u043d\u0434\u0435\u043a\u0441\u0430.<\/p>\n<p> \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043e \u0441\u0430\u043c\u043e\u0439 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439 \u0438\u043b\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 \u0444\u0438\u0447\u0435 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u044f\u0449\u0435\u043c C++26. \u0421 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \ud83d\ude42<\/p><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/920470\/\"> https:\/\/habr.com\/ru\/articles\/920470\/<\/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 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\/w1560\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg\" width=\"70%\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/k3\/ay\/8j\/k3ay8ji3lxa1_bpqaxlkcfsp1da.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/div>\n<p> \u041f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u043d\u0442\u043e\u043d \u041f\u043e\u043b\u0443\u0445\u0438\u043d \u0438\u0437 \u0422\u0435\u0445\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0413\u043e\u0440\u043e\u0434\u0441\u043a\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u042f\u043d\u0434\u0435\u043a\u0441\u0430, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0441\u043e\u0444\u0438\u0439\u0441\u043a\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u041c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430 \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f C++, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u0435. \u042d\u0442\u043e \u0431\u044b\u043b\u0430 <b>\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f<\/b> \u0432\u0441\u0442\u0440\u0435\u0447\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438 \u044f\u0437\u044b\u043a\u0430, \u0441 \u043f\u0440\u0435\u0434\u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0445 \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c, \u0435\u0449\u0451 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 C++26.<\/p>\n<p> \u0418 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0435\u0432\u0437\u043e\u0448\u0451\u043b \u0432\u0441\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f: <\/p>\n<ul>\n<li>compile-time-\u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f<\/li>\n<li>\u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/li>\n<li>\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438<\/li>\n<li><code>std::optional&lt;T&amp;\u200d&gt;<\/code><\/li>\n<li>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b<\/li>\n<\/ul>\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-465544","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465544","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=465544"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/465544\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=465544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=465544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=465544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}