Is this claim correct: "Anywhere you pass in a function, you can pass in a functor"?
for example:Code:bool cmp_function(int a, int b){ return a<b; } struct cmp_functor{ bool operator()(int a, int b){ return a<b; } }; std::sort(vec.begin(), vec.end(), cmp_function); std::sort(vec.begin(), vec.end(), cmp_functor);