I was looking into most vexing parse, and I stumbled upon something like this:
Foo bar(Baz()); // bar is a function that takes a pointer to a function that returns a Baz and returns a Foo
This is quite different from the typical syntax of
return-type(*name)(parameters). Are the parenthesis present the parenthesis for the parameter list, or are they for the name?
Fully explicit form:
Foo bar(Baz f());
bar is a function that takes a single parameter
f, which is a function (taking no arguments) returning
Without naming the parameter:
Foo bar(Baz ());
bar ends up taking a pointer to a function is that functions cannot be passed by value, so declaring a parameter as a function automatically decays it into a pointer. The above declaration is equivalent to:
Foo bar(Baz (*)()); // or: Foo bar(Baz (*f)()); // with a named parameter
This is similar to
void foo(int ) where
int  also means
int * in a parameter list.