{"provider_name":"Hatena Blog","type":"rich","width":"100%","url":"https://secret-garden.hatenablog.com/entry/2015/03/15/234443","height":"190","image_url":null,"categories":["C++"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2015%2F03%2F15%2F234443\" title=\"\u30ab\u30b9\u30bf\u30e0\u3067\u30ea\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u30e6\u30fc\u30b6\u5b9a\u7fa9\u578b\u306b\u5bfe\u3057\u3066 std::unique_ptr \u3092\u7279\u6b8a\u5316\u3059\u308b - Secret Garden(Instrumental)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","blog_url":"https://secret-garden.hatenablog.com/","published":"2015-03-15 23:44:43","author_url":"https://blog.hatena.ne.jp/osyo-manga/","blog_title":"Secret Garden(Instrumental)","title":"\u30ab\u30b9\u30bf\u30e0\u3067\u30ea\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u30e6\u30fc\u30b6\u5b9a\u7fa9\u578b\u306b\u5bfe\u3057\u3066 std::unique_ptr \u3092\u7279\u6b8a\u5316\u3059\u308b","author_name":"osyo-manga","description":"\u305d\u3093\u306a\u8a71\u304c Lingr \u306e C++ \u90e8\u5c4b\u3067\u51fa\u3066\u3044\u305f\u306e\u3067\u3002 // \u6bce\u56de\u30ab\u30b9\u30bf\u30e0\u30c7\u30ea\u30fc\u30bf\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u304c\u624b\u9593 std::unique_ptr<X, decltype(&X_deleter)> xp(new X(42), &X_deleter); // \u3053\u3046\u66f8\u3051\u308b\u3088\u3046\u306b\u3057\u305f\u3044 // std::unique_ptr<X> xp(new X(42)); [\u30b3\u30fc\u30c9] #include <memory> #include <iostream> struct X{ friend void X_deleter(X*); X(int value) : value(value){} int value; privat\u2026","provider_url":"https://hatena.blog"}