{"width":"100%","blog_url":"https://mahou-ptr.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/mahou_ptr/","url":"https://mahou-ptr.hatenablog.com/entry/2017/12/05/163120","version":"1.0","published":"2017-12-05 16:31:20","height":"190","description":"\u30c7\u30b9\u30c8\u30e9\u30af\u30bf\u304cvirtual\u3067\u306a\u3044class\u306e\u7d99\u627f\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3068\u3044\u3046\u8a71\u3092\u805e\u3044\u305f\u3053\u3068\u304c\u3042\u308b\u4eba\u3082\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u305d\u306e\u8a71\u3092\u3061\u3087\u3063\u3068\u3057\u307e\u3059 struct A { A() = default; ~A() { std::cout << \"A destructor\" << std::endl; } }; struct B:A { B() = default; ~B() { std::cout << \"B destructor\" << std::endl; } }; int main() { { std::unique_ptr<B> a = std::make_unique<B>(); } { std::u\u2026","categories":["C++"],"title":"C++:\u975evirtual\u30c7\u30b9\u30c8\u30e9\u30af\u30bf\u7d99\u627f\u306e\u8a71","provider_url":"https://hatena.blog","provider_name":"Hatena Blog","blog_title":"\u30b2\u30fc\u30e0\u4f5c\u308a\u306f\u697d\u3057\u3044","image_url":null,"author_name":"mahou_ptr","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmahou-ptr.hatenablog.com%2Fentry%2F2017%2F12%2F05%2F163120\" title=\"C++:\u975evirtual\u30c7\u30b9\u30c8\u30e9\u30af\u30bf\u7d99\u627f\u306e\u8a71 - \u30b2\u30fc\u30e0\u4f5c\u308a\u306f\u697d\u3057\u3044\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}