I want to reset an object. Can I do it in the following way?
anObject->~AnObject(); anObject = new(anObject) AnObject(); // edit: this is not allowed: anO
Why not reset using the operator=()? This is not debatable and by far more readable.
A a; //do something that changes the state of a a = A(); // reset the thing