{"id":307738,"date":"2020-07-30T15:00:38","date_gmt":"2020-07-30T15:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=307738"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-07-30T15:00:38","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=307738","title":{"rendered":"\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438 \u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u0421++"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/513058\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3i\/wj\/_s\/3iwj_smzisyfsmfwsj11zuj14os.jpeg\"><\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u043e\u0442 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u043d\u0430\u0431\u0438\u043b \u043e\u0441\u043a\u043e\u043c\u0438\u043d\u0443, \u043d\u043e \u043c\u044b \u0432\u0437\u044f\u043b\u0438 7 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};  \/*1*\/ *p; \/*2*\/ foo((*p, 5));                      \/*3*\/ A a{*p}; \/*4*\/ p-&gt;data_mem; \/*5*\/ int b{p-&gt;data_mem}; \/*6*\/ p-&gt;non_static_mem_fn(); \/*7*\/ p-&gt;static_mem_fn();<\/code><\/pre>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f, \u043d\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c: <b>p<\/b>, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c, \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u0410, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u0410 <a href=\"http:\/\/eel.is\/c++draft\/conv.ptr#1\" rel=\"nofollow\">conv.ptr#1<\/a>.<\/p>\n<p>  <\/p>\n<p><b>Disclaimer:<\/b> \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432 \u0438 \u0432\u044b\u0434\u0435\u0440\u0436\u0435\u043a \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a. \u041c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c <a href=\"https:\/\/dev.to\/promwad_team\/null-pointers-in-c-what-you-can-and-can-t-do-25ic\" rel=\"nofollow\">\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0442\u0430\u0442\u044c\u0438<\/a> \u043d\u0430 dev.to, \u043b\u0438\u0448\u0435\u043d\u043d\u0443\u044e \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">*p;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (expression statement, <a href=\"http:\/\/eel.is\/c++draft\/stmt.expr#1\" rel=\"nofollow\">stmt.expr#1<\/a>), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <b>*p<\/b> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0441 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0443\u043d\u0430\u0440\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 * <a href=\"http:\/\/eel.is\/c++draft\/expr.unary.op#1\" rel=\"nofollow\">expr.unary.op#1<\/a> \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 (indirection), \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f l-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0415\u0433\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0430, \u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043a\u0430\u0436\u0435\u0448\u044c \u043e \u0442\u043e\u043c, \u0434\u043e\u043b\u0436\u0435\u043d \u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u041d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0438 \u0440\u0430\u0437\u0443.<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0446\u0435\u043f\u0438\u0442\u044c\u0441\u044f \u0437\u0430 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0441\u0442\u044c <a href=\"http:\/\/eel.is\/c++draft\/basic.stc#4\" rel=\"nofollow\">basic.stc#4<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0447\u0435\u0442\u043a\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f (indirection through an invalid pointer value) \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e. \u041d\u043e \u0442\u0430\u043c \u0436\u0435 \u0434\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0438 \u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 <a href=\"http:\/\/eel.is\/c++draft\/basic.compound#3.4\" rel=\"nofollow\">basic.compound#3.4<\/a>, \u0433\u0434\u0435 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 &mdash; \u044d\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u0432 <a href=\"http:\/\/eel.is\/c++draft\/dcl.ref#5\" rel=\"nofollow\">dcl.ref#5<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u00abthe only way to create such a reference would be to bind it to the \u201cobject\u201d obtained by indirection through a null pointer, which causes undefined behavior\u00bb, \u0442.\u0435. \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 &mdash; \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0435\u0435 \u043a \u00ab\u043e\u0431\u044a\u0435\u043a\u0442\u0443\u00bb, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u0430 \u0441\u0447\u0435\u0442 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u041d\u043e \u043f\u0440\u0438\u0434\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044e, \u043d\u043e \u0438 \u043a \u00ab\u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c\u00bb (to bind), \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442, \u043e \u0447\u0435\u043c \u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 dcl.ref#5.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043e\u043a \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0439 \u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043f\u0438\u0441\u043a\u0443 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430, \u0433\u0434\u0435 Core Working Group \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u044f\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430. \u041d\u0430\u0448 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u0444\u0435\u043a\u0442, \u0433\u0434\u0435 CWG \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u0448\u043b\u0430 \u043a \u043d\u0435\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441\u0443 (\u0442\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0441\u0442\u0430\u0442\u0443\u0441 drafting), \u0447\u0442\u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u043b\u0435\u0447\u0435\u0442 \u043d\u0435 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435, \u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 l-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 r-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u00ab\u043d\u0435\u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441 CWG\u00bb \u0437\u0432\u0443\u0447\u0438\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u0441\u043e\u043c\u043e, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/cwg_closed.html#315\" rel=\"nofollow\">\u0434\u0435\u0444\u0435\u043a\u0442<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443 7. \u0422\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u043f\u043e \u044d\u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 CWG.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0445 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0441\u0435\u043d\u0441\u0443\u0441. \u0415\u0441\u043b\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u0421\u0438 (<a href=\"https:\/\/web.archive.org\/web\/20181230041359if_\/http:\/www.open-std.org\/jtc1\/sc22\/wg14\/www\/abq\/c17_updated_proposed_fdis.pdf\" rel=\"nofollow\">N2176<\/a>, 6.5.3.2 \u0438 \u0441\u043d\u043e\u0441\u043a\u0430 104), \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">foo((*p, 5));  <\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c <b>foo<\/b>, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u00ab\u0437\u0430\u043f\u044f\u0442\u0430\u044f\u00bb. \u0415\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e, \u043f\u0440\u0438\u0447\u0435\u043c \u0432\u0441\u0435, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0441 \u043e\u0442\u0431\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 1 (<a href=\"http:\/\/eel.is\/c++draft\/expr.comma#1\" rel=\"nofollow\">expr.comma#1<\/a>). \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0435\u043d.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 3<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">A a{*p};<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <strong>a<\/strong> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u043d \u043d\u0435\u044f\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>const A&amp;<\/b> \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e (<a href=\"http:\/\/eel.is\/c++draft\/dcl.ref#5\" rel=\"nofollow\">dcl.ref#5<\/a>). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 4<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">p-&gt;data_mem;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u043e \u0432 <b>(*(p)).data_mem<\/b> \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/eel.is\/c++draft\/expr.ref#2\" rel=\"nofollow\">expr.ref#2<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 (designate) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 (<a href=\"http:\/\/eel.is\/c++draft\/expr.ref#6.2\" rel=\"nofollow\">expr.ref#6.2<\/a>). \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c 1 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044f\u0432\u043d\u044b\u043c\u0438, \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c, \u0441\u043a\u0430\u0436\u0435\u043c, <a href=\"http:\/\/eel.is\/c++draft\/basic.lookup.qual#1\" rel=\"nofollow\">basic.lookup.qual#1<\/a>, \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a to refer \u0438 to designate \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u043c\u044b\u0441\u043b\u0435, \u0447\u0442\u043e \u0438 \u0432 expr.ref. \u0418\u0437 \u0447\u0435\u0433\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u043d\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b (\u0441\u043c. \u043f\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438).<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 5<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">int b{p-&gt;data_mem};<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0430 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0438\u043c <b>int<\/b>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 pr-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b (<a href=\"http:\/\/eel.is\/c++draft\/basic.lval#1.2\" rel=\"nofollow\">basic.lval#1.2<\/a>). \u0422\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e\u0431 int, \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 (<a href=\"http:\/\/eel.is\/c++draft\/conv.lval#3.4\" rel=\"nofollow\">conv.lval#3.4<\/a>), \u0447\u0442\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 <a href=\"http:\/\/eel.is\/c++draft\/basic.lval#11\" rel=\"nofollow\">basic.lval#11<\/a> \u043d\u0435 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 6<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">p-&gt;non_static_mem_fn();<\/code><\/pre>\n<p>  <\/p>\n<p><a href=\"http:\/\/eel.is\/c++draft\/class.mfct.non-static#1\" rel=\"nofollow\">class.mfct.non-static#1<\/a> \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u0447\u043b\u0435\u043d\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442 (\u0438\u043b\u0438 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0442 \u043d\u0435\u0433\u043e), \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0439-\u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430. \u0418\u043c\u0435\u043d\u043d\u043e \u00ab\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e\u00bb &mdash; \u0442\u0430\u043a\u043e\u0439 \u0441\u043c\u044b\u0441\u043b \u0432\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0433\u043e\u043b \u00abmay be\u00bb \u0432 <a href=\"https:\/\/www.iso.org\/sites\/directives\/current\/part2\/index.xhtml#_idTextAnchor082\" rel=\"nofollow\">\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 \u0418\u0421\u041e\/\u041c\u042d\u041a<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u0418\u0421\u041e. \u0420\u0430\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435\u0442, \u0442\u043e \u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u0438\u043c\u0435\u0440 7<\/strong><\/h3>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<pre><code class=\"cpp\">p-&gt;static_mem_fn();<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f\u0445 \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 1, Core Working Group \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c. \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/eel.is\/c++draft\/expr.ref#footnote-59\" rel=\"nofollow\">\u0441\u043d\u043e\u0441\u043a\u0435 59<\/a>, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430 \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 -&gt; \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0434\u0430\u0436\u0435 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<h3><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <\/strong><strong>constexpr<\/strong><\/h3>\n<p>  <\/p>\n<p>\u0420\u0430\u0437 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 (<a href=\"http:\/\/eel.is\/c++draft\/expr.const#5\" rel=\"nofollow\">expr.const#5<\/a>), \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043c\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u043e \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445. \u041f\u0443\u0441\u0442\u044c \u043e\u043d\u0438 \u0438 \u043d\u0435\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b, \u043d\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u043f\u0440\u0430\u0432\u044b. \u041c\u044b \u0432\u0437\u044f\u043b\u0438 \u0442\u0440\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434 constexpr \u0438 \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0447\u0442\u043e \u0443 GCC, \u0447\u0442\u043e \u0443 MSVC \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445: <a href=\"https:\/\/gcc.godbolt.org\/z\/Mq6oof\" rel=\"nofollow\">godbolt<\/a>.&nbsp;<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435:<\/p>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tbody>\n<tr>\n<td><b>#<\/b>  <\/td>\n<td><b>\u041a\u043e\u0434<\/b>  <\/td>\n<td><b>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/b>  <\/td>\n<td><b>GCC 10.1<\/b>  <\/td>\n<td><b>Clang 10<\/b>  <\/td>\n<td><b>MSVC 19.24<\/b>  <\/td>\n<\/tr>\n<tr>\n<td>1  <\/td>\n<td>*p;  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<\/tr>\n<tr>\n<td>2  <\/td>\n<td>foo((*p, 5));  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<\/tr>\n<tr>\n<td>3  <\/td>\n<td>A a{*p};  <\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>4  <\/td>\n<td>p-&gt;data_mem;  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>5  <\/td>\n<td>int b{p-&gt;data_mem};  <\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>6  <\/td>\n<td>p-&gt;non_static_mem_fn();  <\/td>\n<td><\/td>\n<td>+  <\/td>\n<td><\/td>\n<td>+  <\/td>\n<\/tr>\n<tr>\n<td>7  <\/td>\n<td>p-&gt;static_mem_fn();  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<td>+  <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>  <\/p>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043e\u043c\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 6 \u0438 \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 4. \u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0432\u0441\u0435 \u0441\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432\u043e \u043c\u043d\u0435\u043d\u0438\u0438 \u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 1.<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0441 \u043d\u0430\u043c\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432 \u0421++! \ud83d\ude42 \u041e\u0431\u044b\u0447\u043d\u043e \u043c\u044b \u0434\u0435\u043b\u0438\u043c\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043a\u0443\u0441\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043f\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u041f\u041e \u0434\u043b\u044f \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438, \u043d\u043e \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0438 \u0447\u0438\u0441\u0442\u043e \u00ab\u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0441\u043a\u0438\u0435\u00bb \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0435 \u043d\u0430\u0448\u0443 \u043b\u044e\u0431\u043e\u0432\u044c \u043a \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u044f\u043c \u0432 \u0421++, \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u00ab\u043d\u0430\u0431\u043e\u043b\u0435\u0432\u0448\u0438\u043c\u00bb \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.&nbsp;<\/p>\n<\/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\/post\/513058\/\"> https:\/\/habr.com\/ru\/post\/513058\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/513058\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3i\/wj\/_s\/3iwj_smzisyfsmfwsj11zuj14os.jpeg\"><\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u043e\u0442 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0443\u0436\u0435 \u043d\u0430\u0431\u0438\u043b \u043e\u0441\u043a\u043e\u043c\u0438\u043d\u0443, \u043d\u043e \u043c\u044b \u0432\u0437\u044f\u043b\u0438 7 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">struct A {     int data_mem;     void non_static_mem_fn() {}     static void static_mem_fn() {} };  void foo(int) {}  A* p{nullptr};  \/*1*\/ *p; \/*2*\/ foo((*p, 5));                      \/*3*\/ A a{*p}; \/*4*\/ p-&gt;data_mem; \/*5*\/ int b{p-&gt;data_mem}; \/*6*\/ p-&gt;non_static_mem_fn(); \/*7*\/ p-&gt;static_mem_fn();<\/code><\/pre>\n<p>  <\/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-307738","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307738","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=307738"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/307738\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=307738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=307738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=307738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}