struct CompareHeight { bool operator()(Person const& p1, Person const& p2) { // return "true" if "p1" is ordered // before "p2", for example: return p1.height < p2.height; } };