Function object: Difference between revisions

Content deleted Content added
In C and C++: Elaborate
In C and C++: Show the function object being called
Line 140:
operator T*() const { return compare; }
};
 
int main()
{
std::vector<int> items { 4, 3, 1, 2 };
std::sort(items.begin(), items.end(), IntComparator());
return 0;
}
</syntaxhighlight>