Finally, can somebody please enlighten me, why it is not possible to create an assignment operator for classes with const members? To me it seems sane and the following code compiles perfectly over here:

struct Foo
{ Foo() : i(5) {} const int i;};

void main (){ Foo a; Foo b = a;}

I can't say if that's sane or not, but the only reason that it compiles is that the assignment operator is never called. The compiler your code with "Foo b(a);". The following does not compile with MSVC:

void main ()

{

Foo a;

Foo b;

if(true)

b = a;

}

You are totally right. As I said - no idea where my mind is right now.