W
werasm
Hi all,
I've per chance noticed that this code compiles without warnings:
struct x
{
x(): y_( y_ ){}
int y_;
};
I've used gcc 4.1.0, comeau online and all compilers available at
dinkumware online.
Are there cases where similar code (a member initialising itself with
itself) would make sense? I was surprised when I discovered this.
Regards,
Werner
I've per chance noticed that this code compiles without warnings:
struct x
{
x(): y_( y_ ){}
int y_;
};
I've used gcc 4.1.0, comeau online and all compilers available at
dinkumware online.
Are there cases where similar code (a member initialising itself with
itself) would make sense? I was surprised when I discovered this.
Regards,
Werner