In the forthcoming C++0x standard, what happens when an exception is thrown within/during the move constructor?
Will the original object remain? or are both the orig
I believe that the standards committee originally attempted to make it so move constructors would not be allowed to throw exceptions, but (at least as of today) found that trying to enforce that had too many pitfalls.
Proposal N3050, "Allowing Move Constructors to Throw (Rev 1)", has been incorporated into the draft standard. Essentially the proposal adds the capability for move constructors to throw, but to disallow 'throwing' moves to be used for certain operations where strong exception safety guarantees were needed (the library will fall back to copying the object if a non-throwing move isn't available).
If you mark a move constructor as non-throwing (noexcept) and an exception is thrown, std::terminate() will be called.
It might also be worth reading a blog article by David Abrahams that discusses the issues that N3050 was intended to address: