class CompareBySalary { public: bool operator()(const Employee& a, const Employee& b) const; }; bool CompareBySalary::operator()(const Employee& a, const Employee& b) const { return a.get_salary() < b.get_salary(); }