{"published":"2016-12-08 15:21:30","blog_title":"\u30b2\u30fc\u30e0\u4f5c\u308a\u306f\u697d\u3057\u3044","type":"rich","version":"1.0","author_url":"https://blog.hatena.ne.jp/mahou_ptr/","image_url":null,"provider_name":"Hatena Blog","blog_url":"https://mahou-ptr.hatenablog.com/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmahou-ptr.hatenablog.com%2Fentry%2F2016%2F12%2F08%2F152130\" title=\"\u95a2\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u306f\u9759\u7684\u306b\u6c7a\u307e\u308b\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>","categories":["C++"],"height":"190","provider_url":"https://hatena.blog","width":"100%","url":"https://mahou-ptr.hatenablog.com/entry/2016/12/08/152130","description":"\u95a2\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u306f\u9759\u7684\u306b\u6c7a\u307e\u308b\u3053\u3068\u3092\u77e5\u3089\u306a\u304f\u3066\u306f\u307e\u3063\u305f\u3053\u3068\u304c\u3042\u3063\u305f\u306e\u3067\u30e1\u30e2 class Super { }; class Sub :public Super { }; void Piyo(const Super& super) { cout << \"Super\" << endl; } //\u95a2\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9 void Piyo(const Sub& sub) { cout << \"Sub\" << endl; } void main() { unique_ptr<Super> hoge = make_unique<Sub>(); Piyo(*hoge); } \u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068\u4f55\u304c\u8868\u793a\u3055\u308c\u308b\u2026","title":"\u95a2\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u306f\u9759\u7684\u306b\u6c7a\u307e\u308b\u306e\u8a71","author_name":"mahou_ptr"}