Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class template node_handle_map

boost::unordered::node_handle_map — An object that owns a single element extracted from an unordered_map or an unordered_multimap, that can then be inserted into a compatible container type. The name and template parameters of this type are implementation defined, and should be obtained using the node_type member typedef from the appropriate container.

Synopsis

// In header: <boost/unordered_map.hpp>

template<typename ImplementationDefined> 
class node_handle_map {
public:
  // types
  typedef typename Container::key_type        key_type;      
  typedef typename Container::mapped_type     mapped_type;   
  typedef typename Container::allocator_type> allocator_type;

  // construct/copy/destruct
  constexpr node_handle_map() noexcept;
  node_handle_map(node_handle_map &&) noexcept;
  ~node_handle_map();
  node_handle_map& operator=(node_handle_map&&);
  key_type& key() const;
  mapped_type& mapped() const;
  allocator_type get_allocator() const;
  explicit  operator bool() const noexcept;
  bool empty() const noexcept;
  void swap(node_handle_map&) noexcept(ator_traits::propagate_on_container_swap::value);
};

// swap
template<typename ImplementationDefined> 
  void swap(node_handle_map<ImplementationDefined>&, 
            node_handle_map<ImplementationDefined>&);

Description

node_handle_map public construct/copy/destruct

  1. constexpr node_handle_map() noexcept;
  2. node_handle_map(node_handle_map &&) noexcept;
  3. ~node_handle_map();
node_handle_map& operator=(node_handle_map&&);
key_type& key() const;
mapped_type& mapped() const;
allocator_type get_allocator() const;
explicit  operator bool() const noexcept;
bool empty() const noexcept;
void swap(node_handle_map&) noexcept(ator_traits::propagate_on_container_swap::value);

Notes:

In C++17 is also noexcept if ator_traits::is_always_equal::value is true. But we don't support that trait yet.

node_handle_map swap

  1. template<typename ImplementationDefined> 
      void swap(node_handle_map<ImplementationDefined>& x, 
                node_handle_map<ImplementationDefined>& y);

    Effects:

    x.swap(y)


PrevUpHomeNext