> 
> **Possible Duplicate:**  
> 
> [problem sorting using member function as comparator](https://stackoverflow.com/questions/1902311/problem-sorting-using-member-function-as-comparator) 
> 
> 
> 

Is it possible to use a class method as comparator function in std::sort? 

for example:

```
std::sort(list.begin(),list.end(),object->comparator) //Doesn't compile

```

If yes, how I do this?