>Hi! This is the smallest example I was able to create to demonstratet the
>problem. It seems that a certain kind of object instantiation gets parsed as
>a function definition (or whatever) by the compiler. I don't know if it
>comes from some (maybe not-so-)dark corner of the C++ standard, or VC7.1 has
>got a bug.
The "dark corner" theory is correct.
>Thx,
>Agoston
[quoted text clipped - 28 lines]
>
>//--------------------------------------------
VC is correct. This is what Scott Meyers described as a "vexing parse" in
"Effective STL". To simplify:
int f(int());
This declares a function f that has one parameter of the type:
int (*)();
That is, the parameter is unnamed and has type "pointer to a function that
has no parameters and returns int".
You've already discovered one way to get the effect you're after, namely
parenthesizing the ctor argument.

Signature
Doug Harrison
Microsoft MVP - Visual C++