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 initializing ptr_ with nh.ptr_.
Move constructs alloc_ with nh.alloc_.
Assigns nullptr to nh.ptr_ and assigns nullopt to nh.alloc_.
constexpr node-handle& operator=(node-handle&& nh);
Preconditions: Either !alloc_ is true, or ator-traits​::​propagate_on_container_move_assignment​::​value is true, or alloc_ == nh.alloc_ is true.
Effects:
  • If ptr_ != nullptr is true, 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.
  • Assigns nh.ptr_ to ptr_.
  • If !alloc_ is true or ator-traits​::​propagate_on_container_move_assignment​::​value is true, move assigns nh.alloc_ to alloc_.
  • Assigns nullptr to nh.ptr_ and assigns nullopt to nh.alloc_.
Throws: Nothing.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant