http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61143

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to François Dumont from comment #4)
> I simply considered that the moved container instance wouldn't be reused
> this way, just potentially for some immutable operations. I should have
> checked the Standard regarding the meaning of "valid by unspecified state".

Objects can definitely be re-used after being moved from. This has to work.

> There are indeed numerous places to consider to make this code and any other
> mutable code valid. I would also prefer to avoid those checks but I remember
> that I needed to leave the container in this state for exception guaranty
> reasons in some move operations. I will recall rational of this as soon as I
> can take a look to the code.

We wanted the move constructor to be noexcept. That's important, but so is
being able to reuse the object again.

Reply via email to