{"published":"2013-05-13 19:17:39","version":"1.0","author_url":"https://blog.hatena.ne.jp/teramonagi/","blog_title":"My Life as a Mock Quant","url":"https://teramonagi.hatenablog.com/entry/20130513/1368440259","image_url":null,"description":"\u554f\u984c \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6df1\u3044\u30b3\u30d4\u30fc\u3092\u4f5c\u308b\u6642\u306f\u3001\u30b3\u30d4\u30fc\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u5185\u90e8\u3067\u547c\u3073\u51fa\u3057\u3066new\u3059\u308b\u3088\u3046\u306aclone\u95a2\u6570\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u30bb\u30aa\u30ea\u30fc\u3060\u3068\u601d\u3044\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304f\u308f\u3051\u3067\u3059\u3002 #include <iostream> //\u9069\u5f53\u306a\u30af\u30e9\u30b9 class Hoge { public: Hoge* clone(){return new Hoge(*this);} }; class Moge { public: Moge* clone(){return new Moge(*this);} }; int main() { Hoge x1; Moge y1; //\u30af\u30ed\u30fc\u30f3\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 Hoge *x2 = x1.\u2026","author_name":"teramonagi","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fteramonagi.hatenablog.com%2Fentry%2F20130513%2F1368440259\" title=\"CRTP(Curiously Recurring Template Pattern)\u3092\u4f7f\u3063\u3066Cloneable(Deep copy)\u3092\u697d\u306b\u66f8\u304f\u65b9\u6cd5\u3092\u8003\u3048\u3066\u3044\u305f - My Life as a Mock Quant\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","blog_url":"https://teramonagi.hatenablog.com/","title":"CRTP(Curiously Recurring Template Pattern)\u3092\u4f7f\u3063\u3066Cloneable(Deep copy)\u3092\u697d\u306b\u66f8\u304f\u65b9\u6cd5\u3092\u8003\u3048\u3066\u3044\u305f","categories":["C++"],"height":"190","type":"rich","provider_name":"Hatena Blog"}