$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r64335 - in trunk/boost/interprocess: allocators/detail containers/container containers/container/detail
From: igaztanaga_at_[hidden]
Date: 2010-07-25 12:45:58
Author: igaztanaga
Date: 2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
New Revision: 64335
URL: http://svn.boost.org/trac/boost/changeset/64335
Log:
Changes for Boost 1.45
Added:
   trunk/boost/interprocess/containers/container/detail/stored_ref.hpp   (contents, props changed)
Text files modified: 
   trunk/boost/interprocess/allocators/detail/allocator_common.hpp                  |    14 ++++--                                  
   trunk/boost/interprocess/containers/container/deque.hpp                          |    43 ++----------------                      
   trunk/boost/interprocess/containers/container/detail/adaptive_node_pool_impl.hpp |     3 +                                       
   trunk/boost/interprocess/containers/container/detail/advanced_insert_int.hpp     |    21 ++++----                                
   trunk/boost/interprocess/containers/container/detail/algorithms.hpp              |     2                                         
   trunk/boost/interprocess/containers/container/detail/config_begin.hpp            |     1                                         
   trunk/boost/interprocess/containers/container/detail/flat_tree.hpp               |    90 +++++++++++++++++++++++---------------- 
   trunk/boost/interprocess/containers/container/detail/iterators.hpp               |    57 ++++++++++++++++++++++++                
   trunk/boost/interprocess/containers/container/detail/pair.hpp                    |    15 ++++++                                  
   trunk/boost/interprocess/containers/container/detail/preprocessor.hpp            |    50 ++++++++++++++++++++--                  
   trunk/boost/interprocess/containers/container/detail/transform_iterator.hpp      |     2                                         
   trunk/boost/interprocess/containers/container/detail/tree.hpp                    |    35 --------------                          
   trunk/boost/interprocess/containers/container/detail/utilities.hpp               |    35 +++++++++++++++                         
   trunk/boost/interprocess/containers/container/detail/workaround.hpp              |     2                                         
   trunk/boost/interprocess/containers/container/flat_map.hpp                       |    86 +++++++++++++++++++++++---------------  
   trunk/boost/interprocess/containers/container/flat_set.hpp                       |     8 +-                                      
   trunk/boost/interprocess/containers/container/list.hpp                           |    39 +----------------                       
   trunk/boost/interprocess/containers/container/set.hpp                            |    40 +----------------                       
   trunk/boost/interprocess/containers/container/slist.hpp                          |    38 +---------------                        
   trunk/boost/interprocess/containers/container/stable_vector.hpp                  |     4                                         
   trunk/boost/interprocess/containers/container/string.hpp                         |    16 -------                                 
   trunk/boost/interprocess/containers/container/vector.hpp                         |    41 +++--------------                       
   22 files changed, 310 insertions(+), 332 deletions(-)
Modified: trunk/boost/interprocess/allocators/detail/allocator_common.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/detail/allocator_common.hpp	(original)
+++ trunk/boost/interprocess/allocators/detail/allocator_common.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -290,6 +290,14 @@
       //Deallocate all new linked list at once
       mp_node_pool->deallocate_nodes(boost::interprocess::move(chain));
    }
+
+   public:
+   void swap(cache_impl &other)
+   {
+      detail::do_swap(mp_node_pool, other.mp_node_pool); 
+      m_cached_nodes.swap(other.m_cached_nodes); 
+      detail::do_swap(m_max_cached_nodes, other.m_max_cached_nodes); 
+   } 
 };
 
 template<class Derived, class T, class SegmentManager>
@@ -656,11 +664,7 @@
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different shared memory segments, the result is undefined.
    friend void swap(cached_allocator_impl &alloc1, cached_allocator_impl &alloc2)
-   {
-      detail::do_swap(alloc1.mp_node_pool,       alloc2.mp_node_pool);
-      alloc1.m_cached_nodes.swap(alloc2.m_cached_nodes);
-      detail::do_swap(alloc1.m_max_cached_nodes, alloc2.m_max_cached_nodes);
-   }
+   {  alloc1.m_cache.swap(alloc2.m_cache);   }
 
    void deallocate_cache()
    {  m_cache.deallocate_all_cached_nodes(); }
Modified: trunk/boost/interprocess/containers/container/deque.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/deque.hpp	(original)
+++ trunk/boost/interprocess/containers/container/deque.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -1,29 +1,3 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
 //////////////////////////////////////////////////////////////////////////////
 //
 // (C) Copyright Ion Gaztanaga 2005-2006. Distributed under the Boost
@@ -33,13 +7,6 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's stl_deque.h and stl_uninitialized.h files. 
-// Modified by Ion Gaztanaga 2005.
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
 
 #ifndef BOOST_CONTAINERS_DEQUE_HPP
 #define BOOST_CONTAINERS_DEQUE_HPP
@@ -697,7 +664,7 @@
       this->priv_assign_dispatch(first, last, Result());
    }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_back(T &x) { push_back(const_cast<const T &>(x)); }
 
    template<class U>
@@ -719,7 +686,7 @@
       }
    }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_front(T &x) { push_front(const_cast<const T &>(x)); }
 
    template<class U>
@@ -761,7 +728,7 @@
          this->priv_pop_front_aux();
    }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x)
    { return this->insert(position, const_cast<const T &>(x)); }
 
@@ -1172,7 +1139,7 @@
 
    template <class Integer>
    void priv_assign_dispatch(Integer n, Integer val, containers_detail::true_)
-      { this->priv_fill_assign((size_type) n, (T) val); }
+      { this->priv_fill_assign((size_type) n, (value_type)val); }
 
    template <class InpIt>
    void priv_assign_dispatch(InpIt first, InpIt last, containers_detail::false_) 
@@ -1209,7 +1176,7 @@
 
    template <class Integer>
    void priv_insert_dispatch(const_iterator pos, Integer n, Integer x, containers_detail::true_) 
-   {  this->priv_fill_insert(pos, (size_type) n, (value_type) x); }
+   {  this->priv_fill_insert(pos, (size_type) n, (value_type)x); }
 
    template <class InpIt>
    void priv_insert_dispatch(const_iterator pos,InpIt first, InpIt last, containers_detail::false_) 
Modified: trunk/boost/interprocess/containers/container/detail/adaptive_node_pool_impl.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/adaptive_node_pool_impl.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/adaptive_node_pool_impl.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -69,6 +69,9 @@
          const bool is_equal = l.free_nodes.size() == r.free_nodes.size();
          return is_less || (is_equal && (&l < &r));
       }
+
+      friend bool operator ==(const block_info_t &l, const block_info_t &r)
+      {  return &l == &r;  }
    };
    typedef typename bi::make_multiset
       <block_info_t, bi::base_hook<multiset_hook_t> >::type  block_multiset_t;
Modified: trunk/boost/interprocess/containers/container/detail/advanced_insert_int.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/advanced_insert_int.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/advanced_insert_int.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -19,7 +19,6 @@
 #include INCLUDE_BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
 #include INCLUDE_BOOST_CONTAINER_MOVE_HPP
 #include <iterator>  //std::iterator_traits
-#include <algorithm> //std::copy, std::uninitialized_copy
 #include <new>       //placement new
 #include <cassert>
 
@@ -51,7 +50,7 @@
    {}
 
    virtual void copy_all_to(Iterator p)
-   {  std::copy(first_, last_, p);  }
+   {  ::BOOST_CONTAINER_MOVE_NAMESPACE::copy_or_move(first_, last_, p);  }
 
    virtual void uninitialized_copy_all_to(Iterator p)
    {  ::BOOST_CONTAINER_MOVE_NAMESPACE::uninitialized_copy_or_move(first_, last_, p);  }
@@ -75,11 +74,11 @@
       FwdIt mid = first_;
       std::advance(mid, division_count);
       if(first_n){
-         std::copy(first_, mid, pos);
+         ::BOOST_CONTAINER_MOVE_NAMESPACE::copy_or_move(first_, mid, pos);
          first_ = mid;
       }
       else{
-         std::copy(mid, last_, pos);
+         ::BOOST_CONTAINER_MOVE_NAMESPACE::copy_or_move(mid, last_, pos);
          last_ = mid;
       }
    }
@@ -164,6 +163,7 @@
 #ifdef BOOST_CONTAINERS_PERFECT_FORWARDING
 
 #include INCLUDE_BOOST_CONTAINER_DETAIL_VARIADIC_TEMPLATES_TOOLS_HPP
+#include INCLUDE_BOOST_CONTAINER_DETAIL_STORED_REF_HPP
 #include INCLUDE_BOOST_CONTAINER_MOVE_HPP
 #include <typeinfo>
 //#include <iostream> //For debugging purposes
@@ -181,7 +181,8 @@
    typedef typename build_number_seq<sizeof...(Args)>::type             index_tuple_t;
 
    explicit advanced_insert_aux_emplace(Args&&... args)
-      : args_(args...), used_(false)
+      : args_(args...)
+      , used_(false)
    {}
 
    ~advanced_insert_aux_emplace()
@@ -204,7 +205,7 @@
    void priv_copy_all_to(const index_tuple<IdxPack...>&, Iterator p)
    {
       if(!used_){
-         *p = BOOST_CONTAINER_MOVE_NAMESPACE::move(T (BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(get<IdxPack>(args_))...));
+         *p = BOOST_CONTAINER_MOVE_NAMESPACE::move(T (::boost::container::containers_detail::stored_ref<Args>::forward(get<IdxPack>(args_))...));
          used_ = true;
       }
    }
@@ -213,7 +214,7 @@
    void priv_uninitialized_copy_all_to(const index_tuple<IdxPack...>&, Iterator p)
    {
       if(!used_){
-         new(containers_detail::get_pointer(&*p))T(BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(get<IdxPack>(args_))...);
+         new(containers_detail::get_pointer(&*p))T(::boost::container::containers_detail::stored_ref<Args>::forward(get<IdxPack>(args_))...);
          used_ = true;
       }
    }
@@ -224,7 +225,7 @@
       assert(division_count <=1);
       if((first_n && division_count == 1) || (!first_n && division_count == 0)){
          if(!used_){
-            new(containers_detail::get_pointer(&*p))T(BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(get<IdxPack>(args_))...);
+            new(containers_detail::get_pointer(&*p))T(::boost::container::containers_detail::stored_ref<Args>::forward(get<IdxPack>(args_))...);
             used_ = true;
          }
       }
@@ -236,12 +237,12 @@
       assert(division_count <=1);
       if((first_n && division_count == 1) || (!first_n && division_count == 0)){
          if(!used_){
-            *p = BOOST_CONTAINER_MOVE_NAMESPACE::move(T(BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(get<IdxPack>(args_))...));
+            *p = BOOST_CONTAINER_MOVE_NAMESPACE::move(T(::boost::container::containers_detail::stored_ref<Args>::forward(get<IdxPack>(args_))...));
             used_ = true;
          }
       }
    }
-   tuple<Args&&...> args_;
+   tuple<Args&...> args_;
    bool used_;
 };
 
Modified: trunk/boost/interprocess/containers/container/detail/algorithms.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/algorithms.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/algorithms.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -35,7 +35,7 @@
 namespace boost {
 namespace container { 
 
-#if !defined(BOOST_HAS_RVALUE_REFS)
+#if defined(BOOST_NO_RVALUE_REFERENCES)
 template<class T>
 struct has_own_construct_from_it
 {
Modified: trunk/boost/interprocess/containers/container/detail/config_begin.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/config_begin.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/config_begin.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -62,6 +62,7 @@
 #define INCLUDE_BOOST_CONTAINER_DETAIL_UTILITIES_HPP                <boost/interprocess/containers/container/detail/utilities.hpp>
 #define INCLUDE_BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP               <boost/interprocess/containers/container/detail/value_init.hpp>
 #define INCLUDE_BOOST_CONTAINER_DETAIL_VARIADIC_TEMPLATES_TOOLS_HPP <boost/interprocess/containers/container/detail/variadic_templates_tools.hpp>
+#define INCLUDE_BOOST_CONTAINER_DETAIL_STORED_REF_HPP               <boost/interprocess/containers/container/detail/stored_ref.hpp>
 #define INCLUDE_BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP             <boost/interprocess/containers/container/detail/version_type.hpp>
 #define INCLUDE_BOOST_CONTAINER_DETAIL_WORKAROUND_HPP               <boost/interprocess/containers/container/detail/workaround.hpp>
 
Modified: trunk/boost/interprocess/containers/container/detail/flat_tree.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/flat_tree.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/flat_tree.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -56,37 +56,51 @@
 
 namespace containers_detail {
 
+template<class Compare, class Value, class KeyOfValue>
+class flat_tree_value_compare
+   : private Compare
+{
+   typedef Value              first_argument_type;
+   typedef Value              second_argument_type;
+   typedef bool               return_type;
+   public:     
+   flat_tree_value_compare(const Compare &pred) 
+      : Compare(pred)
+   {}
+
+   bool operator()(const Value& lhs, const Value& rhs) const
+   { 
+      KeyOfValue key_extract;
+      return Compare::operator()(key_extract(lhs), key_extract(rhs)); 
+   }
+
+   const Compare &get_comp() const
+      {  return *this;  }
+   
+   Compare &get_comp()
+      {  return *this;  }
+};
+
+template<class Pointer>
+struct get_flat_tree_iterators
+{
+   typedef typename containers_detail::
+      vector_iterator<Pointer>                        iterator;
+   typedef typename containers_detail::
+      vector_const_iterator<Pointer>                  const_iterator;
+   typedef std::reverse_iterator<iterator>            reverse_iterator;
+   typedef std::reverse_iterator<const_iterator>      const_reverse_iterator;
+};
+
 template <class Key, class Value, class KeyOfValue, 
           class Compare, class Alloc>
 class flat_tree
 {
    typedef boost::container::vector<Value, Alloc>  vector_t;
-   typedef Alloc                                      allocator_t;
+   typedef Alloc                                   allocator_t;
 
    public:
-   class value_compare
-      : private Compare
-   {
-      typedef Value              first_argument_type;
-      typedef Value              second_argument_type;
-      typedef bool               return_type;
-    public:     
-      value_compare(const Compare &pred) 
-         : Compare(pred)
-      {}
-
-      bool operator()(const Value& lhs, const Value& rhs) const
-      { 
-         KeyOfValue key_extract;
-         return Compare::operator()(key_extract(lhs), key_extract(rhs)); 
-      }
-
-      const Compare &get_comp() const
-         {  return *this;  }
-      
-      Compare &get_comp()
-         {  return *this;  }
-   };
+   typedef flat_tree_value_compare<Compare, Value, KeyOfValue> value_compare;
 
  private:
    struct Data 
@@ -113,14 +127,14 @@
 
       Data& operator=(BOOST_MOVE_MACRO_COPY_ASSIGN_REF(Data) d)
       {
-         value_compare::operator=(d);
+         this->value_compare::operator=(d);
          m_vect = d.m_vect;
          return *this;
       }
 
       Data& operator=(BOOST_MOVE_MACRO_RV_REF(Data) d)
       {
-         value_compare::operator=(BOOST_CONTAINER_MOVE_NAMESPACE::move(static_cast<value_compare &>(d)));
+         this->value_compare::operator=(BOOST_CONTAINER_MOVE_NAMESPACE::move(static_cast<value_compare &>(d)));
          m_vect = BOOST_CONTAINER_MOVE_NAMESPACE::move(d.m_vect);
          return *this;
       }
@@ -345,7 +359,7 @@
       std::pair<iterator,bool> ret =
          priv_insert_unique_prepare(val, data);
       if(ret.second){
-         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
       }
       return ret.first;
    }
@@ -357,7 +371,7 @@
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);
       if(ret.second){
-         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
       }
       return ret.first;
    }
@@ -367,7 +381,7 @@
    {
       value_type &&val = value_type(BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(args)...);
       iterator i = this->upper_bound(KeyOfValue()(val));
-      i = this->m_data.m_vect.insert(i, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+      i = this->m_data.m_vect.insert(i, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
       return i;
    }
 
@@ -377,7 +391,7 @@
       value_type &&val = value_type(BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(args)...);
       insert_commit_data data;
       priv_insert_equal_prepare(hint, val, data);
-      return priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+      return priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
    }
 
    #else //#ifdef BOOST_CONTAINERS_PERFECT_FORWARDING
@@ -390,7 +404,7 @@
       std::pair<iterator,bool> ret =
          priv_insert_unique_prepare(val, data);
       if(ret.second){
-         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
       }
       return ret.first;
    }
@@ -402,7 +416,7 @@
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);
       if(ret.second){
-         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
       }
       return ret.first;
    }
@@ -412,7 +426,7 @@
       containers_detail::value_init<value_type> vval;
       value_type &val = vval.m_t;
       iterator i = this->upper_bound(KeyOfValue()(val));
-      i = this->m_data.m_vect.insert(i, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+      i = this->m_data.m_vect.insert(i, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
       return i;
    }
 
@@ -422,7 +436,7 @@
       value_type &val = vval.m_t;
       insert_commit_data data;
       priv_insert_equal_prepare(hint, val, data);
-      return priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));
+      return priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));
    }
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                        \
@@ -433,7 +447,7 @@
       insert_commit_data data;                                                            \
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(val, data);               \
       if(ret.second){                                                                     \
-         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));        \
+         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val)); \
       }                                                                                   \
       return ret.first;                                                                   \
    }                                                                                      \
@@ -446,7 +460,7 @@
       insert_commit_data data;                                                            \
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);         \
       if(ret.second){                                                                     \
-         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));        \
+         ret.first = priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));        \
       }                                                                                   \
       return ret.first;                                                                   \
    }                                                                                      \
@@ -456,7 +470,7 @@
    {                                                                                      \
       value_type val(BOOST_PP_ENUM(n, BOOST_CONTAINERS_PP_PARAM_FORWARD, _));           \
       iterator i = this->upper_bound(KeyOfValue()(val));                                  \
-      i = this->m_data.m_vect.insert(i, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));              \
+      i = this->m_data.m_vect.insert(i, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));       \
       return i;                                                                           \
    }                                                                                      \
                                                                                           \
@@ -467,7 +481,7 @@
       value_type val(BOOST_PP_ENUM(n, BOOST_CONTAINERS_PP_PARAM_FORWARD, _));           \
       insert_commit_data data;                                                            \
       priv_insert_equal_prepare(hint, val, data);                                         \
-      return priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move<value_type>(val));                \
+      return priv_insert_commit(data, BOOST_CONTAINER_MOVE_NAMESPACE::move(val));                \
    }                                                                                      \
    //!
    #define BOOST_PP_LOCAL_LIMITS (1, BOOST_CONTAINERS_MAX_CONSTRUCTOR_PARAMETERS)
Modified: trunk/boost/interprocess/containers/container/detail/iterators.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/iterators.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/iterators.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -24,6 +24,7 @@
 
 #ifdef BOOST_CONTAINERS_PERFECT_FORWARDING
 #include INCLUDE_BOOST_CONTAINER_DETAIL_VARIADIC_TEMPLATES_TOOLS_HPP
+#include INCLUDE_BOOST_CONTAINER_DETAIL_STORED_REF_HPP
 #else
 #include INCLUDE_BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP
 #endif
@@ -58,6 +59,16 @@
       return result;
    }
 
+   constant_iterator& operator--() 
+   { decrement();   return *this;   }
+   
+   constant_iterator operator--(int)
+   {
+      constant_iterator result (*this);
+      decrement();
+      return result;
+   }
+
    friend bool operator== (const constant_iterator& i, const constant_iterator& i2)
    { return i.equal(i2); }
 
@@ -102,6 +113,9 @@
    const T& operator*() const
    { return dereference(); }
 
+   const T& operator[] (Difference n) const
+   { return dereference(); }
+
    const T* operator->() const
    { return &(dereference()); }
 
@@ -156,6 +170,16 @@
       return result;
    }
 
+   default_construct_iterator& operator--() 
+   { decrement();   return *this;   }
+   
+   default_construct_iterator operator--(int)
+   {
+      default_construct_iterator result (*this);
+      decrement();
+      return result;
+   }
+
    friend bool operator== (const default_construct_iterator& i, const default_construct_iterator& i2)
    { return i.equal(i2); }
 
@@ -203,6 +227,9 @@
    const T* operator->() const
    { return &(dereference()); }
 
+   const T& operator[] (Difference n) const
+   { return dereference(); }
+
    private:
    Difference  m_num;
 
@@ -255,6 +282,16 @@
       return result;
    }
 
+   this_type& operator--() 
+   { increment();   return *this;   }
+   
+   this_type operator--(int)
+   {
+      this_type result (*this);
+      increment();
+      return result;
+   }
+
    friend bool operator== (const this_type& i, const this_type& i2)
    { return i.equal(i2); }
 
@@ -299,6 +336,9 @@
    T& operator*() const
    { return dereference(); }
 
+   T& operator[] (Difference n) const
+   { return dereference(); }
+
    T *operator->() const
    { return &(dereference()); }
 
@@ -352,6 +392,16 @@
       return result;
    }
 
+   this_type& operator--() 
+   { decrement();   return *this;   }
+   
+   this_type operator--(int)
+   {
+      this_type result (*this);
+      decrement();
+      return result;
+   }
+
    friend bool operator== (const this_type& i, const this_type& i2)
    { return i.equal(i2); }
 
@@ -396,6 +446,9 @@
    const T& operator*() const
    { return dereference(); }
 
+   const T& operator[](std::ptrdiff_t) const
+   { return dereference(); }
+
    const T* operator->() const
    { return &(dereference()); }
 
@@ -447,9 +500,9 @@
 
    template<int ...IdxPack>
    void inplace_impl(T* ptr, const containers_detail::index_tuple<IdxPack...>&)
-   {  ::new(ptr) T(BOOST_CONTAINER_MOVE_NAMESPACE::forward<Args>(containers_detail::get<IdxPack>(args_))...); }
+   {  ::new(ptr) T(containers_detail::stored_ref<Args>::forward(containers_detail::get<IdxPack>(args_))...); }
 
-   containers_detail::tuple<Args&&...> args_;
+   containers_detail::tuple<Args&...> args_;
 };
 
 #else
Modified: trunk/boost/interprocess/containers/container/detail/pair.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/pair.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/pair.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -100,7 +100,7 @@
 
    template<class U>
    pair( BOOST_CONTAINERS_PARAM(U, u)
-       #ifndef BOOST_HAS_RVALUE_REFS
+       #ifdef BOOST_NO_RVALUE_REFERENCES
        , typename containers_detail::disable_if
           < containers_detail::is_same<U, ::BOOST_CONTAINER_MOVE_NAMESPACE::rv<pair> > >::type* = 0
        #endif
@@ -192,6 +192,19 @@
 }  //namespace containers_detail { 
 }  //namespace container { 
 
+
+//Without this specialization recursive flat_(multi)map instantiation fails
+//because is_enum needs to instantiate the recursive pair, leading to a compilation error).
+//This breaks the cycle clearly stating that pair is not an enum avoiding any instantiation.
+template<class T>
+struct is_enum;
+
+template<class T, class U>
+struct is_enum< ::boost::container::containers_detail::pair<T, U> >
+{
+   static const bool value = false;
+};
+
 }  //namespace boost {
 
 #include INCLUDE_BOOST_CONTAINER_DETAIL_CONFIG_END_HPP
Modified: trunk/boost/interprocess/containers/container/detail/preprocessor.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/preprocessor.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/preprocessor.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -16,6 +16,11 @@
 #endif
 
 #include "config_begin.hpp"
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+#include INCLUDE_BOOST_CONTAINER_DETAIL_STORED_REF_HPP
+#endif
+
 #include INCLUDE_BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
 
 #ifdef BOOST_CONTAINERS_PERFECT_FORWARDING
@@ -36,7 +41,7 @@
 //This cast is ugly but it is necessary until "perfect forwarding"
 //is achieved in C++0x. Meanwhile, if we want to be able to
 //bind rvalues with non-const references, we have to be ugly
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
    #define BOOST_CONTAINERS_PP_PARAM_LIST(z, n, data) \
    BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \
    //!
@@ -46,7 +51,7 @@
    //!
 #endif
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
    #define BOOST_CONTAINERS_PARAM(U, u) \
    U && u \
    //!
@@ -56,10 +61,22 @@
    //!
 #endif
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
+
+#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+
 #define BOOST_CONTAINERS_AUX_PARAM_INIT(z, n, data) \
-  BOOST_PP_CAT(m_p, n) (BOOST_PP_CAT(p, n))           \
+  BOOST_PP_CAT(m_p, n) (BOOST_CONTAINER_MOVE_NAMESPACE::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ))           \
 //!
+
+#else
+
+#define BOOST_CONTAINERS_AUX_PARAM_INIT(z, n, data) \
+  BOOST_PP_CAT(m_p, n) (static_cast<BOOST_PP_CAT(P, n)>( BOOST_PP_CAT(p, n) ))           \
+//!
+
+#endif
+
 #else
 #define BOOST_CONTAINERS_AUX_PARAM_INIT(z, n, data) \
   BOOST_PP_CAT(m_p, n) (const_cast<BOOST_PP_CAT(P, n) &>(BOOST_PP_CAT(p, n))) \
@@ -70,10 +87,23 @@
   BOOST_PP_CAT(++m_p, n)                        \
 //!
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
+
+#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
+
+#define BOOST_CONTAINERS_AUX_PARAM_DEFINE(z, n, data)  \
+  BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n);            \
+//!
+
+#else
+
 #define BOOST_CONTAINERS_AUX_PARAM_DEFINE(z, n, data)  \
   BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n);            \
 //!
+
+#endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
+
+
 #else
 #define BOOST_CONTAINERS_AUX_PARAM_DEFINE(z, n, data)  \
   BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n);             \
@@ -84,10 +114,20 @@
 BOOST_CONTAINER_MOVE_NAMESPACE::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \
 //!
 
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
+
+#define BOOST_CONTAINERS_PP_MEMBER_FORWARD(z, n, data) \
+::boost::container::containers_detail::stored_ref< BOOST_PP_CAT(P, n) >::forward( BOOST_PP_CAT(m_p, n) ) \
+//!
+
+#else
+
 #define BOOST_CONTAINERS_PP_MEMBER_FORWARD(z, n, data) \
 BOOST_CONTAINER_MOVE_NAMESPACE::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(m_p, n) ) \
 //!
 
+#endif   //!defined(BOOST_NO_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
+
 #define BOOST_CONTAINERS_PP_MEMBER_IT_FORWARD(z, n, data) \
 BOOST_PP_CAT(*m_p, n) \
 //!
Added: trunk/boost/interprocess/containers/container/detail/stored_ref.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/interprocess/containers/container/detail/stored_ref.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -0,0 +1,92 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINERS_DETAIL_STORED_REF_HPP
+#define BOOST_CONTAINERS_DETAIL_STORED_REF_HPP
+
+#include "config_begin.hpp"
+#include INCLUDE_BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+
+namespace boost{
+namespace container{
+namespace containers_detail{
+
+template<class T>
+struct stored_ref
+{
+
+   static T && forward(T &t)
+   #ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+   { return t; }
+   #else
+   { return BOOST_CONTAINER_MOVE_NAMESPACE::move(t); }
+   #endif
+};
+
+template<class T>
+struct stored_ref<const T>
+{
+   static const T && forward(const T &t)
+   #ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+   { return t; }
+   #else
+   { return static_cast<const T&&>(t); }
+   #endif
+};
+
+template<class T>
+struct stored_ref<T&&>
+{
+   static T && forward(T &t)
+   #ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+   { return t; }
+   #else
+   { return BOOST_CONTAINER_MOVE_NAMESPACE::move(t); }
+   #endif
+};
+
+template<class T>
+struct stored_ref<const T&&>
+{
+   static const T && forward(const T &t)
+   #ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+   { return t; }
+   #else
+   { return static_cast<const T &&>(t); }
+   #endif
+};
+
+template<class T>
+struct stored_ref<const T&>
+{
+   static const T & forward(const T &t)
+   {  return t; }
+};
+
+template<class T>
+struct stored_ref<T&>
+{
+   static T & forward(T &t)
+   {  return t; }
+};
+
+}  //namespace containers_detail{
+}  //namespace container{
+}  //namespace boost{
+
+#else
+#error "This header can be included only for compiler with rvalue references"
+#endif   //BOOST_NO_RVALUE_REFERENCES
+
+#include INCLUDE_BOOST_CONTAINER_DETAIL_CONFIG_END_HPP
+
+#endif   //BOOST_CONTAINERS_DETAIL_STORED_REF_HPP
Modified: trunk/boost/interprocess/containers/container/detail/transform_iterator.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/transform_iterator.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/transform_iterator.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -47,7 +47,7 @@
       :  m_value(px)
    {}
 
-   T* operator->() const { return &m_value; }
+   T* operator->() const { return const_cast<T*>(&m_value); }
    // This function is needed for MWCW and BCC, which won't call operator->
    // again automatically per 13.3.1.2 para 8
 //   operator T*() const { return &m_value; }
Modified: trunk/boost/interprocess/containers/container/detail/tree.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/tree.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/tree.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -7,38 +7,7 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's stl_tree file. Modified by Ion Gaztanaga 2005.
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
+
 #ifndef BOOST_CONTAINERS_TREE_HPP
 #define BOOST_CONTAINERS_TREE_HPP
 
@@ -200,7 +169,7 @@
 };
 
 }//namespace containers_detail {
-#if !defined(BOOST_HAS_RVALUE_REFS)
+#if defined(BOOST_NO_RVALUE_REFERENCES)
 template<class T, class VoidPointer>
 struct has_own_construct_from_it
    < boost::container::containers_detail::rbtree_node<T, VoidPointer> >
Modified: trunk/boost/interprocess/containers/container/detail/utilities.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/utilities.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/utilities.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -15,6 +15,8 @@
 #include <cstdio>
 #include <boost/type_traits/is_fundamental.hpp>
 #include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_enum.hpp>
+#include <boost/type_traits/is_member_pointer.hpp>
 #include INCLUDE_BOOST_CONTAINER_MOVE_HPP
 #include INCLUDE_BOOST_CONTAINER_DETAIL_MPL_HPP
 #include INCLUDE_BOOST_CONTAINER_DETAIL_TYPE_TRAITS_HPP
@@ -96,10 +98,41 @@
    enum { value = ((OrigSize-1)/RoundTo+1)*RoundTo };
 };
 
+template <class _TypeT>
+struct __rw_is_enum
+{
+struct _C_no { };
+struct _C_yes { int _C_dummy [2]; };
+
+struct _C_indirect {
+// prevent classes with user-defined conversions from matching
+
+// use double to prevent float->int gcc conversion warnings
+_C_indirect (double);
+};
+
+// nested struct gets rid of bogus gcc errors
+struct _C_nest {
+// supply first argument to prevent HP aCC warnings
+static _C_no _C_is (int, ...);
+static _C_yes _C_is (int, _C_indirect);
+
+static _TypeT _C_make_T ();
+};
+
+enum {
+_C_val = sizeof (_C_yes)
+== sizeof (_C_nest::_C_is (0, _C_nest::_C_make_T ()))
+&& !::boost::is_fundamental<_TypeT>::value
+};
+
+}; 
+
 template<class T>
 struct move_const_ref_type
    : if_c
-   < ::boost::is_fundamental<T>::value || ::boost::is_pointer<T>::value
+   < ::boost::is_fundamental<T>::value || ::boost::is_pointer<T>::value ||
+     ::boost::is_member_pointer<T>::value || ::boost::is_enum<T>::value
    ,const T &
    ,BOOST_MOVE_MACRO_CATCH_CONST_RLVALUE(T)
    >
Modified: trunk/boost/interprocess/containers/container/detail/workaround.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/detail/workaround.hpp	(original)
+++ trunk/boost/interprocess/containers/container/detail/workaround.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -13,7 +13,7 @@
 
 #include "config_begin.hpp"
 
-#if     defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL)\
+#if    !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)\
     && !defined(BOOST_MOVE_MACRO_DISABLE_VARIADIC_TMPL)
 #define BOOST_CONTAINERS_PERFECT_FORWARDING
 
Modified: trunk/boost/interprocess/containers/container/flat_map.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/flat_map.hpp	(original)
+++ trunk/boost/interprocess/containers/container/flat_map.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -121,23 +121,32 @@
    public:
 
    // typedefs:
-   typedef typename tree_t::key_type               key_type;
-   typedef typename tree_t::value_type             value_type;
-   typedef typename tree_t::pointer                pointer;
-   typedef typename tree_t::const_pointer          const_pointer;
-   typedef typename tree_t::reference              reference;
-   typedef typename tree_t::const_reference        const_reference;
-   typedef typename tree_t::value_compare          value_compare;
-   typedef T                                       mapped_type;
-   typedef typename tree_t::key_compare            key_compare;
-   typedef typename tree_t::iterator               iterator;
-   typedef typename tree_t::const_iterator         const_iterator;
-   typedef typename tree_t::reverse_iterator       reverse_iterator;
-   typedef typename tree_t::const_reverse_iterator const_reverse_iterator;
-   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;
+   typedef typename impl_tree_t::key_type               key_type;
+   typedef T                                            mapped_type;
+   typedef typename std::pair<key_type, mapped_type>    value_type;
+   typedef typename Alloc::pointer                      pointer;
+   typedef typename Alloc::const_pointer                const_pointer;
+   typedef typename Alloc::reference                    reference;
+   typedef typename Alloc::const_reference              const_reference;
+   typedef containers_detail::flat_tree_value_compare
+      < Pred
+      , containers_detail::select1st< std::pair<Key, T> >
+      , std::pair<Key, T> >                             value_compare;
+   typedef Pred                                         key_compare;
+   typedef typename containers_detail::
+      get_flat_tree_iterators<pointer>::iterator        iterator;
+   typedef typename containers_detail::
+      get_flat_tree_iterators<pointer>::const_iterator  const_iterator;
+   typedef typename containers_detail::
+      get_flat_tree_iterators
+         <pointer>::reverse_iterator                    reverse_iterator;
+   typedef typename containers_detail::
+      get_flat_tree_iterators
+         <pointer>::const_reverse_iterator              const_reverse_iterator;
+   typedef typename impl_tree_t::size_type              size_type;
+   typedef typename impl_tree_t::difference_type        difference_type;
+   typedef Alloc                                        allocator_type;
+   typedef Alloc                                        stored_allocator_type;
 
    //! <b>Effects</b>: Constructs an empty flat_map using the specified
    //! comparison object and allocator.
@@ -851,23 +860,32 @@
    public:
 
    // typedefs:
-   typedef typename tree_t::key_type               key_type;
-   typedef typename tree_t::value_type             value_type;
-   typedef typename tree_t::pointer                pointer;
-   typedef typename tree_t::const_pointer          const_pointer;
-   typedef typename tree_t::reference              reference;
-   typedef typename tree_t::const_reference        const_reference;
-   typedef typename tree_t::value_compare          value_compare;
-   typedef T                                       mapped_type;
-   typedef typename tree_t::key_compare            key_compare;
-   typedef typename tree_t::iterator               iterator;
-   typedef typename tree_t::const_iterator         const_iterator;
-   typedef typename tree_t::reverse_iterator       reverse_iterator;
-   typedef typename tree_t::const_reverse_iterator const_reverse_iterator;
-   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;
+   typedef typename impl_tree_t::key_type               key_type;
+   typedef T                                            mapped_type;
+   typedef typename std::pair<key_type, mapped_type>    value_type;
+   typedef typename Alloc::pointer                      pointer;
+   typedef typename Alloc::const_pointer                const_pointer;
+   typedef typename Alloc::reference                    reference;
+   typedef typename Alloc::const_reference              const_reference;
+   typedef containers_detail::flat_tree_value_compare
+      < Pred
+      , containers_detail::select1st< std::pair<Key, T> >
+      , std::pair<Key, T> >                             value_compare;
+   typedef Pred                                         key_compare;
+   typedef typename containers_detail::
+      get_flat_tree_iterators<pointer>::iterator        iterator;
+   typedef typename containers_detail::
+      get_flat_tree_iterators<pointer>::const_iterator  const_iterator;
+   typedef typename containers_detail::
+      get_flat_tree_iterators
+         <pointer>::reverse_iterator                    reverse_iterator;
+   typedef typename containers_detail::
+      get_flat_tree_iterators
+         <pointer>::const_reverse_iterator              const_reverse_iterator;
+   typedef typename impl_tree_t::size_type              size_type;
+   typedef typename impl_tree_t::difference_type        difference_type;
+   typedef Alloc                                        allocator_type;
+   typedef Alloc                                        stored_allocator_type;
 
    //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
    //!   object and allocator.
Modified: trunk/boost/interprocess/containers/container/flat_set.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/flat_set.hpp	(original)
+++ trunk/boost/interprocess/containers/container/flat_set.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -331,7 +331,7 @@
    std::pair<iterator, bool> insert(insert_const_ref_type x) 
    {  return priv_insert(x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    std::pair<iterator, bool> insert(T &x)
    { return this->insert(const_cast<const T &>(x)); }
 
@@ -368,7 +368,7 @@
    iterator insert(const_iterator p, insert_const_ref_type x) 
    {  return priv_insert(p, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x)
    { return this->insert(position, const_cast<const T &>(x)); }
 
@@ -922,7 +922,7 @@
    iterator insert(insert_const_ref_type x) 
    {  return priv_insert(x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(T &x)
    { return this->insert(const_cast<const T &>(x)); }
 
@@ -954,7 +954,7 @@
    iterator insert(const_iterator p, insert_const_ref_type x) 
    {  return priv_insert(p, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x)
    { return this->insert(position, const_cast<const T &>(x)); }
 
Modified: trunk/boost/interprocess/containers/container/list.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/list.hpp	(original)
+++ trunk/boost/interprocess/containers/container/list.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -6,39 +6,6 @@
 //
 // See http://www.boost.org/libs/container for documentation.
 //
-//////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's stl_list.h file. Modified by Ion Gaztanaga 2004
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
 
 #ifndef BOOST_CONTAINERS_LIST_HPP_
 #define BOOST_CONTAINERS_LIST_HPP_
@@ -572,7 +539,7 @@
    void push_front(insert_const_ref_type x)   
    {  this->insert(this->cbegin(), x);  }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_front(T &x) { push_front(const_cast<const T &>(x)); }
 
    template<class U>
@@ -597,7 +564,7 @@
    void push_back (insert_const_ref_type x)   
    {  this->insert(this->cend(), x);    }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_back(T &x) { push_back(const_cast<const T &>(x)); }
 
    template<class U>
@@ -808,7 +775,7 @@
    iterator insert(const_iterator position, insert_const_ref_type x) 
    {  return this->priv_insert(position, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x) { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
Modified: trunk/boost/interprocess/containers/container/set.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/set.hpp	(original)
+++ trunk/boost/interprocess/containers/container/set.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -7,38 +7,6 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's stl_set/stl_multiset files. Modified by Ion Gaztanaga 2004.
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
 
 #ifndef BOOST_CONTAINERS_SET_HPP
 #define BOOST_CONTAINERS_SET_HPP
@@ -357,7 +325,7 @@
    std::pair<iterator,bool> insert(insert_const_ref_type x) 
    {  return priv_insert(x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    std::pair<iterator,bool> insert(T &x)
    { return this->insert(const_cast<const T &>(x)); }
 
@@ -389,7 +357,7 @@
    iterator insert(const_iterator p, insert_const_ref_type x) 
    {  return priv_insert(p, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x)
    { return this->insert(position, const_cast<const T &>(x)); }
 
@@ -912,7 +880,7 @@
    iterator insert(insert_const_ref_type x) 
    {  return priv_insert(x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(T &x)
    { return this->insert(const_cast<const T &>(x)); }
 
@@ -942,7 +910,7 @@
    iterator insert(const_iterator p, insert_const_ref_type x) 
    {  return priv_insert(p, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x)
    { return this->insert(position, const_cast<const T &>(x)); }
 
Modified: trunk/boost/interprocess/containers/container/slist.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/slist.hpp	(original)
+++ trunk/boost/interprocess/containers/container/slist.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -7,38 +7,6 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's stl_slist.h file. Modified by Ion Gaztanaga 2004-2009
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1996
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
 
 #ifndef BOOST_CONTAINERS_SLIST_HPP
 #define BOOST_CONTAINERS_SLIST_HPP
@@ -631,7 +599,7 @@
    void push_front(insert_const_ref_type x)
    {  return priv_push_front(x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_front(T &x) { push_front(const_cast<const T &>(x)); }
 
    template<class U>
@@ -692,7 +660,7 @@
    iterator insert_after(const_iterator prev_pos, insert_const_ref_type x) 
    {  return this->priv_insert_after(prev_pos, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert_after(const_iterator position, T &x)
    { return this->insert_after(position, const_cast<const T &>(x)); }
 
@@ -760,7 +728,7 @@
    iterator insert(const_iterator position, insert_const_ref_type x) 
    {  return this->priv_insert(position, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x)
    { return this->insert(position, const_cast<const T &>(x)); }
 
Modified: trunk/boost/interprocess/containers/container/stable_vector.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/stable_vector.hpp	(original)
+++ trunk/boost/interprocess/containers/container/stable_vector.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -672,7 +672,7 @@
    void push_back(insert_const_ref_type x) 
    {  return priv_push_back(x);  }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_back(T &x) { push_back(const_cast<const T &>(x)); }
 
    template<class U>
@@ -689,7 +689,7 @@
    iterator insert(const_iterator position, insert_const_ref_type x) 
    {  return this->priv_insert(position, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x) { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
Modified: trunk/boost/interprocess/containers/container/string.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/string.hpp	(original)
+++ trunk/boost/interprocess/containers/container/string.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -7,22 +7,6 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's string file. Modified by Ion Gaztanaga 2004-2009
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 1994
-// Hewlett-Packard Company
-// 
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appear in all copies and
-// that both that copyright notice and this permission notice appear
-// in supporting documentation.  Hewlett-Packard Company makes no
-// representations about the suitability of this software for any
-// purpose.  It is provided "as is" without express or implied warranty.
 
 #ifndef BOOST_CONTAINERS_STRING_HPP
 #define BOOST_CONTAINERS_STRING_HPP
Modified: trunk/boost/interprocess/containers/container/vector.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/vector.hpp	(original)
+++ trunk/boost/interprocess/containers/container/vector.hpp	2010-07-25 12:45:54 EDT (Sun, 25 Jul 2010)
@@ -7,34 +7,6 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-//
-// This file comes from SGI's stl_vector.h file. Modified by Ion Gaztanaga.
-// Renaming, isolating and porting to generic algorithms. Pointer typedef 
-// set to allocator::pointer to allow placing it in shared memory.
-//
-///////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 1994
-// Hewlett-Packard Company
-// 
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appear in all copies and
-// that both that copyright notice and this permission notice appear
-// in supporting documentation.  Hewlett-Packard Company makes no
-// representations about the suitability of this software for any
-// purpose.  It is provided "as is" without express or implied warranty.
-// 
-// 
-// Copyright (c) 1996
-// Silicon Graphics Computer Systems, Inc.
-// 
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appear in all copies and
-// that both that copyright notice and this permission notice appear
-// in supporting documentation.  Silicon Graphics makes no
-// representations about the suitability of this software for any
-// purpose.  It is provided "as is" without express or implied warranty.
 
 #ifndef BOOST_CONTAINERS_CONTAINERS_VECTOR_HPP
 #define BOOST_CONTAINERS_CONTAINERS_VECTOR_HPP
@@ -316,7 +288,7 @@
       (void)limit_size;
       (void)reuse;
       if(!(command & allocate_new))
-         return std::pair<pointer, bool>(pointer(0), 0);
+         return std::pair<pointer, bool>(pointer(0), false);
       received_size = preferred_size;
       return std::make_pair(this->alloc().allocate(received_size), false);
    }
@@ -903,11 +875,14 @@
    void push_back(insert_const_ref_type x) 
    {  return priv_push_back(x);  }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    void push_back(T &x) { push_back(const_cast<const T &>(x)); }
 
    template<class U>
-   void push_back(const U &u, typename containers_detail::enable_if_c<containers_detail::is_same<T, U>::value && !::BOOST_CONTAINER_MOVE_NAMESPACE::is_movable<U>::value >::type* =0)
+   void push_back(const U &u, typename containers_detail::enable_if_c
+                  <containers_detail::is_same<T, U>::value &&
+                   !::BOOST_CONTAINER_MOVE_NAMESPACE::is_movable<U>::value
+                  >::type* =0)
    { return priv_push_back(u); }
    #endif
 
@@ -1062,7 +1037,7 @@
    iterator insert(const_iterator position, insert_const_ref_type x) 
    {  return this->priv_insert(position, x); }
 
-   #if !defined(BOOST_HAS_RVALUE_REFS) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+   #if defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
    iterator insert(const_iterator position, T &x) { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
@@ -1864,7 +1839,7 @@
 
    template <class Integer>
    void priv_assign_dispatch(Integer n, Integer val, containers_detail::true_)
-   { this->assign((size_type) n, (T) val); }
+   { this->assign((size_type) n, (value_type)val); }
 
    template <class InIt>
    void priv_assign_dispatch(InIt first, InIt last, containers_detail::false_)