Update of /cvsroot/boost/boost/boost/interprocess/containers
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20029/containers
Modified Files:
deque.hpp flat_map.hpp flat_set.hpp
Log Message:
New Interprocess version
Index: deque.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/containers/deque.hpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- deque.hpp 23 Jun 2007 12:52:18 -0000 1.10
+++ deque.hpp 22 Jul 2007 14:02:21 -0000 1.11
@@ -104,10 +104,17 @@
typedef typename ptr_alloc::const_reference ptr_alloc_cref;
typedef typename Alloc::template
rebind<T>::other allocator_type;
-
+ typedef allocator_type stored_allocator_type;
+
allocator_type get_allocator() const
{ return *this; }
+ const stored_allocator_type &get_stored_allocator() const
+ { return *this; }
+
+ stored_allocator_type &get_stored_allocator()
+ { return *this; }
+
protected:
enum { trivial_dctr_after_move =
boost::has_trivial_destructor<val_alloc_val>::value };
@@ -1560,6 +1567,7 @@
{ x.swap(y); }
/// @cond
+
//!has_trivial_destructor_after_move<> == true_type
//!specialization for optimizations
template <class T, class A>
Index: flat_map.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/containers/flat_map.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- flat_map.hpp 23 Jun 2007 12:52:18 -0000 1.6
+++ flat_map.hpp 22 Jul 2007 14:02:21 -0000 1.7
@@ -134,6 +134,7 @@
typedef typename tree_t::size_type size_type;
typedef typename tree_t::difference_type difference_type;
typedef typename tree_t::allocator_type allocator_type;
+ typedef typename tree_t::stored_allocator_type stored_allocator_type;
//! <b>Effects</b>: Constructs an empty flat_map using the specified
//! comparison object and allocator.
@@ -215,6 +216,12 @@
allocator_type get_allocator() const
{ return force<allocator_type>(m_flat_tree.get_allocator()); }
+ const stored_allocator_type &get_stored_allocator() const
+ { return
force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
+
+ stored_allocator_type &get_stored_allocator()
+ { return
force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
+
//! <b>Effects</b>: Returns an iterator to the first element contained in
the container.
//!
//! <b>Throws</b>: Nothing.
@@ -503,6 +510,15 @@
void clear()
{ m_flat_tree.clear(); }
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor
throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit()
+ { m_flat_tree.shrink_to_fit(); }
+
//! <b>Returns</b>: An iterator pointing to an element with the key
//! equivalent to x, or end() if such an element is not found.
//!
@@ -647,6 +663,7 @@
#endif
/// @cond
+
//!This class is movable
template <class K, class T, class C, class A>
struct is_movable<flat_map<K, T, C, A> >
@@ -760,6 +777,7 @@
typedef typename tree_t::size_type size_type;
typedef typename tree_t::difference_type difference_type;
typedef typename tree_t::allocator_type allocator_type;
+ typedef typename tree_t::stored_allocator_type stored_allocator_type;
//! <b>Effects</b>: Constructs an empty flat_multimap using the specified
comparison
//! object and allocator.
@@ -841,6 +859,12 @@
allocator_type get_allocator() const
{ return force<allocator_type>(m_flat_tree.get_allocator()); }
+ const stored_allocator_type &get_stored_allocator() const
+ { return
force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
+
+ stored_allocator_type &get_stored_allocator()
+ { return
force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
+
//! <b>Effects</b>: Returns an iterator to the first element contained in
the container.
//!
//! <b>Throws</b>: Nothing.
@@ -1067,6 +1091,15 @@
void clear()
{ m_flat_tree.clear(); }
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor
throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit()
+ { m_flat_tree.shrink_to_fit(); }
+
//! <b>Returns</b>: An iterator pointing to an element with the key
//! equivalent to x, or end() if such an element is not found.
//!
@@ -1214,6 +1247,7 @@
#endif
/// @cond
+
//!This class is movable
template <class K, class T, class C, class A>
struct is_movable<flat_multimap<K, T, C, A> >
Index: flat_set.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/interprocess/containers/flat_set.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- flat_set.hpp 23 Jun 2007 12:52:18 -0000 1.6
+++ flat_set.hpp 22 Jul 2007 14:02:21 -0000 1.7
@@ -81,6 +81,7 @@
typedef typename tree_t::size_type size_type;
typedef typename tree_t::difference_type difference_type;
typedef typename tree_t::allocator_type allocator_type;
+ typedef typename tree_t::stored_allocator_type stored_allocator_type;
//! <b>Effects</b>: Constructs an empty flat_map using the specified
//! comparison object and allocator.
@@ -162,6 +163,12 @@
allocator_type get_allocator() const
{ return m_flat_tree.get_allocator(); }
+ const stored_allocator_type &get_stored_allocator() const
+ { return m_flat_tree.get_stored_allocator(); }
+
+ stored_allocator_type &get_stored_allocator()
+ { return m_flat_tree.get_stored_allocator(); }
+
//! <b>Effects</b>: Returns an iterator to the first element contained in
the container.
//!
//! <b>Throws</b>: Nothing.
@@ -395,6 +402,15 @@
void clear()
{ m_flat_tree.clear(); }
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor
throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit()
+ { m_flat_tree.shrink_to_fit(); }
+
//! <b>Returns</b>: An iterator pointing to an element with the key
//! equivalent to x, or end() if such an element is not found.
//!
@@ -597,6 +613,7 @@
typedef typename tree_t::size_type size_type;
typedef typename tree_t::difference_type difference_type;
typedef typename tree_t::allocator_type allocator_type;
+ typedef typename tree_t::stored_allocator_type stored_allocator_type;
// allocation/deallocation
explicit flat_multiset(const Pred& comp = Pred(),
@@ -651,7 +668,13 @@
//!
//! <b>Complexity</b>: Constant.
allocator_type get_allocator() const
- { return m_flat_tree.get_allocator(); }
+ { return m_flat_tree.get_allocator(); }
+
+ const stored_allocator_type &get_stored_allocator() const
+ { return m_flat_tree.get_stored_allocator(); }
+
+ stored_allocator_type &get_stored_allocator()
+ { return m_flat_tree.get_stored_allocator(); }
//! <b>Effects</b>: Returns an iterator to the first element contained in
the container.
//!
@@ -877,6 +900,15 @@
void clear()
{ m_flat_tree.clear(); }
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor
throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit()
+ { m_flat_tree.shrink_to_fit(); }
+
//! <b>Returns</b>: An iterator pointing to an element with the key
//! equivalent to x, or end() if such an element is not found.
//!
-------------------------------------------------------------------------
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