This isn't what you think it is:
Foo f3();
You may think this is an explicit call of the default constructor, but it's not. It's actually a declaration of a function named f3
which takes no parameters and returns a Foo
by value.
That this is parsed as a function declaration rather than a constructor call is known as the Most Vexing Parse.