Sample code:
typedef int I;
struct X{ X(int); };
int main()
{
int(int());
X(X());
I(I());
}
The line int(int());
is an expression using functional cast notation - it's a temporary int
initialized with a value-initialized int
.
The line X(X());
is a declaration of a function named X
taking no arguments returning struct X
.
My question is: what is the meaning of I(I())
here? And what rules in the standard determine the difference in meaning between these three cases?