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

Click here to view the latest version of this page.
PrevUpHomeNext

Class template flat_map_index

boost::interprocess::flat_map_index

Synopsis

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

template<typename MapConfig> 
class flat_map_index :
  public boost::interprocess_container::flat_map<MapConfig>
{
public:
  // construct/copy/destruct
  flat_map_index(segment_manager_base *);

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

Description

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

flat_map_index public construct/copy/destruct

  1. flat_map_index(segment_manager_base * segment_mngr);

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

flat_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 frees all unnecessary memory.

PrevUpHomeNext