{"published":"2009-03-10 20:55:54","type":"rich","provider_url":"https://hatena.blog","image_url":null,"blog_title":"melpon\u65e5\u8a18 - Haskell\u3082C++\u3082\u307e\u3068\u3082\u306b\u6271\u3048\u306a\u3044\u3078\u305f\u308c\u306e\u30da\u30fc\u30b8","categories":["BREW","C++"],"provider_name":"Hatena Blog","width":"100%","height":"190","author_url":"https://blog.hatena.ne.jp/melpon/","url":"https://melpon.hatenadiary.org/entry/20090310/1236686154","blog_url":"https://melpon.hatenadiary.org/","title":"BREW API \u3068 intrusive_ptr \u306e\u89aa\u548c\u6027","author_name":"melpon","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmelpon.hatenadiary.org%2Fentry%2F20090310%2F1236686154\" title=\"BREW API \u3068 intrusive_ptr \u306e\u89aa\u548c\u6027 - melpon\u65e5\u8a18 - Haskell\u3082C++\u3082\u307e\u3068\u3082\u306b\u6271\u3048\u306a\u3044\u3078\u305f\u308c\u306e\u30da\u30fc\u30b8\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u306f\u6700\u60aa\u3060\u3068\u601d\u3046\u306e\u3067\u3059\u3002 C \u3067\u306e\u64ec\u4f3c\u7684\u306a\u7d99\u627f\u95a2\u4fc2\u306f C++ \u306e\u7d99\u627f\u95a2\u4fc2\u3068\u306f\u95a2\u4fc2\u304c\u7121\u3044\u306e\u3067\u3001\u578b\u306e\u5909\u63db\u304c\u4e00\u5207\u3067\u304d\u306a\u3044\u306e\u3067\u3059\u3002 intrusive_ptr<IShell> shell; intrusive_ptr<IBase> base; shell = base; // \u5f53\u7136\u30a8\u30e9\u30fc base = shell; // \u30a8\u30e9\u30fc base = static_pointer_cast<IBase>(shell); // \u30a8\u30e9\u30fc base = shell.get(); // \u30a8\u30e9\u30fc base = static_cast<IBase*>(shell.get()); // \u30a8\u30e9\u30fc base = reinterp\u2026","version":"1.0"}