普通的stl::set,查找时只能传入key_type. 不能使用属性值查找. 例如: /* an employee record holds its ID, name and age */ class employee { public: int id; std::string name; int age; public: employee():id(){} employee(int id_,std::string name_,int age_):id(id_),name(name_),age…