inline int factorial(int n)
{
if(!n) return 1;
else return n*factorial(n-1);
}
As I was reading this, found that the above code would lead to "infinite compilation" if not handled by compiler correctly.
How does the compiler decide whether to inline a function or not ?