Code:
Class ComplexComparer
{
public:
    bool operator()(const Complex& a, const Complex& b);
};

Code:
bool ComplexComparer::operator()(const Complex& a, const Complex& b)
{
    float magA = std::sqrt(a.getReal() * a.getReal() + a.getIm() * a.getIm());
    float magB = std::sqrt(b.getReal() * b.getReal() + b.getIm() * b.getIm());
    return magA < magB;
}
Code:
int main()
{
    Complex a(1, 1.5);
    Complex b(0.5f, 4);
    Complex m = std::max(a, b, ComplexComparer());
    std::cout << "max = " << m << std::endl;
    return 0;
}
Here, I can't understand functor inside this function std::max(a, b, ComplexComparer());

I understand ComplexComparer() is passed as parameter to function Max, its result will be Boolean: true or false.
But ComplexComparer() has no parameters inside[B] ()[/B but

bool operator()(const Complex& a, const Complex& b) has parameters!

What parameter is passed as both 'a' and 'b' to ComplexComparer if inside parenthesis there is nothing ?