Calling a destructor explicitly is a legal thing to do - in fact, that's what you do when you use placement new
. Initializing an object "in place", when the memory is already allocated, is also a legal thing do do, but you should do it differently: rather than using the assignment operator, you could use this syntax:
object = new (object) A(); // Placement syntax
The way you did it (with an assignment operator) is incorrect, because you are calling a function (i.e. the assignment operator) on an object the destructor of which has completed.