Why override operator()?
One of the primary goal when overloading operator() is to create a functor. A functor acts just like a function, but it has the advantages that it is stateful, meaning it can keep data reflecting its state between calls. Here is a simple functor example : struct Accumulator { int counter = 0; int operator()(int … Read more