[container.node.cons] (original) (raw)
23 Containers library [containers]
23.2 Requirements [container.requirements]
23.2.5 Node handles [container.node]
23.2.5.2 Constructors, copy, and assignment [container.node.cons]
constexpr _node-handle_(_node-handle_&& nh) noexcept;
Effects: Constructs a node-handle object initializingptr_ with nh.ptr_.
Move constructs alloc_ withnh.alloc_.
Assigns nullptr to nh.ptr_ and assignsnullopt to nh.alloc_.
constexpr _node-handle_& operator=(_node-handle_&& nh);
Preconditions: Either !alloc_, orator_traits::propagate_on_container_move_assignment::valueis true, or alloc_ == nh.alloc_.
Effects:
- If ptr_ != nullptr, destroys the value_typesubobject in the container_node_type object pointed to by ptr_by calling ator_traits::destroy, then deallocates ptr_ by calling ator_traits::template rebind_traits<container_node_type>::deallocate.
- If !alloc_ or ator_traits::propagate_on_container_move_assignment::valueis true, move assigns nh.alloc_ to alloc_.
- Assignsnullptr to nh.ptr_ and assigns nullopt tonh.alloc_.