![]() |
Home | Libraries | People | FAQ | More |
Assignment.
value& operator=(object&& obj);
The contents of the value are replaced with the contents of obj using move semantics:
*obj.storage() == *this->storage(), ownership of the underlying memory
is transferred in constant time, with no possibility of exceptions.
After assignment, the moved-from object becomes empty with its current
storage pointer.
*obj.storage() != *this->storage(), an element-wise copy is performed,
which may throw. In this case, the moved-from object is not changed.
Constant, or linear in the size of *this plus obj.size().
Strong guarantee. Calls to memory_resource::allocate
may throw.
|
Name |
Description |
|---|---|
|
|
The object to move-assign from. |