Q:

Operator overloading of () and the different ways and conditions it can be used

I was wondering about how to overload () operator
For example 
class A{
    int a,b;
public:
    void operator()(int x, int y);
};

void A::operator()(int x, int y){
    x = a;
    y = b;
}

int main(){
    A a = new A();
    a(5,4); // this will call the overloaded operator
    return 0;
}

I was wondering if there are any other use cases to the following and any other scenario where this can be called. 

A:

operator() is just like any other function. The only difference is that instead of calling it like a.foo(), you write a().
You can use it exactly like any other function, you can overload it as much as you want, it can have as many parameters as you want (including zero), it can be templated and anything else that you can think of that any other function can do.

