{"id":292720,"date":"2019-07-29T15:01:19","date_gmt":"2019-07-29T15:01:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292720"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292720","title":{"rendered":"C++20 \u0443\u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u043e\u0432\u0430\u043d, C++23 \u043d\u0430\u0447\u0430\u0442. \u0418\u0442\u043e\u0433\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0432 \u041a\u0451\u043b\u044c\u043d\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041d\u0430 \u0434\u043d\u044f\u0445 \u043f\u0440\u043e\u0448\u043b\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u043c\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 C++ \u0432 \u041a\u0451\u043b\u044c\u043d\u0435. \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u044f\u0442 feature freeze \u043d\u0430 C++20, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043e\u043c\u0438\u0442\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0432\u0435\u0449\u0435\u0439, \u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u0438\u043d\u043a\u0438 \u0443\u0436\u0435 \u0432 C++23\u2026<\/p>\n<p>  \u2026 \u043d\u043e \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4v\/uz\/6i\/4vuz6in4hwxgrnulziaj8pacu8w.jpeg\"><\/p>\n<p>  \u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441 std::flat_map; \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 co_return, co_await \u0438 co_yield; \u0443\u0441\u043f\u0435\u043b\u0438 \u043b\u0438 \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c std::format; \u0432 \u043a\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0432 C++20? \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0430\u0441 \u0436\u0434\u0451\u0442 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>Evolution Working Group<\/h2>\n<p>  <\/p>\n<h4>\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a<\/h4>\n<p>  \u0414\u0435\u043d\u044c \u0431\u044b\u043b \u043d\u0430\u0441\u044b\u0449\u0435\u043d\u043d\u044b\u043c \u2014 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u044b \u0432 snake_case \u0432\u043c\u0435\u0441\u0442\u043e CamelCase. \u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u043e\u043c \u043f\u043e \u0433\u043e\u043b\u043e\u0441\u0430\u043c \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/wg21.link\/p1607\">P1607<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 (\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0435\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432).<\/p>\n<h4>\u0412\u0442\u043e\u0440\u043d\u0438\u043a<\/h4>\n<p>  \u041e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0438 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b. \u041e\u0442\u043a\u043b\u043e\u043d\u0438\u043b\u0438 \u0432\u0441\u0451, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2019\/p1485r1.html\">\u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435 co_ \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u0440\u0443\u0442\u0438\u043d<\/a>. \u0423\u0432\u044b.<\/p>\n<h4>\u0421\u0440\u0435\u0434\u0430<\/h4>\n<p>  \u0412\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0441\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u043b\u0438, \u0447\u0442\u043e \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u043e\u0435 \u0432 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/wg21.link\/p1607\">P1607<\/a> \u043d\u0438\u043a\u0442\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043d\u043e \u043c\u0438\u043d\u0443\u0442 30, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043e\u0442\u0442\u0430\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0433\u0438\u0445 \u043b\u0435\u0442.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a C++20. \u0418 \u0443\u0431\u0440\u0430\u043b\u0438 \u0438\u0445 \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430.<\/p>\n<h4>\u0427\u0435\u0442\u0432\u0435\u0440\u0433, \u043f\u044f\u0442\u043d\u0438\u0446\u0430<\/h4>\n<p>  \u041e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0438 \u0432\u0435\u0449\u0438 \u0434\u043b\u044f C++23. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0438\u043b\u044b \u0431\u044b\u043b\u0438 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u044b \u043d\u0430 \u043d\u043e\u0432\u044b\u0445 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430\u0445 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u0411\u044b\u043b\u0438 \u043a\u0430\u043a <a href=\"https:\/\/wg21.link\/p1095r0\">\u043e\u0431\u0449\u0438\u0435 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u044f<\/a> \u043d\u0430 \u0442\u0435\u043c\u0443, \u0442\u0430\u043a \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 <a href=\"https:\/\/wg21.link\/p0709r3\">\u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 throws<\/a>.<\/p>\n<h2>Library Working Group<\/h2>\n<p>  \u0412 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0430 LWG. \u041b\u044e\u0431\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u043e\u0439\u0442\u0438 \u0440\u0435\u0432\u044c\u044e \u0432 \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0435.<\/p>\n<p>  \u0421\u0440\u0435\u0434\u043d\u044f\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c LWG \u2014 ~30 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0435\u0434\u0435\u043b\u044e. \u0412 \u041a\u0451\u043b\u044c\u043d\u0435 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0431\u043e\u043b\u0435\u0435 50 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043a\u043e\u043b\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<br \/>  * <a href=\"https:\/\/wg21.link\/P0429\">std::flat_map<\/a><br \/>  * <a href=\"https:\/\/wg21.link\/P0660\">std::jthread<\/a><br \/>  * <a href=\"https:\/\/wg21.link\/P1614\">operator&lt;=&gt; \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/a><br \/>  * <a href=\"https:\/\/wg21.link\/P1135\">\u041d\u043e\u0432\u044b\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u044b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/a><br \/>  + \u0438\u0437 EWG \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0430 \u0431\u0443\u043c\u0430\u0433\u0430 \u043d\u0430 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u043e\u0432 \u0432 snake_case.<\/p>\n<h2>\u0427\u0442\u043e \u0438\u0437 \u0440\u0430\u043d\u0435\u0435 \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u043b\u0438 \u0434\u043e\u0442\u0430\u0449\u0438\u0442\u044c \u0434\u043e C++20<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/wg21.link\/p1331\">\u0432 constexpr \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u043b\u044c-\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<\/a>. \u0414\u043e\u043b\u043e\u0439 int i{};, \u0434\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0435\u0442 int i;.<\/li>\n<li><a href=\"http:\/\/wg21.link\/p0848\">requires \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432.<\/a> \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432:\n<pre><code class=\"cpp\">#include &lt;type_traits&gt;  template&lt;typename T&gt; struct Optional {     \/\/ ...     ~Optional() requires(std::is_trivially_destructible_v&lt;T&gt;) = default;     ~Optional() requires(!std::is_trivially_destructible_v&lt;T&gt;) {         if (inited_) reinterpret_cast&lt;T&amp;&gt;(data_).~T();     } private:     bool inited_{false};     std::aligned_storage_t&lt;sizeof(T), alignof(T)&gt; data_; }; <\/code><\/pre>\n<\/li>\n<li><a href=\"http:\/\/wg21.link\/p1301\">[[nodiscard]] \u043e\u0431\u0437\u0430\u0432\u0451\u043b\u0441\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c<\/a>. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u043d\u0430\u0434\u043e \u0433\u0430\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u0430\u0432\u0442\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043c\u0435\u043b \u0432 \u0432\u0438\u0434\u0443:\n<pre><code class=\"cpp\">template &lt;class F&gt; [[nodiscard(\"Without storing the result the code executes synchronously\")]] future async(F&amp;&amp; );  auto test() {     \/\/ ...      \/\/ warning: Without storing the result the code executes synchronously     async([huge_data](){         std::cerr &lt;&lt; huge_data;     }); } <\/code><\/pre>\n<\/li>\n<li><a href=\"https:\/\/wg21.link\/p1099\">using enum<\/a>:\n<pre><code class=\"cpp\">enum class rgba_channel { kRed, kGreen, kBlue, kAlpha};  std::string_view to_string(rgba_channel channel) {   using enum rgba_channel;   switch (channel) {     case kRed:   return \"red\";     case kGreen: return \"green\";     case kBlue:  return \"blue\";     case kAlpha: return \"alpha\";   } } <\/code><\/pre>\n<\/li>\n<li><a href=\"http:\/\/wg21.link\/p1816\">Deduction guides \u0434\u043b\u044f \u0430\u0433\u0440\u0435\u0433\u0430\u0442\u043e\u0432 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438<\/a>:\n<pre><code class=\"cpp\">template &lt;typename T&gt; struct S {     T x;     T y; };  S t{'4', '2'}; \/\/ Deduces `S&lt;char&gt;` <\/code><\/pre>\n<\/li>\n<li><a href=\"http:\/\/wg21.link\/p1668\">__asm \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 constexpr \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445<\/a> (\u043d\u043e \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f!)<\/li>\n<li><a href=\"https:\/\/wg21.link\/p0388\">\u041c\u0430\u0441\u0441\u0438\u0432\u044b \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430<\/a>. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438:\n<pre><code class=\"cpp\">void f(int(&amp;)[]); \/\/ p.s.: \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043d\u0435 \u043f\u0438\u0448\u0443\u0442 \u0431\u0435\u0437 \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 int arr[1];  f(arr);          \/\/ OK <\/code><\/pre>\n<\/li>\n<li>\u0412\u044b\u043a\u0438\u043d\u0443\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0438\u0437 C++20<\/li>\n<li>\u041d\u043e\u0432\u043e\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <a href=\"https:\/\/wg21.link\/p1143\">constinit<\/a> \u0434\u043b\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438:\n<pre><code class=\"cpp\">int count_invocations() {     \/\/ \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0441\u043e\u0431\u0435\u0440\u0451\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f     \/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e `counter` \u043d\u0430 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435.     \/\/     \/\/ \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 - \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f     \/\/ \u0447\u0442\u043e \u043a\u043e\u043c\u0438\u043f\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442 \u043b\u0438\u0448\u043d\u0438\u0435 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b     \/\/ `counter` \u043e\u0442 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.     static constinit std::atomic&lt;int&gt; counter{0};      return ++counter; } <\/code><\/pre>\n<\/li>\n<li>\u041f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u043b\u0438 <a href=\"https:\/\/wg21.link\/p1452\">\u043f\u0440\u0430\u0432\u0438\u043b\u0430<\/a> \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0430\u0445.<\/li>\n<li>\u041c\u043d\u043e\u0433\u0438\u0435 <a href=\"https:\/\/wg21.link\/p1152\">\u0441\u043b\u0443\u0447\u0430\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f volatile \u0442\u0435\u043f\u0435\u0440\u044c deprecated<\/a>. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0441\u044b\u043f\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.<\/li>\n<li>[[nodiscard]] \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0442\u044c <a href=\"https:\/\/wg21.link\/p1771\">\u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0438 \u0446\u0435\u043b\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b<\/a>:\n<pre><code class=\"cpp\">struct [[nodiscard]] my_scopeguard { \/* ... *\/ }; struct my_unique {     [[nodiscard]] my_unique(int fd) { \/* ... *\/ } \/\/ \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441 \u0432\u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435     \/* ... *\/ };  void sample() {     my_scopeguard(); \/\/ warning     void(my_scopeguard()); \/\/ cast \u043a void, warning \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f     my_unique(42); \/\/ warning } <\/code><\/pre>\n<\/li>\n<li>Class Template Argument Deduction <a href=\"https:\/\/wg21.link\/p1814\">\u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u0430\u043b\u0438\u0430\u0441\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/wg21.link\/p0784\">std::vector \u0438 placement new \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 constexpr<\/a><\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <a href=\"https:\/\/wg21.link\/p0553\">&lt;bit&gt; \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/a>. \u041f\u043e\u0432\u043e\u0440\u043e\u0442\u044b \u0431\u0438\u0442\u0438\u043a\u043e\u0432, \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u0435\u043a\/\u043d\u043e\u043b\u0438\u043a\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435\/\u043a\u043e\u043d\u0446\u0435, \u043f\u043e\u0434\u0441\u0447\u0451\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u0437\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u0438\u043a\u043e\u0432 \u2014 \u0432\u0441\u0451 \u044d\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438.<\/li>\n<li><a href=\"https:\/\/wg21.link\/p0645\">&lt;format&gt; \u0441 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a<\/a> \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0447\u0430\u0441\u0442\u044f\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u044f\u0437\u044b\u043a\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <a href=\"https:\/\/wg21.link\/p1361\">chrono \u0438 locale<\/a> \u0438 <a href=\"https:\/\/wg21.link\/p1652\">\u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 float<\/a>:\n<pre><code class=\"cpp\">constexpr auto birthday = 28d\/April\/1989; string s = format(\"At {0:%d} of {0:%B}, {0:%Y} someone was born\", birthday); assert(s == \"At 28 of April, 1989 someone was born\"); <\/code><\/pre>\n<\/li>\n<li><a href=\"https:\/\/wg21.link\/p1065\">constexpr \u0434\u043b\u044f bind, invoke, reference_wrapper<\/a><\/li>\n<li><a href=\"http:\/\/wg21.link\/p0631\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b &lt;numbers&gt; \u0441 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438<\/a><\/li>\n<li>\u0410\u0442\u043e\u043c\u0438\u043a\u0438 \u043e\u0431\u0437\u0430\u0432\u0435\u043b\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 wait \u0438 notify. \u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0435 conditional_variable:\n<pre><code class=\"cpp\">#include &lt;atomic&gt;  enum class States {     kInitial, kProcessing, kPosting, };  \/\/ \u0424\u0443! \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f! std::atomic&lt;States&gt; state{States::kInitial};  void state_machine_do_posting() {     for (;;) {         States expected_state = States::kProcessing;          \/\/ \u0416\u0434\u0435\u043c \u043f\u043e\u043a\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 kProcessing         state.wait(expected_state);          if (!state.compare_exchange_strong(expected_state, States::kPosting)) {             continue;         }          \/\/ do something     } } <\/code><\/pre>\n<\/li>\n<li>\u041a\u043e\u043d\u0446\u0435\u043f\u0442\u044b \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u044b \u0432 snake_case<\/li>\n<li>operator != \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 operator ==. \u041b\u0438\u0448\u043d\u0438\u0435 <a href=\"https:\/\/wg21.link\/p1614\">\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0431\u044b\u043b\u0438<\/a> \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044b \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 operator &lt;=&gt;<\/li>\n<li>std::*stringstream \u0438 std::basic_stringbuf \u043e\u0431\u0437\u0430\u0432\u0435\u043b\u0438\u0441\u044c <a href=\"https:\/\/wg21.link\/p0408\">\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438<\/a> \u0434\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u043e\u0434\u043a\u0430\u043f\u043e\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438:\n<pre><code class=\"cpp\">std::string to_string(const MyType&amp; v) {     std::string buf;     constexpr std::size_t kMaxSize = 32;     buf.reserve(kMaxSize);      \/\/ \u0414\u043e C++20 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0432 C++20 \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435     std::ostringstream oss{std::move(buf)};     oss &lt;&lt; \"MyType{\" &lt;&lt; v &lt;&lt; '}';      \/\/ \u0414\u043e C++20 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0432 C++20 \u2014 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442     return std::move(oss).str(); } <\/code><\/pre>\n<\/li>\n<li><a href=\"https:\/\/wg21.link\/p0660\">\u041d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/a> std::jthread:\n<pre><code class=\"cpp\">#include &lt;thread&gt;  void sample() {     bool ready = false;     std::mutex ready_mutex;     std::condition_variable_any ready_cv; \/\/ \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e `_any`!      std::jthread t([&amp;ready, &amp;ready_mutex, &amp;ready_cv] (std::stop_token st) {         while (!st.stop_requested()) {           \/* ... *\/           {             std::unique_lock lock{ready_mutex};              \/\/ \u0416\u0434\u0451\u0442 \u043d\u043e\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 ready == true, \u0438\u043b\u0438 stop_token.request_stop(),             \/\/ \u0438\u043b\u0438 jthread.request_stop().             ready_cv.wait_until(lock, [&amp;ready] { return ready; }, st);           }           \/* ... *\/         }     });      \/* ... *\/      \/\/ \u0414\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 `t` \u0432\u044b\u0437\u043e\u0432\u0435\u0442 request_stop() \u0438 \u0431\u0443\u0434\u0435\u0442 \u0436\u0434\u0430\u0442\u044c \u043f\u043e\u043a\u0430 \u043b\u044f\u043c\u0431\u0434\u0430 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f. } <\/code><\/pre>\n<\/li>\n<li>\u041d\u043e\u0432\u044b\u0435 type_traits \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f, \u0447\u0442\u043e <a href=\"https:\/\/wg21.link\/p0466\">\u0434\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/a>.\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\u0422\u0440\u0438 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u043d\u0435\u043a\u0438\u0439 <a href=\"https:\/\/habr.com\/ru\/users\/antoshkka\/\" class=\"user_link\">antoshkka<\/a> \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u043b \u0441 \u0434\u043e\u043a\u043b\u0430\u0434\u043e\u043c <a href=\"https:\/\/youtu.be\/abdeAew3gmQ\">\u043e \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0431\u0435\u0437 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u0438 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 C++14<\/a> \u043d\u0430 CppCon. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0434\u043e\u043a\u043b\u0430\u0434\u0430 \u041b\u0438\u0437\u0430 \u041b\u0438\u043f\u043f\u0438\u043d\u043a\u043e\u0442\u0442 \u043f\u0440\u0438\u0432\u0435\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0433\u0434\u0435 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e\u2026 \u043d\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u043e\u0441\u044c \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u043a\u043b\u0430\u0434\u0430, \u0437\u0430 \u043e\u0431\u0435\u0434\u043e\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u041c\u0430\u0440\u0448\u0430\u043b\u043b\u043e\u043c \u041a\u043b\u043e\u0443.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 <a href=\"https:\/\/github.com\/apolukhin\/magic_get\/blob\/8bb5eb2f33fbc360610de3759549f07baa31b3a6\/test\/flat\/core.cpp#L336-L360\">\u0431\u044b\u043b \u043d\u0430\u0439\u0434\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u043a\u043e\u0441\u044f\u0447\u0438\u0442<\/a>. \u041a\u0430\u043a \u0438\u0442\u043e\u0433, \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043e\u0442 \u041b\u0438\u0437\u044b \u041b\u0438\u043f\u043f\u0438\u043d\u043a\u043e\u0442\u0442 \u043d\u0430 \u043d\u043e\u0432\u044b\u0435 type_traits \u0435\u0441\u0442\u044c \u0437\u0430\u043d\u044f\u0442\u043d\u043e\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<\/p>\n<blockquote><p>Over dinner at CppCon, Marshall Clow and I discussed a bit of code that relied on two types being layout-compatible. As it happened, the types weren\u2019t layout-compatible after all. I opined that there should be a way to statically assert layout-compatibility, so that the error would be caught at compile time, rather than dinner time. Marshall replied, \u201cWrite a proposal.\u201d This is that proposal.  <\/p><\/blockquote>\n<\/div>\n<\/div>\n<\/li>\n<li>\u041f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <a href=\"https:\/\/wg21.link\/p1208\">std::source_location<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443, \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438.<\/li>\n<li><a href=\"https:\/\/wg21.link\/p1661\">\u0412\u044b\u043a\u0438\u043d\u0443\u043b\u0438<\/a> \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u043b\u044f unordered \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u044f\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u0445\u0435\u0448 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430.<\/li>\n<\/ul>\n<p>  \u0423\u0432\u044b, std::stacktrace, std::flat_map, std::flat_set \u0432 C++20 \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u0438 \ud83d\ude41<\/p>\n<h2>\u0421++23<\/h2>\n<p>  \u041d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044e Boost.Process \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430, \u043f\u0435\u0440\u0435\u043e\u0441\u043c\u044b\u0441\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0432\u0432\u043e\u0434\u043e\u043c\/\u0432\u044b\u0432\u043e\u0434\u043e\u043c, \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0430\u043b\u0433\u0435\u0431\u0440\u0443, \u044e\u043d\u0438\u043a\u043e\u0434, 2d \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0430\u0443\u0434\u0438\u043e, JIT \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e C++ \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u0435\u0449\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u0432\u0430\u0442\u044c \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0411\u043b\u0438\u0436\u0435 \u0432\u0441\u0435\u0433\u043e \u043a \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u044e <a href=\"https:\/\/wg21.link\/p1030\">std::filesystem::path_view<\/a>. path_view \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0443\u0442\u044f\u043c\u0438 \u0431\u0435\u0437 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0439, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043a \u0441\u0432\u0435\u0440\u0445\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<h2>\u0417\u0430\u0441\u043b\u0443\u0433\u0438 \u0420\u041321<\/h2>\n<p>  \u041a\u0430\u043a \u0438 \u0432\u0441\u0435\u0433\u0434\u0430, \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0430\u0445, \u0447\u0438\u043d\u0438\u043b\u0438 \u0431\u0430\u0433\u0438, \u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u044b, \u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e, \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u043e\u0432\u0430\u043b\u0438 \u0431\u0443\u043c\u0430\u0433\u0438, \u0430\u0432\u0442\u043e\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0438\u0435\u0445\u0430\u0442\u044c. \u0422\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0438 \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 std::format \u0441 Inf\/NaN; \u0443\u0431\u0440\u0430\u043b\u0438 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 jthread; \u043f\u0440\u043e\u0442\u0430\u0449\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 <a href=\"https:\/\/wg21.link\/p1406\">\u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 pair, tuple, string, array<\/a>.<\/p>\n<p>  \u041c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u043b\u0438 \u0432 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0435 SG1 Concurrency \u0437\u0430 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\u043c conscurrent_unordered_map. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 visit \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0449\u0438\u0449\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 value \u043e\u0442 \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430:<\/p>\n<pre><code class=\"cpp\">concurrent_unordered_map&lt;int, std::string&gt; conc_map; conc_map.visit(42, [](std::string&amp; value) { \/\/ \u0434\u0430, \u043d\u0435\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430....     \/\/ \u0420\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e \u0432\u0441\u0435\u0433\u0434\u0430 OK. \u0422\u0435\u043f\u0435\u0440\u044c OK \u0435\u0441\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0437\u0438\u0442\u043e\u0440\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u044d\u0442\u043e \u0436\u0435 value.     std::cerr &lt;&lt; value;       \/\/ \u0420\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e \u0432\u0441\u0435\u0433\u0434\u0430 OK. \u0422\u0435\u043f\u0435\u0440\u044c OK \u0435\u0441\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0437\u0438\u0442\u043e\u0440\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u044e\u0442 \u044d\u0442\u043e \u0436\u0435 value.     value += \"Hello\";  });<\/code><\/pre>\n<p>.<br \/>  \u0421 \u0442\u0430\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u043f\u0440\u043e\u0449\u0435 <s>\u0441\u0442\u0440\u0435\u043b\u044f\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0438<\/s> \u0432\u044b\u0436\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre><code class=\"cpp\">concurrent_unordered_map&lt;int, std::atomic&lt;int&gt;&gt; conc_map; conc_map.visit(42, [](std::atomic&lt;int&gt;&amp; value) { \/\/ \u0434\u0430, \u043d\u0435\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430....     \/\/ \u0412\u0441\u0435\u0433\u0434\u0430 OK     ++ value;  });<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u043e\u0434\u0432\u0438\u0436\u043a\u0438 \u0432 SG6 Numerics \u2014 \u043d\u0430\u0447\u0430\u043b\u0438 \u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430\u0434 Numerics TS \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043d\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0447\u0438\u0441\u0435\u043b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441 wide_integer \u043e\u0442 \u043d\u0430\u0441.<\/p>\n<h2>\u041f\u0440\u043e\u0447\u0435\u0435<\/h2>\n<p>  \u041e\u0441\u0435\u043d\u044c\u044e \u0432 \u041f\u0438\u0442\u0435\u0440\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044f <a href=\"https:\/\/cppconf-piter.ru\/\">C++ Piter<\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0447\u043d\u043e \u043f\u043e\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0438\u0437 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430.<\/p>\n<p>  \u0412\u0441\u0442\u0440\u0435\u0447\u0430 \u0420\u041321 \u043f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u041a\u0451\u043b\u044c\u043d\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u0438\u044f ISO \u0441\u0442\u043e\u0438\u0442\u043e\u0438\u0442\u0441\u044f 9 \u0430\u0432\u0433\u0443\u0441\u0442\u0430 (<a href=\"https:\/\/events.yandex.ru\/events\/cpp-party\/09-aug-2019\/?utm_source=habr&amp;utm_content=post290719\">\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f<\/a> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0435\u0441\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e). \u041d\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u0432\u0430\u0441 \u043d\u043e\u0432\u0438\u043d\u043a\u0430\u0445 \u0438 \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435 \u043e C++20 \u0438 C++23.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <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\/458938\/\"> https:\/\/habr.com\/ru\/company\/yandex\/blog\/458938\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u041d\u0430 \u0434\u043d\u044f\u0445 \u043f\u0440\u043e\u0448\u043b\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u043c\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 C++ \u0432 \u041a\u0451\u043b\u044c\u043d\u0435. \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u044f\u0442 feature freeze \u043d\u0430 C++20, \u0442\u0430\u043a \u0447\u0442\u043e \u043a\u043e\u043c\u0438\u0442\u0435\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0436\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0432\u0435\u0449\u0435\u0439, \u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u0438\u043d\u043a\u0438 \u0443\u0436\u0435 \u0432 C++23\u2026<\/p>\n<p>  \u2026 \u043d\u043e \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u043d\u0435 \u0442\u0430\u043a!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4v\/uz\/6i\/4vuz6in4hwxgrnulziaj8pacu8w.jpeg\"><\/p>\n<p>  \u0427\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441 std::flat_map; \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 co_return, co_await \u0438 co_yield; \u0443\u0441\u043f\u0435\u043b\u0438 \u043b\u0438 \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c std::format; \u0432 \u043a\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0432 C++20? \u0412\u0441\u0451 \u044d\u0442\u043e \u0432\u0430\u0441 \u0436\u0434\u0451\u0442 \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-292720","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292720","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=292720"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292720\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}