There are 2 popular ways to implement move in containers like vector that internally hold a pointer to the data:
you can empty this, then copy the pointer (and size and capacity) from other to this and then set other members to nullptr/zero
you can swap the data members (the pointers, size and capacity).
The standard wants to leave leeway to implementations to do either. These guarantees are the strongest guarantees it can make while allowing either methods of implementation:
move constructor:
1st method: leaves other in empty state
2st method (swap): leaves other in empty state
move assignment:
1st method: leaves other in empty state
2st method (swap): leaves other as a copy of initial this
There are 2 popular ways to implement move in containers like vector that internally hold a pointer to the data:
The standard wants to leave leeway to implementations to do either. These guarantees are the strongest guarantees it can make while allowing either methods of implementation:
move constructor:
move assignment: