Hi I am very new to the 'sort' function in C++. And I got a question when I was trying to solve this problem, my question is if I need to use sort with my own function as below, why do I **have to declare the compare function as 'static'** here(If not using static, it will have non-static function calling error)......Thanks in advance.

```
class Solution {
private:
static bool compare(const Interval itv1, const Interval itv2){
return (itv1.start < itv2.start);
}
public:
bool canAttendMeetings(vector<Interval>& intervals) {
vector<Interval> itv = intervals;
sort(intervals.begin(),intervals.end(),compare);
for(int i=1;i<intervals.size();i++){
if (intervals[i].start<intervals[i-1].end)
return false;
}
return true;
}
};
```