I was doing an assignment and encountered a problem really similar to this: a-confusion-about-c-function-overloading
I understand why it is ambigious, but I wonder if there is a way to make it work if overloaded function returns different type, i.e.:
int foo (int a=0);
double foo (double a=1);
and to make this work:
double x=foo();