I am currently looking at implementing a custom container which needs to be compatible with STL algorithms and therefore must meet the C++ container requirements as described here.
In that documentation the Methods and operators
table states, that the expression a = b
has the post condition of a == b
. I am heavily confused by this.
As the table entry for this expression states:
destroys or move-assigns all elements of
a
from elements ofb
To my understanding, moving an object comes with the expectation that the moved object (source object?) will be left in a valid but undefined state. Therefore, the condition a == b
cannot be met in my opinion.
What am I missing here?