Il 28/04/21 10:40, Edward Catmur ha scritto:
> Consider a T that is (CopyInsertable,CopyAssignable, and) MoveInsertable
> but not MoveAssignable. An implementation may choose to shuffle the
> elements along by destruct-and-move rather than copy assign.
> Invalidating everything after the insertion point gives greater
> implementation freedom.
Sorry, could you please elaborate on this a bit more? A type can't be
CopyAssignable without also being MoveAssignable:
http://eel.is/c++draft/utility.arg.requirements#tab:cpp17.copyassignable
Ah sorry, my mistake.
Still, there's probably some combination of noexcept specifications that makes the shuffle by destruct-and-move preferable.