J
John Black
Hi,
I have such a vector, vector<MyClass> vec and here is how I want to
sort it,
sort(vec.begin(), vec.end(), Util::MyClassOrder);
Now in another code I want to get opposite order sort, so I write
this way,
sort(vec.begin(), vec.end(), not1(Util::MyClassOrder));
But it does not compile!
The signature of MyClassOrder is like,
class Util{
static bool MyClassOrder(MyClass&, MyClass&);
};
Any obvious reason?
I have such a vector, vector<MyClass> vec and here is how I want to
sort it,
sort(vec.begin(), vec.end(), Util::MyClassOrder);
Now in another code I want to get opposite order sort, so I write
this way,
sort(vec.begin(), vec.end(), not1(Util::MyClassOrder));
But it does not compile!
The signature of MyClassOrder is like,
class Util{
static bool MyClassOrder(MyClass&, MyClass&);
};
Any obvious reason?