{"image_url":null,"published":"2009-06-18 22:48:56","version":"1.0","url":"https://mas-higa.hatenadiary.org/entry/20090618/1245332936","type":"rich","provider_name":"Hatena Blog","title":"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u9806\u5e8f","width":"100%","height":"190","categories":["C++"],"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmas-higa.hatenadiary.org%2Fentry%2F20090618%2F1245332936\" title=\"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u9806\u5e8f - \u3072\u304c\u304d\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"mas-higa","blog_url":"https://mas-higa.hatenadiary.org/","blog_title":"\u3072\u304c\u304d\u306e\u65e5\u8a18","provider_url":"https://hatena.blog","description":"\u30aa\u30ec\u30aa\u30ec\u30af\u30e9\u30b9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 STL \u306e\u30b3\u30f3\u30c6\u30ca\u306b\u8a70\u3081\u305f\u3044\u3002vector \u306b\u306a\u3089\u8a70\u3081\u3089\u308c\u308b\u3051\u3069\u3001set \u306b\u8a70\u3081\u3088\u3046\u3068\u601d\u3063\u305f\u3089\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u9806\u5e8f\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002operator class Foo { ... public: bool operator<(const Foo& rhs) const { return id < rhs.id; } ... \u3053\u308c\u3067 set \u306b\u8a70\u3081\u3066\u3082\u6012\u3089\u308c\u306a\u3044\u3002 #include <set> ... set<Foo> foo; foo.insert(Foo(1)); foo.insert(Foo(2)); ... operator\u30ab\u30d7\u30bb\u30eb\u5316\u3092\u5d29\u3055\u306a\u3044\u306a\u3089\u3001\u2026","author_url":"https://blog.hatena.ne.jp/mas-higa/"}