{"id":298915,"date":"2020-02-19T09:00:25","date_gmt":"2020-02-19T09:00:25","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298915"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-02-19T09:00:25","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298915","title":{"rendered":"C++20 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043d! \u0427\u0435\u0433\u043e \u0436\u0434\u0430\u0442\u044c \u0438 \u043a \u0447\u0435\u043c\u0443 \u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0432 C++23"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/488588\/\">\u041d\u0430 \u0434\u043d\u044f\u0445 \u0432 \u041f\u0440\u0430\u0433\u0435 \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++. \u0418-\u0438-\u0438-\u0438\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xn\/2z\/jn\/xn2zjnez64pzklp69iaix77njn0.jpeg\"><\/p>\n<p>  C++20 \u0433\u043e\u0442\u043e\u0432! \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0442\u0430\u043c\u043f\u0438\u043a \u043e\u0442 ISO, \u043d\u043e \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>  \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0432\u0441\u0435\u0445 \u0441 \u044d\u0442\u0438\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c! Concepts, Coroutines, Modules, Ranges, std::format, constexpr new \u0438 constexpr \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b+vector+string, datetime, jthread, span, bit_cast \u0438 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/feature_test\">\u043c\u043d\u043e\u0433\u0438\u0435<\/a> \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0427\u0442\u043e \u0443\u0441\u043f\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0440\u0430\u0437\u043b\u043e\u043c\u0430\u0442\u044c \u0438 \u0447\u0442\u043e \u0432\u0441\u0435 \u0445\u043e\u0442\u044f\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0432 C++23 \u2014 \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041f\u0440\u0438\u0451\u043c\u044b \u0438\u0437 C \u0432 C++20<\/h2>\n<p>  \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043b\u043e\u0436\u0438\u043b\u0430\u0441\u044c \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u044f \u043f\u0443\u0433\u0430\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c (UB) \u0432 C++. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c!<\/p>\n<p>  \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u0435\u043d \u0434\u043b\u044f C:<\/p>\n<pre><code class=\"cpp\">struct X { int a, b; };  X *make_x() {   X *p = (X*)malloc(sizeof(struct X));   p-&gt;a = 1;   p-&gt;b = 2;   return p; } <\/code><\/pre>\n<p>  \u041d\u043e \u0432 C++ \u0441 \u043d\u0438\u043c \u0431\u044b\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. C \u043e\u043f\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0431\u0430\u0439\u0442\u0430\u043c, \u0430 C++ \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438. \u0410 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0435\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438, \u0438 \u0434\u043e C++20 \u043d\u0430\u0447\u0430\u043b\u043e \u0436\u0438\u0437\u043d\u0438 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0447\u0438\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 new.<\/p>\n<p>  \u041a\u043e\u043c\u0438\u0442\u0435\u0442 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438. \u041f\u0440\u0438\u043d\u044f\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (memcpy, memmove, malloc, aligned_alloc, calloc, realloc, bit_cast) \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 C-\u0442\u0440\u044e\u043a\u043e\u0432 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 C++.<\/p>\n<h2>bool \u0441\u0442\u0430\u043b \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0435 \u0432 C++20<\/h2>\n<p>  \u0423\u0433\u0430\u0434\u0430\u0439\u0442\u0435, \u0432 \u0447\u0451\u043c \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<pre><code class=\"cpp\">template &lt;typename T, size_t N&gt; auto count_unique(const std::array&lt;T, N&gt;&amp; v) {     return std::unordered_set&lt;T&gt;{v.begin(), v.end()}.size(); } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u0415\u0441\u043b\u0438 T \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f bool \u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 v.begin() \u0438 v.end() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c libc++ \u0438\u043b\u0438 libstdc++) \u2014 \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f count_unique \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c 1.<\/p>\n<p>  \u0412\u0441\u0451 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 std::unordered_set&lt;bool&gt;{v.begin(), v.end()} \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0435\u044f\u0432\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u043a bool \u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 std::unordered_set&lt;bool&gt;{true, true}.  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 bool \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u0443\u0436\u0430\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043a\u043e\u0434\u043e\u0432\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 (\u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438 <a href=\"https:\/\/wg21.link\/p1957\">P1957<\/a>).<\/p>\n<h2>C++20 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u044b \u0441\u0442\u0430\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435<\/h2>\n<p>  \u0414\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e:<\/p>\n<pre><code class=\"cpp\">template &lt;class T&gt; concept Reservable = requires(T v) {     v.reserve(int{}); }; <\/code><\/pre>\n<p>  \u0418 \u0443\u0434\u0438\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<pre><code class=\"cpp\">struct Test;  static_assert(!Reservable&lt;Test&gt;);  struct Test {     void reserve(int); };  static_assert(Reservable&lt;Test&gt;); <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043e\u0442 \u0441\u0442\u0440\u0430\u043d\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439: \u00ab\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0430\u0445 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c incomplete type, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f ODR\u00bb. \u041d\u0430\u0448 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442\u043a\u043b\u043e\u043d\u0438\u043b\u0438, \u043d\u043e \u043c\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c P2104.<\/p>\n<p>  \u0411\u043e\u043d\u0443\u0441\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u043e\u0442\u043d\u044b\u043d\u0435 \u0432\u043f\u0440\u0430\u0432\u0435 \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u043e\u0432 \u043a \u0442\u0438\u043f\u0430\u043c.<\/p>\n<h2>\u041c\u0435\u043b\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 C++20<\/h2>\n<p>  <\/p>\n<ul>\n<li>Ranges \u043e\u0431\u0437\u0430\u0432\u0435\u043b\u0438\u0441\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u043c ssize.<\/li>\n<li>Internal linkage \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u0432\u0438\u0434\u043d\u044b \u043f\u0440\u0438 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 module linkage \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 (\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0432\u0430\u043c \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a).<\/li>\n<li>\u041f\u043e\u0434\u043a\u0440\u0443\u0442\u0438\u043b\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u044f\u043a\u0438\u043c \u0442\u0443\u043b\u0437\u0430\u043c \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u0451 \u0441\u043b\u043e\u043c\u0430\u0435\u043c \u0432 C++23 \u0438\u043b\u0438 C++26?<\/h2>\n<p>  <img decoding=\"async\" align=\"right\" src=\"https:\/\/habrastorage.org\/webt\/fb\/_x\/jm\/fb_xjmkw7emgmk6gg9oozovv50w.jpeg\">\u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u0431\u0430\u0442\u044b \u0432\u044b\u0437\u0432\u0430\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/wg21.link\/P2028\">\u043e\u0431 Application Binary Interface<\/a> (ABI, \u043d\u0435 \u043f\u0443\u0442\u0430\u0439\u0442\u0435 \u0441 API). \u0411\u044b\u043b\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:<\/p>\n<h3>1. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043c\u0435\u043d\u0438\u0442\u044c ABI \u0432 C++23 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c 5-10% \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/h3>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 C++ \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c, \u043e\u043d\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0441 \u043d\u043e\u0432\u044b\u043c ABI. \u0412\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 C++23 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 C++.<\/p>\n<p>  \u041d\u0443 \u0438 \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u0441\u0442\u0430\u0440\u043e\u0435 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u0435 \u041f\u041e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0436\u0435 \u043d\u0438\u043a\u0442\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442, \u043d\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u0449\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 (\u0434\u0430-\u0434\u0430, \u0432\u0438\u0434\u0435\u043e\u0438\u0433\u0440\u0443\u0448\u043a\u0438, \u044f \u043f\u0440\u043e \u0432\u0430\u0441!).<\/p>\n<p>  \u0421 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u043e\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u0440\u0435\u0448\u0438\u043b\u0438 ABI \u0432 C++23 \u043d\u0435 \u043b\u043e\u043c\u0430\u0442\u044c.<\/p>\n<h3>2. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044e, \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0430\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043b\u043e\u043c\u0430\u0442\u044c\/\u043c\u0435\u043d\u044f\u0442\u044c ABI.<\/h3>\n<p>  \u0418 \u0442\u0443\u0442 \u0440\u0435\u0448\u0438\u043b\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u044e \u043d\u0435 \u0434\u0430\u0432\u0430\u0442\u044c. \u0420\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u043d\u0434\u043e\u0440\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043b\u0430\u043d\u044b \u043d\u0430 \u0441\u0432\u043e\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0438 \u043f\u043e\u0440\u043e\u0439 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0441\u043b\u043e\u043c\u0430\u0442\u044c ABI, \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0431\u0435\u0437 \u0432\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<h2>\u0410 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0435\u0437\u0434\u0435 noexcept?<\/h2>\n<p>  \u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043d\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a noexcept, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043a\u0438\u0434\u0430\u044e\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, operator -&gt; \u0443 std::optional:<\/p>\n<pre><code class=\"cpp\">constexpr const T* operator-&gt;() const; constexpr T* operator-&gt;();     Requires: *this contains a value.     Returns: val.     Throws: Nothing. <\/code><\/pre>\n<p>  \u041e\u043d \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043a\u0438\u0434\u0430\u0435\u0442, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u043c\u0435\u0441\u0442\u043e noexcept \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0447\u0442\u043e \u00ab\u041a\u0438\u0434\u0430\u0435\u0442: \u041d\u0438\u0447\u0435\u0433\u043e\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u00ab*this \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00bb.<\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c c noexcept \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435. \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u0436\u0435 \u0438\u0434\u0435\u044f \u0432 <a href=\"https:\/\/wg21.link\/P1656\">P1656<\/a>!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ch\/yj\/ph\/chyjphhdpk8q4uv8eqbsdt_kdkq.jpeg\"><\/p>\n<p>  <b>\u041d\u0435\u0442!<\/b><\/p>\n<p>  \u0415\u0441\u0442\u044c \u0446\u0435\u043b\u0430\u044f \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0430 SG21: Contracts, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 (\u043f\u0440\u0435\u0434- \u0438 \u043f\u043e\u0441\u0442\u0443\u0441\u043b\u043e\u0432\u0438\u0439). \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u043a\u0438\u0434\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u0438\u043d\u0443\u0442\u044c \u0438\u0437 noexcept \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u0431\u0443\u0434\u0435\u0442 std::terminate \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0443\u0445\u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0441\u043e\u0431\u044b\u0439 \u043a\u043e\u0441\u0442\u044b\u043b\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043b\u0435\u0442\u0430\u0442\u044c \u0438\u0437 noexcept \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u2026 \u0422\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432\u0441\u0451 \u043b\u043e\u043c\u0430\u0435\u0442\u0441\u044f, type traits \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 noexcept, \u0438 \u043d\u0430\u0447\u043d\u0443\u0442 \u0432\u0430\u043c \u0432\u0440\u0430\u0442\u044c, \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043d\u0430\u044f noexcept \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043a\u0438\u0434\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0415\u0441\u0442\u044c \u0444\u043e\u0440\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0440\u044f\u0434\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044f\u0432\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0435\u0434\u0443\u0441\u043b\u043e\u0432\u0438\u0439. \u0415\u0441\u0442\u044c \u0443 \u0432\u0430\u0441, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439. \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u043e\u0440\u043a, \u0438 \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043a\u0442\u043e-\u0442\u043e \u043f\u043e\u0437\u0432\u0430\u043b std::vector::back() \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u2014 \u0442\u043e \u0432\u044b\u043b\u0435\u0442\u0430\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0448\u0435 \u043f\u043e \u043a\u043e\u0434\u0443 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f fallback. \u0421 \u043f\u0440\u0430\u0432\u043a\u0430\u043c\u0438 \u0438\u0437 <a href=\"https:\/\/wg21.link\/P1656\">P1656<\/a> \u0442\u0430\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439.<\/p>\n<p>  \u0418 \u044d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b!.. \u041c\u0430\u043b\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 noexcept \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435 \u043f\u0440\u0438\u043d\u0435\u0441\u0443\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043c\u0430\u043b\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043b\u043e\u043c\u0430\u0435\u0442 \u043a\u043e\u0434 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0443\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439, \u043c\u0430\u043b\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432\u2026 \u0442\u0430\u043a \u0435\u0449\u0451 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043e\u0434\u043e\u0431\u0440\u0435\u043d\u043e \u0443\u0436\u0435 \u0432 \u0434\u0432\u0443\u0445 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0430\u0445.<\/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, \u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c \u043e\u043f\u044b\u0442\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \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.<\/p>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0438\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u043e\u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c, \u2014 \u044d\u0442\u043e \u0438\u0434\u0435\u044f \u0410\u043d\u0442\u043e\u043d\u0430 \u0416\u0438\u043b\u0438\u043d\u0430 <a href=\"https:\/\/wg21.link\/P2025\">P2025 Guaranteed copy elision for named return objects<\/a>. \u0415\u0451 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0431\u0435\u0437 copy \u0438 move \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e destructive move, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0430\u0439\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u0441 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b 90-\u0445 \u0438 \u0431\u044b\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  \u0418\u0434\u0435\u044e \u043c\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0442\u0430\u0449\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0438 EWG-I \u0438 EWG \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u0434\u0435\u0438 \u0441\u0430\u043c\u0438\u043c \u0430\u0432\u0442\u043e\u0440\u043e\u043c. \u041e\u0441\u0442\u0430\u043b\u0441\u044f \u044d\u0442\u0430\u043f CWG, \u0438 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u0437\u0430\u0441\u0435\u0434\u0430\u043d\u0438\u0439 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0448\u0430\u043d\u0441\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430, \u0430 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445 \u2014 \u043f\u0435\u0440\u0432\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0439 \u0438\u0434\u0435\u0438 \u043c\u044b \u043f\u0440\u043e\u0442\u0430\u0449\u0438\u043b\u0438 \u0438\u0434\u0435\u044e <a href=\"https:\/\/wg21.link\/P1990R0\">P1990R0: Add operator[] to std::initializer_list<\/a> \u0447\u0435\u0440\u0435\u0437 LEWG-I, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0444\u0438\u0434\u0431\u044d\u043a \u043d\u0430 <a href=\"https:\/\/wg21.link\/P1944R0\">P1944R0: constexpr &lt;cstring&gt; and &lt;cwchar&gt;<\/a>. \u041e\u0431\u0435 \u0438\u0434\u0435\u0438 \u0414\u0430\u043d\u0438\u0438\u043b\u0430 \u0413\u043e\u043d\u0447\u0430\u0440\u043e\u0432\u0430 \u0438\u043c\u0435\u044e\u0442 \u0432\u0441\u0435 \u0448\u0430\u043d\u0441\u044b \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432 C++23.<\/p>\n<p>  \u041d\u0430 \u043f\u043e\u043f\u0440\u0438\u0449\u0435 std::hash \u043d\u0430\u0441 \u0436\u0434\u0430\u043b \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0430\u043b. \u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 <a href=\"https:\/\/wg21.link\/p1406r1\">p1406r1: Add more std::hash specializations<\/a> \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u0432 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u0445 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u0430\u043b\u0451\u043a\u043e\u0433\u043e C++2*. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043a\u043e\u043c\u0438\u0442\u0435\u0442 \u0440\u0435\u0448\u0438\u043b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c.<\/p>\n<p>  \u0421 SG6 \u0438 Numbers \u043d\u0435 \u0441\u0440\u043e\u0441\u043b\u043e\u0441\u044c. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f SG6 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u043b\u0438\u0441\u044c \u0441 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438 ABI, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0431\u0440\u0430\u043b\u0441\u044f \u043a\u0432\u043e\u0440\u0443\u043c \u0432 SG6. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/wg21.link\/p1889\">p1889: C++ Numerics Work In Progress<\/a>, <a href=\"https:\/\/wg21.link\/P2010\">P2010: Remove iostream operators from P1889<\/a> \u0438 <a href=\"https:\/\/wg21.link\/P1890\">P1890: C++ Numerics Work In Progress Issues<\/a> \u043d\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0438\u0441\u044c.<\/p>\n<h3>\u041f\u043b\u0430\u043d\u044b \u043d\u0430 C++23<\/h3>\n<p>  \u0421 \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 C++20 \u043a\u043e\u043c\u0438\u0442\u0435\u0442 \u0441\u0442\u0430\u043b \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043f\u043b\u0430\u043d\u0443. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0438\u0434\u0435\u0439 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430 \u0432\u0441\u0435\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0437\u0430\u0441\u0435\u0434\u0430\u043d\u0438\u044f\u0445 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u0442\u0435\u043c\u0430\u043c, \u0435\u0441\u043b\u0438 \u0435\u0449\u0451 \u043d\u0435 \u0432\u0441\u0451 \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439.<\/p>\n<p>  \u0414\u043b\u044f C++23 \u0442\u0430\u043a\u043e\u0439 \u043f\u043b\u0430\u043d \u043a\u0430\u043a \u0440\u0430\u0437 \u0443\u0442\u0432\u0435\u0440\u0434\u0438\u043b\u0438 \u0432 \u041f\u0440\u0430\u0433\u0435. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b C++23:<\/p>\n<ol>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043e\u0440\u0443\u0442\u0438\u043d \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435<\/li>\n<li>\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438<\/li>\n<li>Executors<\/li>\n<li>Networking<\/li>\n<\/ol>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435 \u0432\u0441\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/lewissbaker\/cppcoro\">CppCoro<\/a>. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c C++20 \u043a\u043e\u0440\u0443\u0442\u0438\u043d\u044b, \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>  \u0421 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0432\u0442\u043e\u0440\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c, \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0435\u0441\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043e\u0441\u043e\u0431\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0435 \u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0410 \u0432\u043e\u0442 Executors \u2014 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0418\u0445 \u0434\u0438\u0437\u0430\u0439\u043d \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d, \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0432\u0441\u0435 \u044e\u0437-\u043a\u0435\u0439\u0441\u044b, \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u043e\u043d\u0438 \u043d\u0438\u043a\u0435\u043c \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0438 \u0434\u0438\u0437\u0430\u0439\u043d \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043d.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043a\u043e\u043c\u0438\u0442\u0435\u0442 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u043b\u0441\u044f \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c:<\/p>\n<ul>\n<li>Reflection<\/li>\n<li>Pattern matching<\/li>\n<li>Contracts<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0442\u043e\u0433\u043e\u0432<\/h2>\n<p>  C++20 \u0433\u043e\u0442\u043e\u0432, \u043f\u043e\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 C++23! \u0411\u043b\u0438\u0436\u0430\u0439\u0448\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0442\u043e\u043c, \u0442\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0439\u043d\u044b\u0435 \u0438\u0434\u0435\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u2014 \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0438\u043c\u0438 \u043d\u0430 <a href=\"https:\/\/stdcpp.ru\/proposals\">stdcpp.ru<\/a> \u0438 \u0432 Telegram-\u0447\u0430\u0442\u0435 <a href=\"https:\/\/t.me\/ProCxx\">ProCxx<\/a>.<\/p>\n<p>  \u041d\u0443 \u0430 \u0432\u0441\u0435 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u044f\u043c\u0438 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430 \u0432\u0436\u0438\u0432\u0443\u044e \u2014 \u0437\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u043c\u0438\u0442\u0430\u043f\u044b \u0438 C++ \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438*:<\/p>\n<ul>\n<li><a href=\"https:\/\/siberia-2020.cppug.ru\/\">C++ Siberia 2020<\/a><\/li>\n<li><a href=\"https:\/\/conference.corehard.by\/ru\">Corehard \u0432 \u041c\u0438\u043d\u0441\u043a\u0435<\/a><\/li>\n<li><a href=\"https:\/\/www.meetup.com\/Moscow-C-User-Groups\/events\/268811494\/\">C++ Usergroup \u0432 \u041c\u043e\u0441\u043a\u0432\u0435<\/a><\/li>\n<li><a href=\"https:\/\/cppconf-moscow.ru\/\">C++ Russia 2020<\/a><\/li>\n<\/ul>\n<p>   * \u041b\u0430\u0439\u0444\u0445\u0430\u043a: \u0437\u0430 \u0431\u0438\u043b\u0435\u0442 \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0442\u044b \u0434\u043e\u043a\u043b\u0430\u0434\u0447\u0438\u043a.<\/div>\n<p> \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\/488588\/\"> https:\/\/habr.com\/ru\/company\/yandex\/blog\/488588\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/yandex\/blog\/488588\/\">\u041d\u0430 \u0434\u043d\u044f\u0445 \u0432 \u041f\u0440\u0430\u0433\u0435 \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++. \u0418-\u0438-\u0438-\u0438\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xn\/2z\/jn\/xn2zjnez64pzklp69iaix77njn0.jpeg\"><\/p>\n<p>  C++20 \u0433\u043e\u0442\u043e\u0432! \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0442\u0430\u043c\u043f\u0438\u043a \u043e\u0442 ISO, \u043d\u043e \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>  \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0432\u0441\u0435\u0445 \u0441 \u044d\u0442\u0438\u043c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c! Concepts, Coroutines, Modules, Ranges, std::format, constexpr new \u0438 constexpr \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b+vector+string, datetime, jthread, span, bit_cast \u0438 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/feature_test\">\u043c\u043d\u043e\u0433\u0438\u0435<\/a> \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0427\u0442\u043e \u0443\u0441\u043f\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0438 \u0440\u0430\u0437\u043b\u043e\u043c\u0430\u0442\u044c \u0438 \u0447\u0442\u043e \u0432\u0441\u0435 \u0445\u043e\u0442\u044f\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0432 C++23 \u2014 \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \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-298915","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298915","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=298915"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298915\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}