greater is a class template, which overloads the operator() internally. In addition, function objects are defined as follows function objects are instances of a class with member operator() defined. this member function allows the object to be used with the same syntax as a function call. Therefore, the object of greater is a function object. greater<string>(), calls the default constructor to generate a temporary object.
means that
greater<string>()
returns a function object constructed by calling the default constructorgreater is a class template, which overloads the operator() internally. In addition, function objects are defined as follows function objects are instances of a class with member operator() defined. this member function allows the object to be used with the same syntax as a function call. Therefore, the object of greater is a function object. greater<string>(), calls the default constructor to generate a temporary object.