D
David Lindauer
If I do this:
struct xyz
{
xyz();
int a,b;
} var1;
it compiles.
But if I do this
struct xyz
{
xyz();
int a,b;
} var2();
it doesn't compile. The comeau compiler says var2() is a function
rather than a variable initialization...
but then I can do this:
struct xyz
{
xyz();
int a,b;
} ;
struct xyz var3();
and that compiles.
What is the rational for the difference in behavior?
Thanks,
David
struct xyz
{
xyz();
int a,b;
} var1;
it compiles.
But if I do this
struct xyz
{
xyz();
int a,b;
} var2();
it doesn't compile. The comeau compiler says var2() is a function
rather than a variable initialization...
but then I can do this:
struct xyz
{
xyz();
int a,b;
} ;
struct xyz var3();
and that compiles.
What is the rational for the difference in behavior?
Thanks,
David