Files
2025-10-25 03:02:53 +03:00

2.1 KiB
Raw Permalink Blame History

[container.node.cons]

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;

1

#

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);

2

#

Preconditions: Either !alloc_, orator_traits::propagate_on_container_move_assignment::value is true, or alloc_ == nh.alloc_.

3

#

Effects:

  • (3.1)

    If ptr_ != nullptr, destroys the value_type subobject 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.

  • (3.2)

    Assigns nh.ptr_ to ptr_.

  • (3.3)

    If !alloc_ or ator_traits::propagate_on_container_move_assignment::value is true, move assigns nh.alloc_ to alloc_.

  • (3.4)

    Assignsnullptr to nh.ptr_ and assigns nullopt tonh.alloc_.

4

#

Returns: *this.

5

#

Throws: Nothing.