...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::interprocess::flat_map_index
// In header: <boost/interprocess/indexes/flat_map_index.hpp> template<typename MapConfig> class flat_map_index : private flat_map_index_aux::index_t { public: // types typedef base_type::iterator iterator; typedef base_type::const_iterator const_iterator; typedef base_type::value_type value_type; typedef MapConfig::compare_key_type compare_key_type; typedef iterator insert_commit_data; typedef iterator index_data_t; // public member functions flat_map_index(segment_manager_base *); std::pair< iterator, bool > insert_check(const compare_key_type &, insert_commit_data &); iterator insert_commit(const compare_key_type &, void *, index_data_t &, insert_commit_data &); iterator find(const compare_key_type &); };
Index type based in flat_map. Just derives from flat_map and defines the interface needed by managed memory segments.
flat_map_index
public member functionsflat_map_index(segment_manager_base * segment_mngr);Constructor. Takes a pointer to the segment manager. Can throw.
std::pair< iterator, bool > insert_check(const compare_key_type & key, insert_commit_data &);
iterator insert_commit(const compare_key_type & k, void * context, index_data_t &, insert_commit_data &);
iterator find(const compare_key_type & k);