Remix.run Logo
drysine 9 hours ago

I mean the language doesn't dictate what post-condition your class has for move-ctor or move-assignment.

It could be

- "don't touch this object after move" (and it's UB if you do) or

- "after move the object is in valid but unspecified state" (and you can safely call only a method without precondition) or

- "after move the object is in certain state"

- or even crazy "make sure the object doesn't get destroyed after move" (it's UB if you call delete after move or the object was created on the stack and moved from).

But of course it's a good practice to mimic the standard library's contract, first of all for the sake of uniformity.