Boost C++ Libraries 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 to view this page for the latest version.

Class template unordered_map_index



// In header: <boost/interprocess/indexes/unordered_map_index.hpp>

template<typename MapConfig> 
class unordered_map_index {
  // construct/copy/destruct
  unordered_map_index(segment_manager_base *);

  // public member functions
  void reserve(std::size_t) ;
  void shrink_to_fit() ;


Index type based in unordered_map. Just derives from unordered_map and defines the interface needed by managed memory segments

unordered_map_index public construct/copy/destruct

  1. unordered_map_index(segment_manager_base * segment_mngr);

    Constructor. Takes a pointer to the segment manager. Can throw

unordered_map_index public member functions

  1. void reserve(std::size_t n) ;

    This reserves memory to optimize the insertion of n elements in the index

  2. void shrink_to_fit() ;

    This tries to free previously allocate unused memory.