When will the overloading operator() present in PersonCompare get called?
When will the operator function call?
In the video there’s a () operator in personcompare class, it will be called at the time of comparison between two objects of person. As stl doesn’t deal with the function but with classes.
But in the code we are not doing comparison
in bool operator() we are doing na A.age<B.age that is nothing but comparison.