{"id":203310,"date":"2013-11-22T22:57:08","date_gmt":"2013-11-22T18:57:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=203310"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=203310","title":{"rendered":"<span class=\"post_title\">Meeting C++ 2013<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>Meeting C++, Dusseldorf<\/h4>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0448\u043b\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"http:\/\/meetingcpp.com\/index.php\/mcpp2013.html\">\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438<\/a>, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0439 C++. \u0423\u0440\u043e\u0432\u0435\u043d\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 GoingNative: \u0434\u043e\u043a\u043b\u0430\u0434\u044b \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u041a\u0430\u043a \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435. \u0421\u0430\u043c\u044b\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u0430 \u2014 \u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0438 \u0441 \u043a\u0435\u043c \u043b\u0438\u0447\u043d\u043e \u043d\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0442\u0435\u043c. \u042d\u0442\u043e \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c, \u0447\u0442\u043e \u044f \u0437\u0430\u0433\u043e\u0440\u0435\u043b\u0441\u044f \u0438\u0434\u0435\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0435 C++ User Group, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0447\u043d\u043e \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u043e \u0446\u0435\u0445\u0443. \u041d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u0442\u043e\u043c, \u0430 \u043f\u043e\u043a\u0430 \u043e \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u043a\u043b\u0430\u0434\u044b, \u043e\u0442\u043c\u0435\u0447\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043d\u0435 \u0442\u0435\u043c\u044b \u0438 \u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0434\u043e\u043a\u043b\u0430\u0434\u0435.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0442\u0440\u0435\u043d\u0434\u044b<\/h5>\n<p>  <\/p>\n<ul>\n<li>move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430;<\/li>\n<li>\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c;<\/li>\n<li>\u0441\u0435\u0442\u044c<\/li>\n<li>\u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0434\u0435\u043b\u044f\u0449\u0435\u0435\u0441\u044f \u043d\u0430 \u0438\u043d\u044c \u0438 \u044f\u043d\u044c<br \/> \n<ul>\n<li>\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 c++ \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u044f\u0434\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435;<\/li>\n<li>c++ \u043d\u0430 embedded \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>Move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430<\/h5>\n<p>  \u0421\u0430\u043c\u0430 \u043f\u043e \u0441\u0435\u0431\u0435 move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430, \u0434\u0443\u043c\u0430\u044e, \u0432\u0441\u0435\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0430. \u0411\u0435\u0433\u043b\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0434\u0430\u0451\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u043e\u0432 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 (<a href=\"http:\/\/habrahabr.ru\/post\/140578\/\">1<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/174019\/\">2<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/140699\/\">3<\/a>). \u041f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u043e\u043a\u043b\u0430\u0434\u0447\u0438\u043a \u0432\u044b\u0436\u0438\u043c\u0430\u043b \u0438\u0437 \u043d\u0435\u0451 \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451. \u0418\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u042d\u0440\u0438\u043a \u041d\u0438\u0431\u043b\u0435\u0440 \u043f\u043e\u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u043b \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u043b\u0443\u0447\u0448\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0438 \u0447\u0442\u043e \u0438\u0437 \u043d\u0438\u0445 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c. \u0421 \u0443\u0447\u0451\u0442\u043e\u043c sink-\u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u043e\u0437\u043d\u0430\u0442\u044c rvalue, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0432\u043e\u0434\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0430<sup><a href=\"#1\">1<\/a><\/sup>.  <\/p>\n<table>\n<tr>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0434\u043b\u044f C++11<\/th>\n<\/tr>\n<tr>\n<td><i>\u0412\u0445\u043e\u0434\u043d\u044b\u0435<\/i>:<br \/>  \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0438 sink \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<br \/>  \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435<\/td>\n<td>  \u041f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e<br \/>  const ref<\/td>\n<\/tr>\n<tr>\n<td><i>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435<\/i><\/td>\n<td>\u041f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e<\/td>\n<\/tr>\n<tr>\n<td><i>\u0412\u0445\u043e\u0434\u043d\u044b\u0435\/\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435<\/i><\/td>\n<td>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c stateful algorithm object<sup><a href=\"#2\">2<\/a><\/sup><\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h5>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c<\/h5>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043e\u0431\u0449\u0438\u0445 \u0441\u043b\u043e\u0432, \u0432\u0440\u043e\u0434\u0435 \u00ab\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0438\u0437\u0430\u0439\u043d\u0430\u00bb \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0437\u0432\u0443\u0447\u0430\u043b\u0438 \u0436\u0430\u043b\u043e\u0431\u044b: \u0432\u0435\u0434\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u044f\u0437\u044b\u043a\u0435 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435\u0442. \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c \u0432\u0432\u043e\u0434\u0435\/\u0432\u044b\u0432\u043e\u0434\u0435 \u0442\u0435\u0440\u044f\u0435\u0442 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u044b \u043e \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u0445, \u043e\u0431 std::async \u0438 std::future, \u043d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043e\u043a\u0430 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u0432 C++ \u0441\u043a\u043e\u0440\u0435\u0435 \u043c\u0435\u0440\u0442\u0432\u0430, \u0447\u0435\u043c \u0436\u0438\u0432\u0430. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438\u043b\u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043d\u043e \u044f\u0437\u044b\u043a \u043a\u0430\u043a \u0441\u0442\u043e\u044f\u043b \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u0442\u0430\u043a \u0438 \u0441\u0442\u043e\u0438\u0442.<br \/>  \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 C++17. \u041f\u043e\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u0435\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c <a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2013\/n3747.pdf\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  \u0427\u0442\u043e \u0436\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u043d\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u044f \u043d\u0430 \u0437\u0435\u043c\u043b\u0435? \u041d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e!  <\/p>\n<ul>\n<li>POSIX: aio;<\/li>\n<li>FreeBSD: kqueue;<\/li>\n<li>Linux: epoll;<\/li>\n<li>\u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e boost::asio.<\/li>\n<\/ul>\n<p>  <\/p>\n<h5>\u0421\u0435\u0442\u044c<\/h5>\n<p>  \u0412\u0441\u0451 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e \u043a\u0430\u043a \u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c\u044e (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u0443\u0436\u0435). \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u044c <a href=\"https:\/\/github.com\/SG4\/draft\/wiki\">WG21\/SG4<\/a> (\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0432 \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0435 \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0441\u0435\u0442\u044c\u044e) \u043f\u0440\u0438\u0432\u0435\u043b \u0438\u0445 \u0440\u043e\u0430\u0434\u043c\u0430\u043f \u043d\u0430 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0433\u043e\u0434\u044b:  <\/p>\n<ul>\n<li>2014 \u2014 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u0430\u0439\u0442, URI, IP-\u0430\u0434\u0440\u0435\u0441\u0430; <\/li>\n<li>201X \u2014 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c (\u0442\u0430 \u0441\u0430\u043c\u0430\u044f), HTTP, Resolvers;<\/li>\n<li>201Y \u2014 \u0441\u043e\u043a\u0435\u0442\u044b, \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u0432\u0432\u043e\u0434\u0430\/\u0432\u044b\u0432\u043e\u0434\u0430;<\/li>\n<li>201Z \u2014 SSL, ICMP.<\/li>\n<\/ul>\n<p>  \u041b\u0438\u0447\u043d\u043e \u043c\u0435\u043d\u044f \u043e\u0447\u0435\u043d\u044c \u0443\u0433\u043d\u0435\u0442\u0430\u0435\u0442, \u0447\u0442\u043e HTTP \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u0441\u043e\u043a\u0435\u0442\u044b. \u0415\u0441\u043b\u0438 \u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c HTTP \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0448\u0435.  <\/p>\n<h5>\u041f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h5>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0441\u0440\u0430\u0437\u0443 \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u0432\u0440\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u0430: \u00ab\u041a\u0430\u043a \u043c\u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0434\u0435\u0440?\u00bb \u0438 \u00ab\u041a\u0430\u043a \u043c\u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 embedded?\u00bb. \u0415\u0441\u043b\u0438 \u0412\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e C++ \u0438 embedded \u044d\u0442\u043e \u043d\u043e\u043d\u0441\u0435\u043d\u0441, \u0442\u043e \u0432\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f:  <\/p>\n<ul>\n<li>Joint Strike Fighter Air Vehicle C++ Coding Standards for the System Development and Demonstration Program, Lockheed Martin Corporation, 2005;<\/li>\n<li>MISRA-C: 2008 \u2013 Guidelines for the use of the C++ language in critical systems, MIRA Limited, 2008;<\/li>\n<li><a href=\"http:\/\/www.open-std.org\/jtc1\/sc22\/wg21\/docs\/TR18015.pdf\">Technical Report on C++ Performance<\/a>, \u0433\u043b\u0430\u0432\u0430 7 Using C++ in Embedded Systems.<\/li>\n<\/ul>\n<p>  \u0412 \u0430\u0441\u043f\u0435\u043a\u0442\u0435 \u0436\u0435 C++11 \u043e\u0431\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0441 \u043e\u0431\u0449\u0438\u0445 \u043f\u043e\u0437\u0438\u0446\u0438\u0439.  <\/p>\n<ul>\n<li>\u041d\u0430\u0448\u0430 \u043b\u044e\u0431\u0438\u043c\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c: \u0434\u0430\u0451\u0442 \u043d\u0430\u043c lock- \u0438 wait-free \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u044f\u0434\u0435\u0440\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u0445, \u0443\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0432 embedded.<\/li>\n<li>\u0413\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c POD&#8217;\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u0442\u044c is_pod, is_trivial, is_standard_layout \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 (\u0434\u0430, \u0438 \u043d\u0430\u043c) \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u0430 \u0433\u0434\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u043c \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/li>\n<li>\u041d\u0438\u043a\u0443\u0434\u0430 \u0431\u0435\u0437 move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438. \u042d\u043a\u043e\u043d\u043e\u043c\u0438\u043c \u043d\u0430 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f\u0445.<\/li>\n<li>\u0412\u044b\u043d\u043e\u0441\u0438\u043c \u0432\u0441\u0451 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u044d\u0442\u0430\u043f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c std::array, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0438\u0437\u0431\u0435\u0433\u0430\u0435\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/li>\n<li>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 std::shared_ptr, std::unique_ptr.<\/li>\n<\/ul>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 std::shared_ptr. \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/139064\/\">\u043e\u0431\u0437\u043e\u0440\u0435 Going Native&#8217;2012<\/a> \u0435\u0441\u0442\u044c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c std::make_shared \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 std::shared_ptr:  <\/p>\n<blockquote>\n<pre><code>auto sp1 = make_shared&lt;T&gt;( args ); \/\/ 1 allocation, 24 bytes overhead shared_ptr&lt;T&gt; sp2( new T( args ) ); \/\/ 2 allocations, 40 bytes overhead <\/code><\/pre>\n<\/blockquote>\n<p>  \u0420\u0430\u0439\u043d\u0435\u0440 \u0413\u0440\u0438\u043c\u043c \u043d\u0435 \u043f\u043e\u043b\u0435\u043d\u0438\u043b\u0441\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, std::shared_ptr \u0438 std::unique_ptr.<sup><a href=\"#4\">3<\/a><\/sup>  <\/p>\n<pre><code>auto st = std::chrono::system_clock::now();    for (long long i=0 ; i &lt; 100000000; ++i){   int* tmp(new int(i));   delete tmp;   \/\/ std::unique_ptr&lt;int&gt; tmp(new int(i));   \/\/ std::shared_ptr&lt;int&gt; tmp(new int(i));   \/\/ std::shared_ptr&lt;int&gt; tmp= std::make_shared&lt;int&gt;(i);  }    std::chrono::duration&lt;double&gt; dur=std::chrono::system_clock::now() - st();  std::cout &lt;&lt; dur.count();  <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0430\u043a\u0443\u044e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443.  <\/p>\n<table>\n<tr>\n<th>pointer type<\/th>\n<th>real hardware<\/th>\n<th>virtualization<\/th>\n<\/tr>\n<tr>\n<td>native<\/td>\n<td>3.0 sec.<\/td>\n<td>5.7 sec.<\/td>\n<\/tr>\n<tr>\n<td>std::unique_ptr<\/td>\n<td>2.9 sec.<\/td>\n<td>5.7 sec. <\/td>\n<\/tr>\n<tr>\n<td>std::shared_ptr<\/td>\n<td>6.0 sec.<\/td>\n<td>11.8 sec. <\/td>\n<\/tr>\n<tr>\n<td>std::make_shared<\/td>\n<td><\/td>\n<td>6.5 sec.<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<hr\/>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438<br \/>  <a name=\"1\"><\/a>1. <a href=\"http:\/\/meetingcpp.com\/tl_files\/2013\/talks\/Keynote-cxx11-library-design-ericniebler.pdf\">Eric Niebler, C++11 and No-Compromise Library Design<\/a><br \/>  <a name=\"2\"><\/a>2. <a href=\"http:\/\/ericniebler.com\/2013\/10\/13\/out-parameters-vs-move-semantics\/\">Out Parameters, Move Semantics, and Stateful Algorithms<\/a><br \/>  <a name=\"3\"><\/a>3. <a href=\"http:\/\/meetingcpp.com\/tl_files\/2013\/talks\/EmbeddedC++11%20-%20RainerGrimm.pdf\">Rainer Grimm, Embedded Programming with C++11<\/a> \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\/203310\/\"> http:\/\/habrahabr.ru\/post\/203310\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>Meeting C++, Dusseldorf<\/h4>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0448\u043b\u043e, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"http:\/\/meetingcpp.com\/index.php\/mcpp2013.html\">\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438<\/a>, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0439 C++. \u0423\u0440\u043e\u0432\u0435\u043d\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 GoingNative: \u0434\u043e\u043a\u043b\u0430\u0434\u044b \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u041a\u0430\u043a \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u0435. \u0421\u0430\u043c\u044b\u043c \u0433\u043b\u0430\u0432\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u0430 \u2014 \u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0438 \u0441 \u043a\u0435\u043c \u043b\u0438\u0447\u043d\u043e \u043d\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0442\u0435\u043c. \u042d\u0442\u043e \u043c\u043d\u0435 \u0442\u0430\u043a \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c, \u0447\u0442\u043e \u044f \u0437\u0430\u0433\u043e\u0440\u0435\u043b\u0441\u044f \u0438\u0434\u0435\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0435 C++ User Group, \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0447\u043d\u043e \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u043e \u0446\u0435\u0445\u0443. \u041d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u0442\u043e\u043c, \u0430 \u043f\u043e\u043a\u0430 \u043e \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e\u043a\u043b\u0430\u0434\u044b, \u043e\u0442\u043c\u0435\u0447\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043c\u043d\u0435 \u0442\u0435\u043c\u044b \u0438 \u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0434\u043e\u043a\u043b\u0430\u0434\u0435.  <\/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-203310","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/203310","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=203310"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/203310\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=203310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=203310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=203310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}