there was a time when I was sure that a typedef is simply meant for programmer's convenience, and that any program could theoretically be written without using it.
For example, I came to learn how to declare variables and/or functions with arbitrarily complicated types without a typedef, e.g. a function taking a pointer to function taking a reference to an array of 3 pointers to functions .... blah blah blah. I can do this without a typedef. But! I came across something which I cannot do without a typedef. Let's consider a functor object that doesn't have an operator()
Code:
struct Square
{
static int f(int n) {return n*n;}
typedef int(*pf)(int);
operator pf () (return &f;)
};
#include <iostream>
int main()
{
Square s;
std::cout << s(4); //Outputs 16
}
Any help will be appreciated

