class LessInt {
public:
bool operator()(const int& riLeft, const int& riRight) const {
return riLeft < riRight;
}
};
//と定義すれば、
sort(aiTable, aiTable + 5, LessInt());
//と、あたかも、コンストラクタを呼び出しているがごとく見える.
sort(a.begin(), a.end(), cmp) //<-- cmpは比較関数 クラスにしていない。