Yes, it has an overloaded function that takes a comparator as a 3rd argument.
std::sort - cppreference.com
The other alternative would be to overload operator < for the type you're trying to sort...