Update of /cvsroot/boost/boost/boost/interprocess/indexes
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20029/indexes

Modified Files:
        flat_map_index.hpp 
Log Message:
New Interprocess version

Index: flat_map_index.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/indexes/flat_map_index.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- flat_map_index.hpp  12 Jun 2007 17:07:09 -0000      1.5
+++ flat_map_index.hpp  22 Jul 2007 14:02:22 -0000      1.6
@@ -33,11 +33,11 @@
    typedef typename MapConfig::key_type            key_type;
    typedef typename MapConfig::mapped_type         mapped_type;
    typedef typename MapConfig::
-      basic_segment_manager                   basic_segment_manager;
+      segment_manager_base                   segment_manager_base;
    typedef std::less<key_type>                     key_less;
    typedef std::pair<key_type, mapped_type>        value_type;
    typedef allocator<value_type
-                    ,basic_segment_manager>   allocator_type;
+                    ,segment_manager_base>   allocator_type;
    typedef flat_map<key_type,  mapped_type,
                     key_less, allocator_type>      index_t;
 };
@@ -53,12 +53,12 @@
    typedef flat_map_index_aux<MapConfig>  index_aux;
    typedef typename index_aux::index_t    base_type;
    typedef typename index_aux::
-      basic_segment_manager          basic_segment_manager;
+      segment_manager_base          segment_manager_base;
    /// @endcond
 
    public:
    //!Constructor. Takes a pointer to the segment manager. Can throw
-   flat_map_index(basic_segment_manager *segment_mngr)
+   flat_map_index(segment_manager_base *segment_mngr)
       : base_type(typename index_aux::key_less(),
                   typename index_aux::allocator_type(segment_mngr))
    {}
@@ -66,6 +66,10 @@
    //!This reserves memory to optimize the insertion of n elements in the index
    void reserve(std::size_t n)
    {  base_type::reserve(n);  }
+
+   //!This frees all unnecessary memory
+   void shrink_to_fit()
+   {  base_type::shrink_to_fit();   }
 };
 
 }}   //namespace boost { namespace interprocess


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to