{"id":282609,"date":"2016-12-16T13:10:05","date_gmt":"2016-12-16T10:10:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=282609"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=282609","title":{"rendered":"\u041e\u0431\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0432 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b"},"content":{"rendered":"<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u044f\u0442\u043d\u0438\u0446\u0430, \u0430 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0441\u043c\u043e\u0442\u0440 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u043e\u0432\u0438\u043d\u043e\u043a \u043f\u043e C++, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c C++ 17. \u0412 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043c\u044b \u043d\u0430\u0431\u0440\u0435\u043b\u0438 \u043d\u0430 <a href=\"https:\/\/blog.galowicz.de\/\">\u0431\u043b\u043e\u0433<\/a> \u042f\u0446\u0435\u043a\u0430 \u0413\u0430\u043b\u043e\u0432\u0438\u0446\u0430 (Jacek Galowicz). \u0418\u0437 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0432\u0435\u0436\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0411\u044b\u0432\u0430\u0435\u0442, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0438\u0441\u0435\u043b \u0438\u0437 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0411\u0443\u0434\u044c \u0442\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0438\u0441\u0435\u043b, \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e, \u0438\u043b\u0438 \u043b\u0438\u0448\u044c \u043d\u0435\u0447\u0435\u0442\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430, \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0438 \u0442.\u043f. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430, \u0442\u043e\u0447\u043d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441 <b>\u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438<\/b>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0440\u0430\u0441\u0447\u0435\u0442\u044b \u0432 <b>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/b>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438\u0441\u044c \u043c\u043e\u0449\u043d\u044b\u0435, \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b. <\/p>\n<p>  <b>\u0427\u0438\u0441\u043b\u0430 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 <\/b><\/p>\n<p>  \u0420\u044f\u0434 \u0447\u0438\u0441\u0435\u043b \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d. \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u044d\u0442\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u2013 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438, \u043d\u043e, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u0435\u0435: <\/p>\n<pre><code class=\"cpp\">size_t fib(size_t n) {     size_t a {0};     size_t b {1};      for (size_t i {0}; i &lt; n; ++i) {         const size_t old_b {b};         b += a;         a  = old_b;     }      return b; }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0447\u0438\u0441\u043b\u0430 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u0430, \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u043d\u0435 \u043d\u0430\u0437\u043e\u0432\u0435\u0448\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u043c. \u041f\u0440\u0438 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u0447\u0438\u0441\u043b\u0430 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 <code>N<\/code>, \u0430 \u0437\u0430\u0442\u0435\u043c <code>N+1<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 a \u0438 b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u0430\u0436\u0434\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0435\u0441\u0442\u044c \u0441\u0443\u043c\u043c\u0430 \u0434\u0432\u0443\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0447\u0438\u0441\u0435\u043b \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u044f\u0434\u0430.<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0434\u043e\u0431\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043a\u043b\u0430\u0441\u0441, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0435\u043a\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438, \u0447\u0442\u043e\u0431\u044b \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e. <\/p>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u044b \u043a\u043b\u0430\u0441\u0441 <code>fibonacci_number<\/code> \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>next()<\/code>, \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>current()<\/code> \u2013 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0435\u0433\u043e. \u042d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0448\u0430\u0433 \u0438 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e: \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0432 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 STL, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0432 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430.<\/p>\n<p>  <b>\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b<\/b><\/p>\n<p>  \u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440?<\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043a \u043d\u0430\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C++, \u0435\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430: <\/p>\n<pre><code class=\"cpp\">for (const auto &item : vector) {     \/* \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 *\/ } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d C++11. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0437 \u043d\u0435\u0433\u043e \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">{     auto it  (std::begin(vector));     auto end (std::end(vector));      for (; it != end; ++it) {         const auto &item (*it);         \/* \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 *\/     } }<\/code><\/pre>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u2013 \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0434\u0432\u0443\u0445 \u0432\u0438\u0434\u043e\u0432: <code>vector<\/code> \u2013 \u044d\u0442\u043e <b>\u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d<\/b>, \u0430 <code>it<\/code> \u2014 <b>\u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440<\/b>.<\/p>\n<p>  \u0418\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>begin()<\/code> \u0438<code> end()<\/code>. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043a\u043e\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0435 vector.begin() \u0438 vector.end(), \u0430 <code>std::begin(vector)<\/code> \u0438 <code>std::end(vector)<\/code>. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 STL \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 vector.begin() \u0438 end(), \u043d\u043e \u043e\u043d\u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b, \u0442\u043e \u0435\u0441\u0442\u044c, \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u0441 \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0447\u0442\u043e \u043d\u0430\u0434\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b.<\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <code>iterator<\/code>:<\/p>\n<ul>\n<li>\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 *, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f (\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u2013 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b!)<\/li>\n<li>\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 ++ (\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0439), \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/li>\n<li>\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 !=, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u043e\u0433\u043e, \u0430 \u043d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0446\u0438\u043a\u043b \u2013 \u0442\u043e \u0435\u0441\u0442\u044c, \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433 \u043b\u0438<code> it <\/code>\u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432 <code>end<\/code>.<\/li>\n<\/ul>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0431\u044b \u0442\u043e \u043d\u0438 \u0431\u044b\u043b\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0441\u0430\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <code>operator++<\/code>. \u0417\u0430\u0442\u0435\u043c \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0446\u0438\u043a\u043b\u044b for \u0432 \u0441\u0442\u0438\u043b\u0435 C++11.<\/p>\n<pre><code class=\"cpp\">class iterator {     \/\/ ... \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ...  public:     \/\/ \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440      iterator& operator++() { \/* \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 *\/ return *this; }      T operator*() const { \/* \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 *\/ }      bool operator!= const (const iterator& o) { \/* \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f *\/ } }<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u043d\u0430 \u0441\u0432\u0435\u0442\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u2013 \u0441\u0447\u0435\u0442\u043d\u044b\u0439; \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0435\u0435 \u0432 operator++ \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 <code>operator*<\/code>. <code>operator!=<\/code> \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u0441 \u0447\u0438\u0441\u043b\u043e\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430.<br \/>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438.<\/p>\n<p>  <b>\u0418\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438<\/b><\/p>\n<pre><code class=\"cpp\">class fibit {     size_t i {0};     size_t a {0};     size_t b {1};  public:     constexpr fibit() = default;      constexpr fibit(size_t b_, size_t a_, size_t i_)         : i{i_}, a{a_}, b{b_}     {}      size_t operator*() const { return b; }      constexpr fibit& operator++() {         const size_t old_b {b};         b += a;         a  = old_b;         ++i;         return *this;     }      bool operator!=(const fibit &o) const { return i != o.i; } };<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0433\u043e \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438:<\/p>\n<pre><code class=\"cpp\">fibit it;  \/\/ \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e &quot;i&quot;, \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 \u043e\u0434\u043d\u0438\u043c\u0438 \u043d\u0443\u043b\u044f\u043c\u0438, \u043d\u043e \u0434\u043b\u044f &quot;i&quot; \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \/\/ 20, \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u043d\u0435\u043c \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f  const fibit end {0, 0, 20};  while (it != end) {     std::cout &lt;&lt; *it &lt;&lt; std::endl;     ++it; }  \/\/ \u041b\u0438\u0431\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043a\u0430\u043a \u0432 STL: (\u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c &lt;iterator&gt;) std::copy(it, end, std::ostream_iterator&lt;size_t&gt;{std::cout,&quot;\\n&quot;});<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0431\u044b\u043b\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043a\u0430\u043a \u0432 C++11, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"cpp\">class fib_range {     fibit  begin_it;     size_t end_n;  public:     constexpr fib_range(size_t end_n_, size_t begin_n = 0)         : begin_it{fibit_at(begin_n)}, end_n{end_n_}     {}      fibit begin() const { return begin_it; }     fibit end()   const { return {0, 0, end_n}; } };<\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u2026<\/p>\n<pre><code class=\"cpp\">for (const size_t num : fib_range(10)) {     std::cout &lt;&lt; num &lt;&lt; std::endl; } <\/code><\/pre>\n<p>  \u2026 \u0438 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d 10 \u043f\u0435\u0440\u0432\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438<\/p>\n<p>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>fibit_at<\/code>? \u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>constexpr<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0435\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0434\u043e\u0448\u0435\u043b \u0434\u043e \u0442\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e:<\/p>\n<pre><code class=\"cpp\">constexpr fibit fibit_at(size_t n) {     fibit it;     for (size_t i {0}; i &lt; n; ++i) {         ++it;     }     return it; }<\/code><\/pre>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0431\u0440\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u0430 \u0432 \u0440\u044f\u0434\u0443 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u043e\u0442 \u0441\u043e\u0442\u043e\u0433\u043e \u0434\u043e \u0441\u0442\u043e \u043f\u044f\u0442\u043e\u0433\u043e \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0435 100 \u0447\u0438\u0441\u0435\u043b \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0443\u0436\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 C++17 <code>fibit_at<\/code> \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 <code>std::next(fibit{}, n)<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 C++17 <code>STLstd::next<\/code> \u2013 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>constexpr<\/code>.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e 100-\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0440\u044f\u0434\u0443 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0447\u0438\u0442\u0430\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441\u0442\u0430\u043d\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0438\u0441\u043a \u0431\u0438\u043d\u0430\u0440\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>constexpr<\/code>:<\/p>\n<pre><code class=\"cpp\">constexpr const fib_range hundred_to_hundredfive {105, 100};  for (size_t num : hundred_to_hundredfive) {     \/\/ \u0414\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c } <\/code><\/pre>\n<p>  <b>\u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 STL <\/b><\/p>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0435\u043a\u0442\u043e\u0440 \u0441 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 1000 \u0447\u0438\u0441\u043b\u0430\u043c\u0438 \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438. \u041c\u044b \u0443\u0436\u0435 \u043e\u0431\u0435\u0440\u043d\u0443\u043b\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0424\u0438\u0431\u043e\u043d\u0430\u0447\u0447\u0438 \u0432 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043b\u044e\u0431\u044b\u043c STL-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d <code>std:<\/code><\/p>\n<pre><code class=\"cpp\">std::vector&lt;size_t&gt; fib_nums; fib_nums.resize(1000);  constexpr const fib_range first1000 {1000}; std::copy(std::begin(first1000), std::end(first1000), std::begin(fib_nums));<\/code><\/pre>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e, \u043a\u043e\u0434 \u0432 \u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u043a\u0430\u043a \u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0437\u0434\u0435\u0441\u044c, \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u0437\u0430\u0434\u0430\u043b\u0438 \u043c\u0435\u0442\u043a\u0443 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u043f\u0443\u0441\u0442\u044c<code> fibit<\/code> \u044f\u0432\u043d\u043e \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 <code>std::iterator&lt;std::forward_iterator_tag, size_t&gt;<\/code>.<\/p>\n<p>  <code>std::iterator<\/code>, \u0431\u0443\u0434\u0443\u0447\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u043c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 <code>fibit<\/code>, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c STL \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440. \u0414\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 STL, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 (\u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u044d\u0442\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0441\u043a\u0440\u044b\u0442\u043e!).<\/p>\n<p>  \u041c\u0435\u0442\u043a\u0430<code> std::forward_iterator<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u2013 \u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043f\u0435\u0440\u0435\u0434, \u043d\u043e \u043d\u0435 \u043d\u0430\u0437\u0430\u0434.<\/p>\n<p>  <b>\u0418\u0442\u043e\u0433\u0438<\/b><\/p>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0447\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0412 C++ \u0435\u0441\u0442\u044c \u0432\u043a\u0443\u0441\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0434\u043b\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u0412\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 STL \u0438 \u043b\u044e\u0431\u044b\u043c\u0438 STL-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043c\u043e\u0449\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0433\u043a\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e\u0431 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0435, \u0430 \u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435, \u043d\u0435\u0436\u0435\u043b\u0438 \u043d\u043e\u0432\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0442\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u2013 \u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u041d\u043e \u043e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442, \u043f\u043e\u043a\u0430 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0430 \u043a\u043e\u0434, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0434\u0430\u0436\u0435 \u043d\u0435 \u00ab\u0437\u043d\u0430\u0435\u0442\u00bb, \u043a\u0430\u043a\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u044f\u0432\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0441\u043a\u0440\u044b\u0442\u0430 \u0437\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u0430). <\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u043b\u0435\u043d\u0438\u0432\u044b\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u2013 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0438\u0437 \u0447\u0438\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/317762\/\"> https:\/\/habrahabr.ru\/post\/317762\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u044f\u0442\u043d\u0438\u0446\u0430, \u0430 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0441\u043c\u043e\u0442\u0440 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u043e\u0432\u0438\u043d\u043e\u043a \u043f\u043e C++, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u0443\u0447\u0435\u0442\u043e\u043c C++ 17. \u0412 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043c\u044b \u043d\u0430\u0431\u0440\u0435\u043b\u0438 \u043d\u0430 <a href=\"https:\/\/blog.galowicz.de\/\">\u0431\u043b\u043e\u0433<\/a> \u042f\u0446\u0435\u043a\u0430 \u0413\u0430\u043b\u043e\u0432\u0438\u0446\u0430 (Jacek Galowicz). \u0418\u0437 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0432\u0435\u0436\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043d\u0430\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u044f, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043d\u0430\u044f \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-282609","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282609","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=282609"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/282609\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}