函数对像
#include<iostream>
#include<string>
using namespace std;
#include<map>
#include<set>
#include<algorithm>
#include<functional>
/*函数对像
* 可以作参数传递
* 作函数
* 有状态,成员属性
*/
class mycompare {
bool operator()(int a, int b) {
return a > b;
}
};
void test() {
set<int, mycompare> s;
}
int main() {
test();
return 0;
}