Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

TypeFunctionalityMoved-from State
std::unique_ptrMove construction, Move assignment
"Converting" move construction, "Converting" move assignment
(Likewise for std::unique_ptr for array objects with a runtime length)
The moved-from object is guaranteed to refer to a null pointer value, per [unique.ptr], paragraph 4 [ISO/IEC 14882-2014].
std::shared_ptr

Move construction, Move assignment
"Converting" move construction, "Converting" move assignment 

The moved-from object shall be "empty", per [util.smartptr.shared.const], paragraph 22 and [util.smartptr.shared.assign] paragraph 4.
std::shared_ptrMove construction and move assignment from a std::unique_ptrThe moved-from object is guaranteed to refer to a null pointer value, per [util.smartptr.shared.const], paragraph 29 and [util.smartptr.shared.assign] paragraph 6.
std::weak_ptrMove construction, Move Assignment
"Converting" move construction, "Converting" move assignment 
The moved-from object shall be "empty", per [util.smartptr.weak.const], paragraph 8, and [util.smartptr.weak.assign], paragraph 4.
std::basic_iosmove()The moved-from object is still left in an unspecified state, except that rdbuf() shall return the same value as it returned before the move, and tie() shall return 0, per [basic.ios.members], paragraph 20.
std::basic_filebufMove constructor, Move assignmentThe moved-from object is guaranteed to reference no file; other internal state is also affected, per [filebuf.cons], paragraphs 3 and 4, and [filebuf.assign], paragraph 1.
std::threadMove constructor, Move assignmentCalling The result from calling get_id() on the moved-from object is guaranteed to remain unchanged, but otherwise the object is in an unspecified state, per [thread.thread.constr], paragraph 11 and [thread.thread.assign], paragraph 2.
std::unique_lockMove constructor, Move assignmentThe moved-from object is guaranteed to be in its default state, per [thread.lock.unique.cons], paragraphs 21 and 23.
std::shared_lockMove constructor, Move assignmentThe moved-from object is guaranteed to be in its default state, per [thread.lock.shared.cons], paragraphs 21 and 23.
std::promiseMove constructor, Move assignmentThe moved-from object is guaranteed not to have any shared state, per [futures.promise], paragraphs 6 and 8.
std::futureMove constructor, Move assignmentCalling valid() on the moved-from object is guaranteed to return false, per [futures.unique_future] paragraphs 8 and 11.
std::shared_futureMove constructor, Move assignment
"Converting" move constructor, "Converting" move assignment 
Calling valid() on the moved-from object is guaranteed to return false, per [futures.shared_future] paragraphs 8 and 11.
std::packaged_taskMove constructor, Move assignmentThe moved-from object is guaranteed not to have any shared state, per [future.task.members], paragraphs 7 and 8.

...