Comparator can't be used directly as non-static member
You can make it static
inside class or I'd suggest to use a functor or a function outside class
template <typename T>
bool sortFunc(const T &t1, const T &t2) {
return (t1 > t2);
}
And then, in your class use
void mySort() {
myList.sort(sortFunc<T>);
}