{"id":192736,"date":"2013-09-06T10:29:02","date_gmt":"2013-09-06T06:29:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=192736"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=192736","title":{"rendered":"<span class=\"post_title\">\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439 \u0445\u0430\u0431\u0440!<\/p>\n<p>  \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432 char[], \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0432 \u043d\u0435\u043c \u0443\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u043b\u044e\u0431\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f std::auto_ptr \u0438\u043b\u0438 std::string, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0431\u0443\u0444\u0435\u0440 char[] \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c POD-\u0442\u0438\u043f\u043e\u043c.<\/p>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 c++03 \u0438 c++11. \u0412 \u0445\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430\u0448\u0435\u043b \u0434\u0432\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043c\u043d\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443: <a href=\"http:\/\/habrahabr.ru\/post\/166201\/\">habrahabr.ru\/post\/166201\/<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/38622\/\">habrahabr.ru\/post\/38622\/<\/a>. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043b\u043e\u0436\u0438\u043c \u0438\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432:  <\/p>\n<pre><code class=\"cpp\">const char str1[] = &quot;Anna&quot;; const char str2[] = &quot;Denis&quot;; const char str3[] = &quot;Vladimir&quot;; const char str4[] = &quot;Alexey&quot;;  const char *arr[] = { str1, str2, str3, str4 }; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, sizeof(arr) \u0432\u0435\u0440\u043d\u0435\u0442 16, \u0430 sizeof(arr[2]) \u0432\u0435\u0440\u043d\u0435\u0442 4. \u0423\u0432\u044b, \u043c\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0441\u0442\u0440\u043e\u043a \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 arr. \u0422\u0440\u044e\u043a \u0441 \u0442\u0435\u043c \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b sizeof \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u043a\u0430\u0442\u0438\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u0412\u043e\u043e\u0431\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043c\u043e\u0449\u043d\u0435\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432\u2026 <br \/>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2013 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440. \u0421\u043b\u043e\u0436\u0438\u043c \u0434\u043b\u0438\u043d\u044b \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438 \u0441\u0432\u044f\u0436\u0435\u043c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Loki::TypeList.   <\/p>\n<pre><code class=\"cpp\">struct str_1 { static const int size = sizeof(str1); }; struct str_2 { static const int size = sizeof(str2); }; struct str_3 { static const int size = sizeof(str3); }; struct str_4 { static const int size = sizeof(str4); };                                                                  typedef LOKI_TYPELIST_4(str_1, str_2, str_3, str_4) List;       <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043e\u0439\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0438\u043f\u043e\u0432 \u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 \u0432\u044b\u0434\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441++03<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">struct str_1 { static const int size = sizeof(str1); }; struct str_2 { static const int size = sizeof(str2); }; struct str_3 { static const int size = sizeof(str3); }; struct str_4 { static const int size = sizeof(str4); };                                                                  typedef LOKI_TYPELIST_4(str_1, str_2, str_3, str_4) List;         #define GetMaxLen(TypeList) \\ \\ template&lt;class Cur_Type&gt; \\ struct len               \\ {                        \\     static const int cur_size = Cur_Type::Head::size;                                   \\     static const int next_size = len&lt;Cur_Type::Tail&gt;::max_size;                         \\     static const int max_size = cur_size &gt; next_size ? cur_size : next_size ;           \\ };                                                                                      \\                                                                                         \\ template&lt;&gt;                                                                              \\ struct len&lt;NullType&gt;                                                                    \\ {                                                                                       \\     static const int max_size = 0;                                                      \\ };                                                                                      \\                                                                                         \\ static const int ml = len&lt;TypeList&gt;::max_size;                                          \\  GetMaxLen(List);  \/\/ \u0432 *.cpp \/\/ LOKI_STATIC_CHECK((ml == sizeof(str3)), size_is_wrong); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0443\u0434\u043e\u0431\u043d\u044b\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0440\u043e\u043a. \u041e\u0434\u043d\u0430\u043a\u043e \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u0438.<br \/>  \u041d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 c++11 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u0435\u0435 \u0438 \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u041f\u043b\u044e\u0441 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u00ab\u0438\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f\u00bb \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e constexpr \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 constexpr \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441++11<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">constexpr const char str1[] = &quot;Anna&quot;; constexpr const char str2[] = &quot;Denis&quot;; constexpr const char str3[] = &quot;Vladimir&quot;; constexpr const char str4[] = &quot;Alexey&quot;;  constexpr const char *arr[] = { str1, str2, str3, str4 };  #define GetMaxLenght(array) \\ constexpr unsigned char str_len(const char* const str) \\ {\\    return *str ? (1 + str_len(str + 1)) : 0;\\ }\\ \\ template &lt;int index&gt; \\ struct MaxLenght\\ {\\     static const int prev_size = MaxLenght&lt;index-1&gt;::max_size;\\     static const int cur_size = str_len(array[index]);\\     static const int max_size = cur_size &gt; prev_size ? cur_size : prev_size;\\ };\\ \\ template &lt;&gt;\\ struct MaxLenght&lt;-1&gt;\\ {\\     static const int max_size = 0;\\ };\\ static const int AmountStr = sizeof(array) \/ sizeof(array[0]);\\ static const int array##_max_size = MaxLenght&lt;AmountStr-1&gt;::max_size; GetMaxLenght(arr);  \/\/   \u0432 *.cpp \/\/   static_assert((arr_max_size == 8), &quot;Error&quot;); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  P.S. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442.<br \/>  P.P.S. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e boost \u0438\u043b\u0438 \u0435\u0449\u0435 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/192736\/\"> http:\/\/habrahabr.ru\/post\/192736\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439 \u0445\u0430\u0431\u0440!<\/p>\n<p>  \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u0438\u043d\u0443 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041d\u0443\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432 char[], \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0432 \u043d\u0435\u043c \u0443\u043c\u0435\u0441\u0442\u0438\u043b\u0430\u0441\u044c \u043b\u044e\u0431\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445. \u041b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f std::auto_ptr \u0438\u043b\u0438 std::string, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0431\u0443\u0444\u0435\u0440 char[] \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c POD-\u0442\u0438\u043f\u043e\u043c.<\/p>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u043f\u0438\u043a\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 c++03 \u0438 c++11. \u0412 \u0445\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430\u0448\u0435\u043b \u0434\u0432\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u043c\u043d\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443: <a href=\"http:\/\/habrahabr.ru\/post\/166201\/\">habrahabr.ru\/post\/166201\/<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/38622\/\">habrahabr.ru\/post\/38622\/<\/a>.   <\/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-192736","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192736","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=192736"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192736\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192736"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192736"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}