This code fails at runtime in the copy constructor. But the compiler (MSVS2008) issues no warnings.
Could you explain (preferably cite the standard) whether this
A a = a; definitely should not be written. But a = a could be written. Your assignment operator must check for &rv == this and do nothing in case of a self-copy.
A a = a;
a = a
&rv == this
Oh, yes, you do need to write an assignment operator for class A.