- 569 名前:デフォルトの名無しさん mailto:sage [2010/02/17(水) 19:54:38 ]
- less を定義すれば greater とかも(特別な処理がない限り)自動で決まると思うのですが
そういった処理(less がら greater を作製)をするテンプレートは標準であるのでしょうか? class CHoge { public: CHoge(int i, const std::string& str) : m_i(i), m_str(str){} int m_i; std::string m_str; struct Less { bool operator()(const CHoge& lh, const CHoge& rh) const { return lh.m_i < rh.m_i; } }; };
|

|