{"id":6800,"date":"2018-02-20T17:02:41","date_gmt":"2018-02-20T08:02:41","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6800"},"modified":"2018-02-21T19:05:40","modified_gmt":"2018-02-21T10:05:40","slug":"make_shared-%e3%81%8c-ide-%e3%81%a8%e7%9b%b8%e6%80%a7%e3%81%8c%e6%82%aa%e3%81%8f%e3%81%a6%e8%be%9b%e3%81%84","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=6800","title":{"rendered":"make_shared \u304c IDE \u3068\u76f8\u6027\u304c\u60aa\u304f\u3066\u8f9b\u3044"},"content":{"rendered":"<p>C++ \u3067\u3082\u6700\u8fd1\u306f\u30b9\u30de\u30fc\u30c8\u30dd\u30a4\u30f3\u30bf\u304c\u4f7f\u3048\u308b\u308f\u3051\u3067\u3059\u304c\u3001 std::shared_ptr \u3092\u4f5c\u308b\u95a2\u6570\u3067\u3042\u308b std::make_shared \u304c IDE \u306e\u9759\u7684\u89e3\u6790\u3068\u76f8\u6027\u304c\u60aa\u304f\u3066\u8f9b\u307f\u3092\u611f\u3058\u3066\u3044\u307e\u3059\u3002\uff08\u3068\u308a\u3042\u3048\u305a CLion \u3067\u306e\u6319\u52d5\u3067\u3059\u304c\u3001 VS \u3067\u3082\u540c\u3058\u3088\u3046\u306a\u611f\u3058\u3058\u3083\u306a\u3044\u304b\u306a\u3041\u2026\uff09<\/p>\n<ul>\n<li><code>std::make_shared&lt;Hoge&gt;(<\/code> \u3068\u307e\u3067\u6253\u3063\u305f\u6642\u306b\u51fa\u3066\u304f\u308b\u5f15\u6570\u30b5\u30b8\u30a7\u30b9\u30c8\u304c <code>Args&&...<\/code> \u306b\u306a\u3063\u3066\u3066\u5168\u304f\u5f79\u306b\u7acb\u305f\u306a\u3044\u3002 Hoge \u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u304b\u3089\u60c5\u5831\u3092\u5f15\u3063\u5f35\u3063\u3066\u304d\u3066\u307b\u3057\u3044\u3002\u3064\u3044\u3067\u306b\u8a00\u3046\u3068\u5f15\u6570\u9593\u9055\u3048\u3066\u3066\u3082 IDE \u304b\u3089\u306f\u8b66\u544a\u304c\u51fa\u306a\u3044\uff08\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u521d\u3081\u3066\u9593\u9055\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308b\uff09\u3002<\/li>\n<li>Hoge \u30af\u30e9\u30b9\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u547c\u3073\u51fa\u3057\u5143\u3092\u691c\u7d22\u3057\u3066\u3082\u51fa\u3066\u3053\u305a\u3001\u3088\u304f\u3088\u304f\u8003\u3048\u305f\u3089 make_shared \u7d4c\u7531\u306a\u306e\u3067\u81ea\u5206\u3067\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u304b\u3089\u306f\u76f4\u63a5\u547c\u3070\u308c\u3066\u306a\u304b\u3063\u305f\u3002make_shared \u3092\u66f8\u3044\u305f\u4f4d\u7f6e\u304c\u30d2\u30c3\u30c8\u3057\u3066\u307b\u3057\u3044\u3002<\/li>\n<\/ul>\n<p>make_shared \u306b\u9650\u3089\u306a\u3044\u3057\u3001\u6839\u672c\u7684\u306b\u306f\u30b9\u30de\u30fc\u30c8\u30dd\u30a4\u30f3\u30bf\u306b\u3082\u9650\u3089\u306a\u3044\u3057\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u3082\u9650\u3089\u306a\u3044\u308f\u3051\u3067\u3059\u304c\u3001\u4f55\u3068\u304b\u306a\u3089\u3093\u306e\u3067\u3059\u304b\u306d\u3053\u308c\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u4f55\u3068\u304b\u306a\u3089\u3093\u306e\u3067\u3059\u304b\u306d\u3001\u3068\u3044\u3046\u304b\u3001\u3068\u308a\u3042\u3048\u305a\u4e0a\u306e1\u3064\u76ee\u3092\u4f55\u3068\u304b\u3059\u308b\u305f\u3081\u306b\u306f\u3001<\/p>\n<ul>\n<li>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u95a2\u6570\uff08\u3053\u306e\u5834\u5408\u306f make_shared&lt;T&gt;\uff09\u306b\u5f15\u6570\u306e\u578b\u306b\u5bfe\u3059\u308b\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\uff08\u3053\u306e\u5834\u5408\u306f\u300cT \u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3068\u540c\u3058\u300d\uff09\u304c\u66f8\u3051\u3066\u3001<\/li>\n<li>\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u4ee5\u5916\u3092\u8003\u616e\u3059\u308b\u306a\u3089\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u66f8\u304d\u65b9\u304c\uff08\u30c7\u30d5\u30a1\u30af\u30c8\u3067\u3082\u4f55\u3067\u3082\u3044\u3044\u306e\u3067\uff09\u6a19\u6e96\u5316\u3055\u308c\u3066\u3001<\/li>\n<li>\u305d\u308c\u3092 IDE \u304c\u8a8d\u8b58\u3057\u3066\u5f15\u6570\u30b5\u30b8\u30a7\u30b9\u30c8\u3059\u308b<\/li>\n<\/ul>\n<p>\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u4e0a\u306e2\u3064\u76ee\u3092\uff08make_shared \u306b\u9650\u3089\u305a\uff09\u4f55\u3068\u304b\u3059\u308b\u306b\u306f\u3069\u3046\u3057\u305f\u3089\u3044\u3044\u304b\u30b5\u30c3\u30d1\u30ea\u5206\u304b\u3089\u3093\u3057\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C++ \u3067\u3082\u6700\u8fd1\u306f\u30b9\u30de\u30fc\u30c8\u30dd\u30a4\u30f3\u30bf\u304c\u4f7f\u3048\u308b\u308f\u3051\u3067\u3059\u304c\u3001 std::shared_ptr \u3092\u4f5c\u308b\u95a2\u6570\u3067\u3042\u308b std::make_shared \u304c IDE \u306e\u9759\u7684\u89e3\u6790\u3068\u76f8\u6027\u304c\u60aa\u304f\u3066\u8f9b\u307f\u3092\u611f\u3058\u3066\u3044\u307e\u3059\u3002\uff08\u3068\u308a\u3042\u3048\u305a CLion [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-6800","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6800"}],"version-history":[{"count":6,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6800\/revisions"}],"predecessor-version":[{"id":6806,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6800\/revisions\/6806"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6800"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}