Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2008-06-23 14:20:48


Author: igaztanaga
Date: 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
New Revision: 46630
URL: http://svn.boost.org/trac/boost/changeset/46630

Log:
Merged from trunk for 1.36 release
Added:
   branches/release/boost/interprocess/anonymous_shared_memory.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/anonymous_shared_memory.hpp
   branches/release/boost/interprocess/detail/intersegment_ptr.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/intersegment_ptr.hpp
   branches/release/boost/interprocess/detail/managed_multi_shared_memory.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/managed_multi_shared_memory.hpp
   branches/release/boost/interprocess/detail/managed_open_or_create_impl.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/managed_open_or_create_impl.hpp
   branches/release/boost/interprocess/detail/math_functions.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/math_functions.hpp
   branches/release/boost/interprocess/detail/multi_segment_services.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/multi_segment_services.hpp
   branches/release/boost/interprocess/detail/segment_manager_helper.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/segment_manager_helper.hpp
   branches/release/boost/interprocess/detail/utilities.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/detail/utilities.hpp
   branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/mem_algo/detail/multi_simple_seq_fit.hpp
   branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp
   branches/release/boost/interprocess/sync/math_functions.hpp
      - copied unchanged from r46629, /trunk/boost/interprocess/sync/math_functions.hpp
   branches/release/boost/intrusive/any_hook.hpp
      - copied unchanged from r46629, /trunk/boost/intrusive/any_hook.hpp
   branches/release/boost/intrusive/detail/any_node_and_algorithms.hpp
      - copied unchanged from r46629, /trunk/boost/intrusive/detail/any_node_and_algorithms.hpp
   branches/release/boost/intrusive/pointer_plus_bits.hpp
      - copied unchanged from r46629, /trunk/boost/intrusive/pointer_plus_bits.hpp
   branches/release/libs/interprocess/example/doc_anonymous_shared_memory.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/example/doc_anonymous_shared_memory.cpp
   branches/release/libs/interprocess/example/doc_complex_map.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/example/doc_complex_map.cpp
   branches/release/libs/interprocess/example/doc_managed_copy_on_write.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp
   branches/release/libs/interprocess/example/doc_multi_index.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/example/doc_multi_index.cpp
   branches/release/libs/interprocess/example/doc_unordered_map.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/example/doc_unordered_map.cpp
   branches/release/libs/interprocess/proj/to-do.txt
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/to-do.txt
   branches/release/libs/interprocess/proj/vc7ide/anonymous_shared_memory_test.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/anonymous_shared_memory_test.vcproj
   branches/release/libs/interprocess/proj/vc7ide/doc_anonymous_shared_memory.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/doc_anonymous_shared_memory.vcproj
   branches/release/libs/interprocess/proj/vc7ide/doc_complex_map.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/doc_complex_map.vcproj
   branches/release/libs/interprocess/proj/vc7ide/doc_managed_copy_on_write.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/doc_managed_copy_on_write.vcproj
   branches/release/libs/interprocess/proj/vc7ide/doc_multi_index.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/doc_multi_index.vcproj
   branches/release/libs/interprocess/proj/vc7ide/doc_unordered_map.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/doc_unordered_map.vcproj
   branches/release/libs/interprocess/proj/vc7ide/enable_shared_from_this_test.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/enable_shared_from_this_test.vcproj
   branches/release/libs/interprocess/proj/vc7ide/file_lock_test.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/file_lock_test.vcproj
   branches/release/libs/interprocess/proj/vc7ide/intersegment_ptr_test.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/intersegment_ptr_test.vcproj
   branches/release/libs/interprocess/proj/vc7ide/multi_index_test.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/multi_index_test.vcproj
   branches/release/libs/interprocess/proj/vc7ide/unordered_test.vcproj
      - copied unchanged from r46629, /trunk/libs/interprocess/proj/vc7ide/unordered_test.vcproj
   branches/release/libs/interprocess/test/anonymous_shared_memory_test.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/test/anonymous_shared_memory_test.cpp
   branches/release/libs/interprocess/test/enable_shared_from_this_test.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/test/enable_shared_from_this_test.cpp
   branches/release/libs/interprocess/test/file_lock_test.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/test/file_lock_test.cpp
   branches/release/libs/interprocess/test/intersegment_ptr_test.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/test/intersegment_ptr_test.cpp
   branches/release/libs/interprocess/test/multi_index_test.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/test/multi_index_test.cpp
   branches/release/libs/interprocess/test/unordered_test.cpp
      - copied unchanged from r46629, /trunk/libs/interprocess/test/unordered_test.cpp
   branches/release/libs/intrusive/example/doc_any_hook.cpp
      - copied unchanged from r46629, /trunk/libs/intrusive/example/doc_any_hook.cpp
   branches/release/libs/intrusive/proj/vc7ide/any_test/
      - copied from r46629, /trunk/libs/intrusive/proj/vc7ide/any_test/
   branches/release/libs/intrusive/proj/vc7ide/any_test/any_test.vcproj
      - copied unchanged from r46629, /trunk/libs/intrusive/proj/vc7ide/any_test/any_test.vcproj
   branches/release/libs/intrusive/proj/vc7ide/to-do.txt
      - copied unchanged from r46629, /trunk/libs/intrusive/proj/vc7ide/to-do.txt
   branches/release/libs/intrusive/test/any_test.cpp
      - copied unchanged from r46629, /trunk/libs/intrusive/test/any_test.cpp
Removed:
   branches/release/boost/intrusive/detail/no_exceptions_support.hpp
   branches/release/boost/intrusive/pointer_plus_2_bits.hpp
   branches/release/boost/intrusive/pointer_plus_bit.hpp
Properties modified:
   branches/release/libs/interprocess/proj/conceptgcc/MakeAll (contents, props changed)
   branches/release/libs/interprocess/proj/cygwin/MakeAll (contents, props changed)
   branches/release/libs/interprocess/proj/linux/MakeAll (contents, props changed)
   branches/release/libs/interprocess/proj/mingw/MakeAll (contents, props changed)
   branches/release/libs/interprocess/proj/qnx/MakeAll (contents, props changed)
   branches/release/libs/interprocess/proj/vc7ide/Interprocess.sln (contents, props changed)
   branches/release/libs/intrusive/proj/vc7ide/Intrusive.sln (contents, props changed)
Text files modified:
   branches/release/boost/interprocess/allocators/adaptive_pool.hpp | 140 +-
   branches/release/boost/interprocess/allocators/allocator.hpp | 29
   branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp | 83
   branches/release/boost/interprocess/allocators/cached_node_allocator.hpp | 59
   branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp | 368 ++++---
   branches/release/boost/interprocess/allocators/detail/allocator_common.hpp | 115 +
   branches/release/boost/interprocess/allocators/detail/node_pool.hpp | 108 +-
   branches/release/boost/interprocess/allocators/node_allocator.hpp | 125 +-
   branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp | 127 +-
   branches/release/boost/interprocess/allocators/private_node_allocator.hpp | 309 +-----
   branches/release/boost/interprocess/containers/deque.hpp | 40
   branches/release/boost/interprocess/containers/detail/flat_tree.hpp | 18
   branches/release/boost/interprocess/containers/detail/node_alloc_holder.hpp | 22
   branches/release/boost/interprocess/containers/detail/tree.hpp | 23
   branches/release/boost/interprocess/containers/flat_map.hpp | 123 +-
   branches/release/boost/interprocess/containers/flat_set.hpp | 39
   branches/release/boost/interprocess/containers/list.hpp | 35
   branches/release/boost/interprocess/containers/map.hpp | 54
   branches/release/boost/interprocess/containers/set.hpp | 28
   branches/release/boost/interprocess/containers/slist.hpp | 19
   branches/release/boost/interprocess/containers/string.hpp | 19
   branches/release/boost/interprocess/containers/vector.hpp | 111 +-
   branches/release/boost/interprocess/creation_tags.hpp | 22
   branches/release/boost/interprocess/detail/algorithms.hpp | 97 +
   branches/release/boost/interprocess/detail/config_begin.hpp | 1
   branches/release/boost/interprocess/detail/file_wrapper.hpp | 6
   branches/release/boost/interprocess/detail/managed_memory_impl.hpp | 14
   branches/release/boost/interprocess/detail/move.hpp | 32
   branches/release/boost/interprocess/detail/move_iterator.hpp | 4
   branches/release/boost/interprocess/detail/mpl.hpp | 21
   branches/release/boost/interprocess/detail/named_proxy.hpp | 20
   branches/release/boost/interprocess/detail/win32_api.hpp | 2
   branches/release/boost/interprocess/detail/workaround.hpp | 9
   branches/release/boost/interprocess/errors.hpp | 4
   branches/release/boost/interprocess/file_mapping.hpp | 38
   branches/release/boost/interprocess/indexes/map_index.hpp | 2
   branches/release/boost/interprocess/indexes/unordered_map_index.hpp | 4
   branches/release/boost/interprocess/interprocess_fwd.hpp | 12
   branches/release/boost/interprocess/ipc/message_queue.hpp | 17
   branches/release/boost/interprocess/managed_external_buffer.hpp | 30
   branches/release/boost/interprocess/managed_heap_memory.hpp | 26
   branches/release/boost/interprocess/managed_mapped_file.hpp | 82 +
   branches/release/boost/interprocess/managed_shared_memory.hpp | 82 +
   branches/release/boost/interprocess/managed_windows_shared_memory.hpp | 77 +
   branches/release/boost/interprocess/mapped_region.hpp | 46
   branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp | 105 ++
   branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp | 16
   branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp | 55
   branches/release/boost/interprocess/offset_ptr.hpp | 72 -
   branches/release/boost/interprocess/segment_manager.hpp | 99 +
   branches/release/boost/interprocess/shared_memory_object.hpp | 36
   branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp | 5
   branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp | 5
   branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp | 74 +
   branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp | 48
   branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp | 5
   branches/release/boost/interprocess/sync/emulation/interprocess_condition.hpp | 29
   branches/release/boost/interprocess/sync/file_lock.hpp | 71 -
   branches/release/boost/interprocess/sync/interprocess_condition.hpp | 2
   branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp | 5
   branches/release/boost/interprocess/sync/named_condition.hpp | 32
   branches/release/boost/interprocess/sync/named_recursive_mutex.hpp | 4
   branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp | 5
   branches/release/boost/interprocess/sync/scoped_lock.hpp | 17
   branches/release/boost/interprocess/sync/sharable_lock.hpp | 18
   branches/release/boost/interprocess/sync/upgradable_lock.hpp | 12
   branches/release/boost/interprocess/windows_shared_memory.hpp | 20
   branches/release/boost/intrusive/avl_set.hpp | 70 +
   branches/release/boost/intrusive/avltree.hpp | 31
   branches/release/boost/intrusive/avltree_algorithms.hpp | 14
   branches/release/boost/intrusive/circular_list_algorithms.hpp | 5
   branches/release/boost/intrusive/circular_slist_algorithms.hpp | 13
   branches/release/boost/intrusive/detail/avltree_node.hpp | 10
   branches/release/boost/intrusive/detail/common_slist_algorithms.hpp | 5
   branches/release/boost/intrusive/detail/ebo_functor_holder.hpp | 33
   branches/release/boost/intrusive/detail/generic_hook.hpp | 53
   branches/release/boost/intrusive/detail/hashtable_node.hpp | 56
   branches/release/boost/intrusive/detail/list_node.hpp | 6
   branches/release/boost/intrusive/detail/mpl.hpp | 20
   branches/release/boost/intrusive/detail/parent_from_member.hpp | 23
   branches/release/boost/intrusive/detail/rbtree_node.hpp | 16
   branches/release/boost/intrusive/detail/slist_node.hpp | 3
   branches/release/boost/intrusive/detail/tree_algorithms.hpp | 180 ++-
   branches/release/boost/intrusive/detail/tree_node.hpp | 5
   branches/release/boost/intrusive/detail/utilities.hpp | 108 ++
   branches/release/boost/intrusive/hashtable.hpp | 1595 +++++++++++++++++++++++++----------
   branches/release/boost/intrusive/intrusive_fwd.hpp | 23
   branches/release/boost/intrusive/linear_slist_algorithms.hpp | 15
   branches/release/boost/intrusive/list.hpp | 55
   branches/release/boost/intrusive/options.hpp | 129 ++
   branches/release/boost/intrusive/rbtree.hpp | 62
   branches/release/boost/intrusive/rbtree_algorithms.hpp | 13
   branches/release/boost/intrusive/set.hpp | 85 +
   branches/release/boost/intrusive/sg_set.hpp | 68 +
   branches/release/boost/intrusive/sgtree.hpp | 25
   branches/release/boost/intrusive/sgtree_algorithms.hpp | 13
   branches/release/boost/intrusive/slist.hpp | 167 ++
   branches/release/boost/intrusive/splay_set.hpp | 68 +
   branches/release/boost/intrusive/splaytree.hpp | 25
   branches/release/boost/intrusive/splaytree_algorithms.hpp | 66 +
   branches/release/boost/intrusive/unordered_set.hpp | 64
   branches/release/boost/intrusive/unordered_set_hook.hpp | 115 ++
   branches/release/libs/interprocess/doc/Jamfile.v2 | 2
   branches/release/libs/interprocess/doc/interprocess.qbk | 196 +++
   branches/release/libs/interprocess/example/Jamfile.v2 | 2
   branches/release/libs/interprocess/example/doc_file_mapping.cpp | 1
   branches/release/libs/interprocess/example/doc_message_queueA.cpp | 2
   branches/release/libs/interprocess/example/doc_move_containers.cpp | 4
   branches/release/libs/interprocess/example/doc_shared_memory.cpp | 1
   branches/release/libs/interprocess/example/doc_shared_memory2.cpp | 3
   branches/release/libs/interprocess/proj/conceptgcc/MakeAll | 70
   branches/release/libs/interprocess/proj/cygwin/MakeAll | 66
   branches/release/libs/interprocess/proj/linux/MakeAll | 64
   branches/release/libs/interprocess/proj/mingw/MakeAll | 70
   branches/release/libs/interprocess/proj/qnx/MakeAll | 66
   branches/release/libs/interprocess/proj/vc7ide/Interprocess.sln | 1782 ++++++++++++++++++++-------------------
   branches/release/libs/interprocess/proj/vc7ide/interprocesslib.vcproj | 3
   branches/release/libs/interprocess/test/Jamfile.v2 | 2
   branches/release/libs/interprocess/test/adaptive_node_pool_test.cpp | 12
   branches/release/libs/interprocess/test/adaptive_pool_test.cpp | 3
   branches/release/libs/interprocess/test/allocator_v1.hpp | 8
   branches/release/libs/interprocess/test/cached_adaptive_pool_test.cpp | 4
   branches/release/libs/interprocess/test/cached_node_allocator_test.cpp | 3
   branches/release/libs/interprocess/test/deque_test.cpp | 12
   branches/release/libs/interprocess/test/dummy_test_allocator.hpp | 10
   branches/release/libs/interprocess/test/expand_bwd_test_allocator.hpp | 8
   branches/release/libs/interprocess/test/expand_bwd_test_template.hpp | 145 +-
   branches/release/libs/interprocess/test/file_mapping_test.cpp | 8
   branches/release/libs/interprocess/test/iset_index_allocation_test.cpp | 1
   branches/release/libs/interprocess/test/list_test.cpp | 6
   branches/release/libs/interprocess/test/list_test.hpp | 8
   branches/release/libs/interprocess/test/managed_mapped_file_test.cpp | 45 +
   branches/release/libs/interprocess/test/managed_shared_memory_test.cpp | 44
   branches/release/libs/interprocess/test/managed_windows_shared_memory_test.cpp | 76 +
   branches/release/libs/interprocess/test/map_test.hpp | 32
   branches/release/libs/interprocess/test/mapped_file_test.cpp | 5
   branches/release/libs/interprocess/test/node_allocator_test.cpp | 3
   branches/release/libs/interprocess/test/node_pool_test.cpp | 7
   branches/release/libs/interprocess/test/node_pool_test.hpp | 38
   branches/release/libs/interprocess/test/private_adaptive_pool_test.cpp | 3
   branches/release/libs/interprocess/test/private_node_allocator_test.cpp | 3
   branches/release/libs/interprocess/test/set_test.hpp | 72
   branches/release/libs/interprocess/test/shared_memory_mapping_test.cpp | 30
   branches/release/libs/interprocess/test/shared_memory_test.cpp | 5
   branches/release/libs/interprocess/test/shared_ptr_test.cpp | 83 +
   branches/release/libs/interprocess/test/string_test.cpp | 4
   branches/release/libs/interprocess/test/tree_test.cpp | 2
   branches/release/libs/interprocess/test/unique_ptr_test.cpp | 28
   branches/release/libs/interprocess/test/upgradable_mutex_test.cpp | 70
   branches/release/libs/interprocess/test/user_buffer_test.cpp | 12
   branches/release/libs/interprocess/test/vector_test.cpp | 15
   branches/release/libs/interprocess/test/vector_test.hpp | 20
   branches/release/libs/interprocess/test/windows_shared_memory_mapping_test.cpp | 143 +-
   branches/release/libs/interprocess/test/windows_shared_memory_test.cpp | 1
   branches/release/libs/intrusive/doc/Jamfile.v2 | 2
   branches/release/libs/intrusive/doc/intrusive.qbk | 705 +++++++++------
   branches/release/libs/intrusive/example/Jamfile.v2 | 2
   branches/release/libs/intrusive/index.html | 2
   branches/release/libs/intrusive/perf/Jamfile.v2 | 2
   branches/release/libs/intrusive/perf/perf_list.cpp | 2
   branches/release/libs/intrusive/proj/vc7ide/Intrusive.sln | 536 ++++++++---
   branches/release/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj | 17
   branches/release/libs/intrusive/proj/vc7ide/list/list.vcproj | 10
   branches/release/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj | 10
   branches/release/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj | 10
   branches/release/libs/intrusive/proj/vc7ide/set/set.vcproj | 10
   branches/release/libs/intrusive/proj/vc7ide/slist/slist.vcproj | 10
   branches/release/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj | 10
   branches/release/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj | 10
   branches/release/libs/intrusive/test/Jamfile.v2 | 2
   branches/release/libs/intrusive/test/avl_set_test.cpp | 1
   branches/release/libs/intrusive/test/common_functors.hpp | 8
   branches/release/libs/intrusive/test/generic_assoc_test.hpp | 31
   branches/release/libs/intrusive/test/generic_set_test.hpp | 1
   branches/release/libs/intrusive/test/itestvalue.hpp | 61 +
   branches/release/libs/intrusive/test/list_test.cpp | 1
   branches/release/libs/intrusive/test/slist_test.cpp | 2
   branches/release/libs/intrusive/test/smart_ptr.hpp | 56 -
   branches/release/libs/intrusive/test/unordered_multiset_test.cpp | 256 ++++-
   branches/release/libs/intrusive/test/unordered_set_test.cpp | 62 +
   180 files changed, 7534 insertions(+), 4204 deletions(-)

Modified: branches/release/boost/interprocess/allocators/adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/adaptive_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/adaptive_pool.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -26,6 +26,7 @@
 #include <boost/interprocess/allocators/detail/adaptive_node_pool.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/allocators/detail/allocator_common.hpp>
+#include <boost/interprocess/detail/mpl.hpp>
 #include <memory>
 #include <algorithm>
 #include <cstddef>
@@ -43,14 +44,14 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class adaptive_pool_base
    : public node_pool_allocation_impl
    < adaptive_pool_base
- < Version, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent>
+ < Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent>
    , Version
    , T
    , SegmentManager
@@ -60,11 +61,20 @@
    typedef typename SegmentManager::void_pointer void_pointer;
    typedef SegmentManager segment_manager;
    typedef adaptive_pool_base
- <Version, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> self_t;
- typedef detail::shared_adaptive_node_pool
- < SegmentManager, sizeof(T), NodesPerChunk, MaxFreeChunks, OverheadPercent> node_pool_t;
- typedef typename detail::
- pointer_to_other<void_pointer, node_pool_t>::type node_pool_ptr;
+ <Version, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> self_t;
+
+ /// @cond
+
+ template <int dummy>
+ struct node_pool
+ {
+ typedef detail::shared_adaptive_node_pool
+ < SegmentManager, sizeof_value<T>::value, NodesPerBlock, MaxFreeBlocks, OverheadPercent> type;
+
+ static type *get(void *p)
+ { return static_cast<type*>(p); }
+ };
+ /// @endcond
 
    BOOST_STATIC_ASSERT((Version <=2));
 
@@ -95,7 +105,7 @@
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool_base<Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool_base<Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    /// @cond
@@ -105,8 +115,6 @@
    adaptive_pool_base& operator=
       (const adaptive_pool_base<Version2, T2, SegmentManager2, N2, F2, O2>&);
 
- //!Not assignable from other adaptive_pool_base
- adaptive_pool_base& operator=(const adaptive_pool_base&);
    /// @endcond
 
    public:
@@ -114,14 +122,22 @@
    //!pool. Increments the reference count of the associated node pool.
    //!Can throw boost::interprocess::bad_alloc
    adaptive_pool_base(segment_manager *segment_mngr)
- : mp_node_pool(detail::get_or_create_node_pool<node_pool_t>(segment_mngr)) { }
+ : mp_node_pool(detail::get_or_create_node_pool<typename node_pool<0>::type>(segment_mngr)) { }
 
    //!Copy constructor from other adaptive_pool_base. Increments the reference
    //!count of the associated node pool. Never throws
    adaptive_pool_base(const adaptive_pool_base &other)
       : mp_node_pool(other.get_node_pool())
    {
- mp_node_pool->inc_ref_count();
+ node_pool<0>::get(detail::get_pointer(mp_node_pool))->inc_ref_count();
+ }
+
+ //!Assignment from other adaptive_pool_base
+ adaptive_pool_base& operator=(const adaptive_pool_base &other)
+ {
+ adaptive_pool_base c(other);
+ swap(*this, c);
+ return *this;
    }
 
    //!Copy constructor from related adaptive_pool_base. If not present, constructs
@@ -129,23 +145,23 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    adaptive_pool_base
- (const adaptive_pool_base<Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
- : mp_node_pool(detail::get_or_create_node_pool<node_pool_t>(other.get_segment_manager())) { }
+ (const adaptive_pool_base<Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
+ : mp_node_pool(detail::get_or_create_node_pool<typename node_pool<0>::type>(other.get_segment_manager())) { }
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
    ~adaptive_pool_base()
- { detail::destroy_node_pool_if_last_link(detail::get_pointer(mp_node_pool)); }
+ { detail::destroy_node_pool_if_last_link(node_pool<0>::get(detail::get_pointer(mp_node_pool))); }
 
    //!Returns a pointer to the node pool.
    //!Never throws
- node_pool_t* get_node_pool() const
+ void* get_node_pool() const
    { return detail::get_pointer(mp_node_pool); }
 
    //!Returns the segment manager.
    //!Never throws
    segment_manager* get_segment_manager()const
- { return mp_node_pool->get_segment_manager(); }
+ { return node_pool<0>::get(detail::get_pointer(mp_node_pool))->get_segment_manager(); }
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -154,28 +170,28 @@
 
    /// @cond
    private:
- node_pool_ptr mp_node_pool;
+ void_pointer mp_node_pool;
    /// @endcond
 };
 
 //!Equality test for same type
 //!of adaptive_pool_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc1,
- const adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NPC, std::size_t F, unsigned char OP> inline
+bool operator==(const adaptive_pool_base<V, T, S, NPC, F, OP> &alloc1,
+ const adaptive_pool_base<V, T, S, NPC, F, OP> &alloc2)
    { return alloc1.get_node_pool() == alloc2.get_node_pool(); }
 
 //!Inequality test for same type
 //!of adaptive_pool_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc1,
- const adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NPC, std::size_t F, unsigned char OP> inline
+bool operator!=(const adaptive_pool_base<V, T, S, NPC, F, OP> &alloc1,
+ const adaptive_pool_base<V, T, S, NPC, F, OP> &alloc2)
    { return alloc1.get_node_pool() != alloc2.get_node_pool(); }
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
- , std::size_t MaxFreeChunks = 2
+ , std::size_t NodesPerBlock = 64
+ , std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class adaptive_pool_v1
@@ -183,19 +199,19 @@
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
 {
    public:
    typedef detail::adaptive_pool_base
- < 1, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 1, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    adaptive_pool_v1(SegmentManager *segment_mngr)
@@ -204,7 +220,7 @@
 
    template<class T2>
    adaptive_pool_v1
- (const adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 };
@@ -220,17 +236,17 @@
 //!
 //!This node allocator shares a segregated storage between all instances
 //!of adaptive_pool with equal sizeof(T) placed in the same segment
-//!group. NodesPerChunk is the number of nodes allocated at once when the allocator
-//!needs runs out of nodes. MaxFreeChunks is the maximum number of totally free chunks
-//!that the adaptive node pool will hold. The rest of the totally free chunks will be
+//!group. NodesPerBlock is the number of nodes allocated at once when the allocator
+//!needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks
+//!that the adaptive node pool will hold. The rest of the totally free blocks will be
 //!deallocated with the segment manager.
 //!
 //!OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator:
 //!(memory usable for nodes / total memory allocated from the segment manager)
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class adaptive_pool
@@ -239,8 +255,8 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
    /// @endcond
@@ -248,14 +264,14 @@
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::adaptive_pool_base
- < 2, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 2, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
    public:
    typedef detail::version_type<adaptive_pool, 2> version;
 
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    adaptive_pool(SegmentManager *segment_mngr)
@@ -264,7 +280,7 @@
 
    template<class T2>
    adaptive_pool
- (const adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 
@@ -287,7 +303,7 @@
    template<class T2>
    struct rebind
    {
- typedef adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private:
@@ -299,7 +315,7 @@
 
    //!Not assignable from
    //!other adaptive_pool
- adaptive_pool& operator=(const adaptive_pool&);
+ //adaptive_pool& operator=(const adaptive_pool&);
 
    public:
    //!Constructor from a segment manager. If not present, constructs a node
@@ -316,7 +332,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    adaptive_pool
- (const adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other);
+ (const adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -324,7 +340,7 @@
 
    //!Returns a pointer to the node pool.
    //!Never throws
- node_pool_t* get_node_pool() const;
+ void* get_node_pool() const;
 
    //!Returns the segment manager.
    //!Never throws
@@ -342,9 +358,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -358,9 +374,9 @@
    //!Never throws
    const_pointer address(const_reference value) const;
 
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr);
+ //!Copy construct an object.
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v);
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -377,7 +393,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -386,11 +402,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -403,7 +419,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -416,7 +432,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -430,15 +446,15 @@
 
 //!Equality test for same type
 //!of adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: branches/release/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/allocator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -48,15 +48,17 @@
 template<class T, class SegmentManager>
 class allocator
 {
+ public:
+ //Segment manager
+ typedef SegmentManager segment_manager;
+ typedef typename SegmentManager::void_pointer void_pointer;
+
    /// @cond
    private:
 
    //Self type
    typedef allocator<T, SegmentManager> self_t;
 
- //Segment manager
- typedef SegmentManager segment_manager;
-
    //Pointer to void
    typedef typename segment_manager::void_pointer aux_pointer_t;
 
@@ -106,8 +108,6 @@
       <typename SegmentManager::
          multiallocation_chain
       , T> multiallocation_chain;
-// typedef typename SegmentManager::
-// multiallocation_chain multiallocation_chain;
 
    /// @endcond
 
@@ -153,7 +153,7 @@
    //!Deallocates memory previously allocated.
    //!Never throws
    void deallocate(const pointer &ptr, size_type)
- { mp_mngr->deallocate(detail::get_pointer(ptr)); }
+ { mp_mngr->deallocate((void*)detail::get_pointer(ptr)); }
 
    //!Returns the number of elements that could be allocated.
    //!Never throws
@@ -183,7 +183,7 @@
          (command, limit_size, preferred_size, received_size, detail::get_pointer(reuse));
    }
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -196,7 +196,7 @@
    }
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements)
    {
@@ -204,7 +204,7 @@
          (mp_mngr->allocate_many(elem_sizes, n_elements, sizeof(T)));
    }
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -219,7 +219,7 @@
    pointer allocate_one()
    { return this->allocate(1); }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -234,7 +234,7 @@
    void deallocate_one(const pointer &p)
    { return this->deallocate(p, 1); }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -253,10 +253,15 @@
    const_pointer address(const_reference value) const
    { return const_pointer(boost::addressof(value)); }
 
+ //!Copy construct an object
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v)
+ { new((void*)detail::get_pointer(ptr)) value_type(v); }
+
    //!Default construct an object.
    //!Throws if T's default constructor throws
    void construct(const pointer &ptr)
- { new(detail::get_pointer(ptr)) value_type; }
+ { new((void*)detail::get_pointer(ptr)) value_type; }
 
    //!Destroys object. Throws if object's
    //!destructor throws

Modified: branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/cached_adaptive_pool.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -21,6 +21,7 @@
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/allocators/detail/adaptive_node_pool.hpp>
 #include <boost/interprocess/allocators/detail/allocator_common.hpp>
+#include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/detail/version_type.hpp>
 #include <boost/interprocess/allocators/detail/node_tools.hpp>
@@ -38,8 +39,8 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
- , std::size_t MaxFreeChunks = 2
+ , std::size_t NodesPerBlock = 64
+ , std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class cached_adaptive_pool_v1
@@ -47,9 +48,9 @@
          < T
          , detail::shared_adaptive_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 1>
@@ -59,9 +60,9 @@
          < T
          , detail::shared_adaptive_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 1> base_t;
@@ -70,7 +71,7 @@
    struct rebind
    {
       typedef cached_adaptive_pool_v1
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    cached_adaptive_pool_v1(SegmentManager *segment_mngr,
@@ -81,7 +82,7 @@
    template<class T2>
    cached_adaptive_pool_v1
       (const cached_adaptive_pool_v1
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 };
@@ -100,17 +101,17 @@
 //!memory segment. But also caches some nodes privately to
 //!avoid some synchronization overhead.
 //!
-//!NodesPerChunk is the minimum number of nodes of nodes allocated at once when
-//!the allocator needs runs out of nodes. MaxFreeChunks is the maximum number of totally free chunks
-//!that the adaptive node pool will hold. The rest of the totally free chunks will be
+//!NodesPerBlock is the minimum number of nodes of nodes allocated at once when
+//!the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks
+//!that the adaptive node pool will hold. The rest of the totally free blocks will be
 //!deallocated with the segment manager.
 //!
 //!OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator:
 //!(memory usable for nodes / total memory allocated from the segment manager)
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class cached_adaptive_pool
@@ -119,9 +120,9 @@
          < T
          , detail::shared_adaptive_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 2>
@@ -134,9 +135,9 @@
          < T
          , detail::shared_adaptive_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ , MaxFreeBlocks
             , OverheadPercent
>
          , 2> base_t;
@@ -148,7 +149,7 @@
    struct rebind
    {
       typedef cached_adaptive_pool
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    cached_adaptive_pool(SegmentManager *segment_mngr,
@@ -158,7 +159,7 @@
 
    template<class T2>
    cached_adaptive_pool
- (const cached_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const cached_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 
@@ -181,7 +182,7 @@
    template<class T2>
    struct rebind
    {
- typedef cached_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef cached_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private:
@@ -210,7 +211,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    cached_adaptive_pool
- (const cached_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other);
+ (const cached_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -236,9 +237,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -252,9 +253,9 @@
    //!Never throws
    const_pointer address(const_reference value) const;
 
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr);
+ //!Copy construct an object.
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v);
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -271,7 +272,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -280,11 +281,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -297,7 +298,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -310,7 +311,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -331,15 +332,15 @@
 
 //!Equality test for same type
 //!of cached_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, std::size_t OP> inline
-bool operator==(const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, std::size_t OP> inline
+bool operator==(const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of cached_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, std::size_t OP> inline
-bool operator!=(const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const cached_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, std::size_t OP> inline
+bool operator!=(const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const cached_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: branches/release/boost/interprocess/allocators/cached_node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/cached_node_allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/cached_node_allocator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -22,6 +22,7 @@
 #include <boost/interprocess/allocators/detail/node_pool.hpp>
 #include <boost/interprocess/allocators/detail/allocator_common.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
+#include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/version_type.hpp>
 #include <boost/interprocess/allocators/detail/node_tools.hpp>
 #include <cstddef>
@@ -39,15 +40,15 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
+ , std::size_t NodesPerBlock = 64
>
 class cached_node_allocator_v1
    : public detail::cached_allocator_impl
          < T
          , detail::shared_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
+ , sizeof_value<T>::value
+ , NodesPerBlock
>
          , 1>
 {
@@ -56,8 +57,8 @@
          < T
          , detail::shared_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
+ , sizeof_value<T>::value
+ , NodesPerBlock
>
          , 1> base_t;
 
@@ -65,7 +66,7 @@
    struct rebind
    {
       typedef cached_node_allocator_v1
- <T2, SegmentManager, NodesPerChunk> other;
+ <T2, SegmentManager, NodesPerBlock> other;
    };
 
    cached_node_allocator_v1(SegmentManager *segment_mngr,
@@ -76,7 +77,7 @@
    template<class T2>
    cached_node_allocator_v1
       (const cached_node_allocator_v1
- <T2, SegmentManager, NodesPerChunk> &other)
+ <T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 };
@@ -87,7 +88,7 @@
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class cached_node_allocator
    /// @cond
@@ -95,8 +96,8 @@
          < T
          , detail::shared_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
+ , sizeof_value<T>::value
+ , NodesPerBlock
>
          , 2>
    /// @endcond
@@ -108,8 +109,8 @@
          < T
          , detail::shared_node_pool
             < SegmentManager
- , sizeof(T)
- , NodesPerChunk
+ , sizeof_value<T>::value
+ , NodesPerBlock
>
          , 2> base_t;
 
@@ -119,7 +120,7 @@
    template<class T2>
    struct rebind
    {
- typedef cached_node_allocator<T2, SegmentManager, NodesPerChunk> other;
+ typedef cached_node_allocator<T2, SegmentManager, NodesPerBlock> other;
    };
 
    cached_node_allocator(SegmentManager *segment_mngr,
@@ -129,7 +130,7 @@
 
    template<class T2>
    cached_node_allocator
- (const cached_node_allocator<T2, SegmentManager, NodesPerChunk> &other)
+ (const cached_node_allocator<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 
@@ -181,7 +182,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    cached_node_allocator
- (const cached_node_allocator<T2, SegmentManager, NodesPerChunk> &other);
+ (const cached_node_allocator<T2, SegmentManager, NodesPerBlock> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -207,9 +208,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -225,7 +226,7 @@
 
    //!Default construct an object.
    //!Throws if T's default constructor throws
- void construct(const pointer &ptr);
+ void construct(const pointer &ptr, const_reference v);
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -242,7 +243,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -251,11 +252,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -268,7 +269,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -281,7 +282,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -302,15 +303,15 @@
 
 //!Equality test for same type
 //!of cached_node_allocator
-template<class T, class S, std::size_t NodesPerChunk> inline
-bool operator==(const cached_node_allocator<T, S, NodesPerChunk> &alloc1,
- const cached_node_allocator<T, S, NodesPerChunk> &alloc2);
+template<class T, class S, std::size_t NPC> inline
+bool operator==(const cached_node_allocator<T, S, NPC> &alloc1,
+ const cached_node_allocator<T, S, NPC> &alloc2);
 
 //!Inequality test for same type
 //!of cached_node_allocator
-template<class T, class S, std::size_t NodesPerChunk> inline
-bool operator!=(const cached_node_allocator<T, S, NodesPerChunk> &alloc1,
- const cached_node_allocator<T, S, NodesPerChunk> &alloc2);
+template<class T, class S, std::size_t NPC> inline
+bool operator!=(const cached_node_allocator<T, S, NPC> &alloc1,
+ const cached_node_allocator<T, S, NPC> &alloc2);
 
 #endif
 

Modified: branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -49,7 +49,7 @@
    private_adaptive_node_pool_impl &operator=(const private_adaptive_node_pool_impl &);
 
    typedef typename SegmentManagerBase::void_pointer void_pointer;
-
+ static const std::size_t PayloadPerAllocation = SegmentManagerBase::PayloadPerAllocation;
    public:
    typedef typename node_slist<void_pointer>::node_t node_t;
    typedef typename node_slist<void_pointer>::node_slist_t free_nodes_t;
@@ -71,18 +71,18 @@
       std::size_t hdr_offset;
    };
 
- struct chunk_info_t
+ struct block_info_t
       :
          public hdr_offset_holder,
          public multiset_hook_t
    {
- //An intrusive list of free node from this chunk
+ //An intrusive list of free node from this block
       free_nodes_t free_nodes;
- friend bool operator <(const chunk_info_t &l, const chunk_info_t &r)
+ friend bool operator <(const block_info_t &l, const block_info_t &r)
       {
 // { return l.free_nodes.size() < r.free_nodes.size(); }
          //Let's order blocks first by free nodes and then by address
- //so that highest address fully free chunks are deallocated.
+ //so that highest address fully free blocks are deallocated.
          //This improves returning memory to the OS (trimming).
          const bool is_less = l.free_nodes.size() < r.free_nodes.size();
          const bool is_equal = l.free_nodes.size() == r.free_nodes.size();
@@ -90,11 +90,11 @@
       }
    };
    typedef typename bi::make_multiset
- <chunk_info_t, bi::base_hook<multiset_hook_t> >::type chunk_multiset_t;
- typedef typename chunk_multiset_t::iterator chunk_iterator;
+ <block_info_t, bi::base_hook<multiset_hook_t> >::type block_multiset_t;
+ typedef typename block_multiset_t::iterator block_iterator;
 
    static const std::size_t MaxAlign = alignment_of<node_t>::value;
- static const std::size_t HdrSize = ((sizeof(chunk_info_t)-1)/MaxAlign+1)*MaxAlign;
+ static const std::size_t HdrSize = ((sizeof(block_info_t)-1)/MaxAlign+1)*MaxAlign;
    static const std::size_t HdrOffsetSize = ((sizeof(hdr_offset_holder)-1)/MaxAlign+1)*MaxAlign;
    static std::size_t calculate_alignment
       (std::size_t overhead_percent, std::size_t real_node_size)
@@ -102,13 +102,15 @@
       //to-do: handle real_node_size != node_size
       const std::size_t divisor = overhead_percent*real_node_size;
       const std::size_t dividend = HdrOffsetSize*100;
- std::size_t elements_per_subchunk = (dividend - 1)/divisor + 1;
+ std::size_t elements_per_subblock = (dividend - 1)/divisor + 1;
       std::size_t candidate_power_of_2 =
- upper_power_of_2(elements_per_subchunk*real_node_size + HdrOffsetSize);
+ upper_power_of_2(elements_per_subblock*real_node_size + HdrOffsetSize);
       bool overhead_satisfied = false;
+ //Now calculate the wors-case overhead for a subblock
+ const std::size_t max_subblock_overhead = HdrSize + PayloadPerAllocation;
       while(!overhead_satisfied){
- elements_per_subchunk = (candidate_power_of_2 - HdrOffsetSize)/real_node_size;
- std::size_t overhead_size = candidate_power_of_2 - elements_per_subchunk*real_node_size;
+ elements_per_subblock = (candidate_power_of_2 - max_subblock_overhead)/real_node_size;
+ const std::size_t overhead_size = candidate_power_of_2 - elements_per_subblock*real_node_size;
          if(overhead_size*100/candidate_power_of_2 < overhead_percent){
             overhead_satisfied = true;
          }
@@ -119,18 +121,30 @@
       return candidate_power_of_2;
    }
 
- static void calculate_num_subchunks
- (std::size_t alignment, std::size_t real_node_size, std::size_t elements_per_chunk
- ,std::size_t &num_subchunks, std::size_t &real_num_node)
- {
- std::size_t elements_per_subchunk = (alignment - HdrOffsetSize)/real_node_size;
- std::size_t possible_num_subchunk = (elements_per_chunk - 1)/elements_per_subchunk + 1;
- std::size_t hdr_subchunk_elements = (alignment - HdrSize - SegmentManagerBase::PayloadPerAllocation)/real_node_size;
- while(((possible_num_subchunk-1)*elements_per_subchunk + hdr_subchunk_elements) < elements_per_chunk){
- ++possible_num_subchunk;
+ static void calculate_num_subblocks
+ (std::size_t alignment, std::size_t real_node_size, std::size_t elements_per_block
+ ,std::size_t &num_subblocks, std::size_t &real_num_node, std::size_t overhead_percent)
+ {
+ std::size_t elements_per_subblock = (alignment - HdrOffsetSize)/real_node_size;
+ std::size_t possible_num_subblock = (elements_per_block - 1)/elements_per_subblock + 1;
+ std::size_t hdr_subblock_elements = (alignment - HdrSize - PayloadPerAllocation)/real_node_size;
+ while(((possible_num_subblock-1)*elements_per_subblock + hdr_subblock_elements) < elements_per_block){
+ ++possible_num_subblock;
+ }
+ elements_per_subblock = (alignment - HdrOffsetSize)/real_node_size;
+ bool overhead_satisfied = false;
+ while(!overhead_satisfied){
+ const std::size_t total_data = (elements_per_subblock*(possible_num_subblock-1) + hdr_subblock_elements)*real_node_size;
+ const std::size_t total_size = alignment*possible_num_subblock;
+ if((total_size - total_data)*100/total_size < overhead_percent){
+ overhead_satisfied = true;
+ }
+ else{
+ ++possible_num_subblock;
+ }
       }
- num_subchunks = possible_num_subchunk;
- real_num_node = (possible_num_subchunk-1)*elements_per_subchunk + hdr_subchunk_elements;
+ num_subblocks = possible_num_subblock;
+ real_num_node = (possible_num_subblock-1)*elements_per_subblock + hdr_subblock_elements;
    }
 
    public:
@@ -140,27 +154,27 @@
    //!Constructor from a segment manager. Never throws
    private_adaptive_node_pool_impl
       ( segment_manager_base_type *segment_mngr_base, std::size_t node_size
- , std::size_t nodes_per_chunk, std::size_t max_free_chunks
+ , std::size_t nodes_per_block, std::size_t max_free_blocks
       , unsigned char overhead_percent
       )
- : m_max_free_chunks(max_free_chunks)
+ : m_max_free_blocks(max_free_blocks)
    , m_real_node_size(lcm(node_size, std::size_t(alignment_of<node_t>::value)))
    //Round the size to a power of two value.
    //This is the total memory size (including payload) that we want to
    //allocate from the general-purpose allocator
- , m_real_chunk_alignment(calculate_alignment(overhead_percent, m_real_node_size))
- //This is the real number of nodes per chunk
- , m_num_subchunks(0)
+ , m_real_block_alignment(calculate_alignment(overhead_percent, m_real_node_size))
+ //This is the real number of nodes per block
+ , m_num_subblocks(0)
    , m_real_num_node(0)
       //General purpose allocator
    , mp_segment_mngr_base(segment_mngr_base)
- , m_chunk_multiset()
- , m_totally_free_chunks(0)
+ , m_block_multiset()
+ , m_totally_free_blocks(0)
    {
- calculate_num_subchunks(m_real_chunk_alignment, m_real_node_size, nodes_per_chunk, m_num_subchunks, m_real_num_node);
+ calculate_num_subblocks(m_real_block_alignment, m_real_node_size, nodes_per_block, m_num_subblocks, m_real_num_node, overhead_percent);
    }
 
- //!Destructor. Deallocates all allocated chunks. Never throws
+ //!Destructor. Deallocates all allocated blocks. Never throws
    ~private_adaptive_node_pool_impl()
    { priv_clear(); }
 
@@ -176,8 +190,8 @@
    {
       priv_invariants();
       //If there are no free nodes we allocate a new block
- if (m_chunk_multiset.empty()){
- priv_alloc_chunk(1);
+ if (m_block_multiset.empty()){
+ priv_alloc_block(1);
       }
       //We take the first free node the multiset can't be empty
       return priv_take_first_node();
@@ -186,11 +200,11 @@
    //!Deallocates an array pointed by ptr. Never throws
    void deallocate_node(void *pElem)
    {
- this->priv_reinsert_nodes_in_chunk
+ this->priv_reinsert_nodes_in_block
          (multiallocation_iterator::create_simple_range(pElem));
- //Update free chunk count
- if(m_totally_free_chunks > m_max_free_chunks){
- this->priv_deallocate_free_chunks(m_max_free_chunks);
+ //Update free block count
+ if(m_totally_free_blocks > m_max_free_blocks){
+ this->priv_deallocate_free_blocks(m_max_free_blocks);
       }
       priv_invariants();
    }
@@ -201,17 +215,32 @@
    {
       try{
          priv_invariants();
- for(std::size_t i = 0; i != n; ++i){
- //If there are no free nodes we allocate all needed chunks
- if (m_chunk_multiset.empty()){
- priv_alloc_chunk(((n - i) - 1)/m_real_num_node + 1);
+ std::size_t i = 0;
+ while(i != n){
+ //If there are no free nodes we allocate all needed blocks
+ if (m_block_multiset.empty()){
+ priv_alloc_block(((n - i) - 1)/m_real_num_node + 1);
             }
- nodes.push_front(priv_take_first_node());
+ free_nodes_t &free_nodes = m_block_multiset.begin()->free_nodes;
+ const std::size_t free_nodes_count_before = free_nodes.size();
+ if(free_nodes_count_before == m_real_num_node){
+ --m_totally_free_blocks;
+ }
+ const std::size_t num_elems = ((n-i) < free_nodes_count_before) ? (n-i) : free_nodes_count_before;
+ for(std::size_t j = 0; j != num_elems; ++j){
+ void *new_node = &free_nodes.front();
+ free_nodes.pop_front();
+ nodes.push_back(new_node);
+ }
+
+ if(free_nodes.empty()){
+ m_block_multiset.erase(m_block_multiset.begin());
+ }
+ i += num_elems;
          }
       }
       catch(...){
          this->deallocate_nodes(nodes, nodes.size());
- this->priv_deallocate_free_chunks(m_max_free_chunks);
          throw;
       }
       priv_invariants();
@@ -245,20 +274,20 @@
    //!Deallocates the nodes pointed by the multiallocation iterator. Never throws
    void deallocate_nodes(multiallocation_iterator it)
    {
- this->priv_reinsert_nodes_in_chunk(it);
- if(m_totally_free_chunks > m_max_free_chunks){
- this->priv_deallocate_free_chunks(m_max_free_chunks);
+ this->priv_reinsert_nodes_in_block(it);
+ if(m_totally_free_blocks > m_max_free_blocks){
+ this->priv_deallocate_free_blocks(m_max_free_blocks);
       }
    }
 
- void deallocate_free_chunks()
- { this->priv_deallocate_free_chunks(0); }
+ void deallocate_free_blocks()
+ { this->priv_deallocate_free_blocks(0); }
 
    std::size_t num_free_nodes()
    {
- typedef typename chunk_multiset_t::const_iterator citerator;
+ typedef typename block_multiset_t::const_iterator citerator;
       std::size_t count = 0;
- citerator it (m_chunk_multiset.begin()), itend(m_chunk_multiset.end());
+ citerator it (m_block_multiset.begin()), itend(m_block_multiset.end());
       for(; it != itend; ++it){
          count += it->free_nodes.size();
       }
@@ -267,76 +296,80 @@
 
    void swap(private_adaptive_node_pool_impl &other)
    {
- assert(m_max_free_chunks == other.m_max_free_chunks);
+ assert(m_max_free_blocks == other.m_max_free_blocks);
       assert(m_real_node_size == other.m_real_node_size);
- assert(m_real_chunk_alignment == other.m_real_chunk_alignment);
+ assert(m_real_block_alignment == other.m_real_block_alignment);
       assert(m_real_num_node == other.m_real_num_node);
       std::swap(mp_segment_mngr_base, other.mp_segment_mngr_base);
- std::swap(m_totally_free_chunks, other.m_totally_free_chunks);
- m_chunk_multiset.swap(other.m_chunk_multiset);
+ std::swap(m_totally_free_blocks, other.m_totally_free_blocks);
+ m_block_multiset.swap(other.m_block_multiset);
    }
 
+ //Deprecated, use deallocate_free_blocks
+ void deallocate_free_chunks()
+ { this->priv_deallocate_free_blocks(0); }
+
    private:
- void priv_deallocate_free_chunks(std::size_t max_free_chunks)
+ void priv_deallocate_free_blocks(std::size_t max_free_blocks)
    {
       priv_invariants();
       //Now check if we've reached the free nodes limit
- //and check if we have free chunks. If so, deallocate as much
+ //and check if we have free blocks. If so, deallocate as much
       //as we can to stay below the limit
- for( chunk_iterator itend = m_chunk_multiset.end()
- ; m_totally_free_chunks > max_free_chunks
- ; --m_totally_free_chunks
+ for( block_iterator itend = m_block_multiset.end()
+ ; m_totally_free_blocks > max_free_blocks
+ ; --m_totally_free_blocks
          ){
- assert(!m_chunk_multiset.empty());
- chunk_iterator it = itend;
+ assert(!m_block_multiset.empty());
+ block_iterator it = itend;
          --it;
          std::size_t num_nodes = it->free_nodes.size();
          assert(num_nodes == m_real_num_node);
          (void)num_nodes;
- m_chunk_multiset.erase_and_dispose
- (it, chunk_destroyer(this));
+ m_block_multiset.erase_and_dispose
+ (it, block_destroyer(this));
       }
    }
 
- void priv_reinsert_nodes_in_chunk(multiallocation_iterator it)
+ void priv_reinsert_nodes_in_block(multiallocation_iterator it)
    {
       multiallocation_iterator itend;
- chunk_iterator chunk_it(m_chunk_multiset.end());
+ block_iterator block_it(m_block_multiset.end());
       while(it != itend){
          void *pElem = &*it;
          ++it;
          priv_invariants();
- chunk_info_t *chunk_info = this->priv_chunk_from_node(pElem);
- assert(chunk_info->free_nodes.size() < m_real_num_node);
+ block_info_t *block_info = this->priv_block_from_node(pElem);
+ assert(block_info->free_nodes.size() < m_real_num_node);
          //We put the node at the beginning of the free node list
          node_t * to_deallocate = static_cast<node_t*>(pElem);
- chunk_info->free_nodes.push_front(*to_deallocate);
+ block_info->free_nodes.push_front(*to_deallocate);
 
- chunk_iterator this_chunk(chunk_multiset_t::s_iterator_to(*chunk_info));
- chunk_iterator next_chunk(this_chunk);
- ++next_chunk;
+ block_iterator this_block(block_multiset_t::s_iterator_to(*block_info));
+ block_iterator next_block(this_block);
+ ++next_block;
 
- //Cache the free nodes from the chunk
- std::size_t this_chunk_free_nodes = this_chunk->free_nodes.size();
+ //Cache the free nodes from the block
+ std::size_t this_block_free_nodes = this_block->free_nodes.size();
 
- if(this_chunk_free_nodes == 1){
- m_chunk_multiset.insert(m_chunk_multiset.begin(), *chunk_info);
+ if(this_block_free_nodes == 1){
+ m_block_multiset.insert(m_block_multiset.begin(), *block_info);
          }
          else{
- chunk_iterator next_chunk(this_chunk);
- ++next_chunk;
- if(next_chunk != chunk_it){
- std::size_t next_free_nodes = next_chunk->free_nodes.size();
- if(this_chunk_free_nodes > next_free_nodes){
- //Now move the chunk to the new position
- m_chunk_multiset.erase(this_chunk);
- m_chunk_multiset.insert(*chunk_info);
+ block_iterator next_block(this_block);
+ ++next_block;
+ if(next_block != block_it){
+ std::size_t next_free_nodes = next_block->free_nodes.size();
+ if(this_block_free_nodes > next_free_nodes){
+ //Now move the block to the new position
+ m_block_multiset.erase(this_block);
+ m_block_multiset.insert(*block_info);
                }
             }
          }
- //Update free chunk count
- if(this_chunk_free_nodes == m_real_num_node){
- ++m_totally_free_chunks;
+ //Update free block count
+ if(this_block_free_nodes == m_real_num_node){
+ ++m_totally_free_blocks;
          }
          priv_invariants();
       }
@@ -344,40 +377,40 @@
 
    node_t *priv_take_first_node()
    {
- assert(m_chunk_multiset.begin() != m_chunk_multiset.end());
+ assert(m_block_multiset.begin() != m_block_multiset.end());
       //We take the first free node the multiset can't be empty
- free_nodes_t &free_nodes = m_chunk_multiset.begin()->free_nodes;
+ free_nodes_t &free_nodes = m_block_multiset.begin()->free_nodes;
       node_t *first_node = &free_nodes.front();
       const std::size_t free_nodes_count = free_nodes.size();
       assert(0 != free_nodes_count);
       free_nodes.pop_front();
       if(free_nodes_count == 1){
- m_chunk_multiset.erase(m_chunk_multiset.begin());
+ m_block_multiset.erase(m_block_multiset.begin());
       }
       else if(free_nodes_count == m_real_num_node){
- --m_totally_free_chunks;
+ --m_totally_free_blocks;
       }
       priv_invariants();
       return first_node;
    }
 
- class chunk_destroyer;
- friend class chunk_destroyer;
+ class block_destroyer;
+ friend class block_destroyer;
 
- class chunk_destroyer
+ class block_destroyer
    {
       public:
- chunk_destroyer(const private_adaptive_node_pool_impl *impl)
+ block_destroyer(const private_adaptive_node_pool_impl *impl)
          : mp_impl(impl)
       {}
 
- void operator()(typename chunk_multiset_t::pointer to_deallocate)
+ void operator()(typename block_multiset_t::pointer to_deallocate)
       {
          std::size_t free_nodes = to_deallocate->free_nodes.size();
          (void)free_nodes;
          assert(free_nodes == mp_impl->m_real_num_node);
          assert(0 == to_deallocate->hdr_offset);
- hdr_offset_holder *hdr_off_holder = mp_impl->priv_first_subchunk_from_chunk((chunk_info_t*)detail::get_pointer(to_deallocate));
+ hdr_offset_holder *hdr_off_holder = mp_impl->priv_first_subblock_from_block((block_info_t*)detail::get_pointer(to_deallocate));
          mp_impl->mp_segment_mngr_base->deallocate(hdr_off_holder);
       }
       const private_adaptive_node_pool_impl *mp_impl;
@@ -389,12 +422,12 @@
    #ifdef BOOST_INTERPROCESS_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
    #undef BOOST_INTERPROCESS_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
    {
- //We iterate through the chunk list to free the memory
- chunk_iterator it(m_chunk_multiset.begin()),
- itend(m_chunk_multiset.end()), to_deallocate;
+ //We iterate through the block list to free the memory
+ block_iterator it(m_block_multiset.begin()),
+ itend(m_block_multiset.end()), to_deallocate;
       if(it != itend){
          for(++it; it != itend; ++it){
- chunk_iterator prev(it);
+ block_iterator prev(it);
             --prev;
             std::size_t sp = prev->free_nodes.size(),
                         si = it->free_nodes.size();
@@ -405,35 +438,35 @@
 
       {
          //Check that the total free nodes are correct
- it = m_chunk_multiset.begin();
- itend = m_chunk_multiset.end();
+ it = m_block_multiset.begin();
+ itend = m_block_multiset.end();
          std::size_t total_free_nodes = 0;
          for(; it != itend; ++it){
             total_free_nodes += it->free_nodes.size();
          }
- assert(total_free_nodes >= m_totally_free_chunks*m_real_num_node);
+ assert(total_free_nodes >= m_totally_free_blocks*m_real_num_node);
       }
 
       {
- //Check that the total totally free chunks are correct
- it = m_chunk_multiset.begin();
- itend = m_chunk_multiset.end();
- std::size_t total_free_chunks = 0;
+ //Check that the total totally free blocks are correct
+ it = m_block_multiset.begin();
+ itend = m_block_multiset.end();
+ std::size_t total_free_blocks = 0;
          for(; it != itend; ++it){
- total_free_chunks += (it->free_nodes.size() == m_real_num_node);
+ total_free_blocks += (it->free_nodes.size() == m_real_num_node);
          }
- assert(total_free_chunks == m_totally_free_chunks);
+ assert(total_free_blocks == m_totally_free_blocks);
       }
       {
       //Check that header offsets are correct
- it = m_chunk_multiset.begin();
+ it = m_block_multiset.begin();
       for(; it != itend; ++it){
- hdr_offset_holder *hdr_off_holder = priv_first_subchunk_from_chunk(&*it);
- for(std::size_t i = 0, max = m_num_subchunks; i < max; ++i){
+ hdr_offset_holder *hdr_off_holder = priv_first_subblock_from_block(&*it);
+ for(std::size_t i = 0, max = m_num_subblocks; i < max; ++i){
             assert(hdr_off_holder->hdr_offset == std::size_t((char*)&*it- (char*)hdr_off_holder));
- assert(0 == ((std::size_t)hdr_off_holder & (m_real_chunk_alignment - 1)));
- assert(0 == (hdr_off_holder->hdr_offset & (m_real_chunk_alignment - 1)));
- hdr_off_holder = (hdr_offset_holder *)((char*)hdr_off_holder + m_real_chunk_alignment);
+ assert(0 == ((std::size_t)hdr_off_holder & (m_real_block_alignment - 1)));
+ assert(0 == (hdr_off_holder->hdr_offset & (m_real_block_alignment - 1)));
+ hdr_off_holder = (hdr_offset_holder *)((char*)hdr_off_holder + m_real_block_alignment);
          }
       }
       }
@@ -446,72 +479,72 @@
    void priv_clear()
    {
       #ifndef NDEBUG
- chunk_iterator it = m_chunk_multiset.begin();
- chunk_iterator itend = m_chunk_multiset.end();
+ block_iterator it = m_block_multiset.begin();
+ block_iterator itend = m_block_multiset.end();
       std::size_t num_free_nodes = 0;
       for(; it != itend; ++it){
          //Check for memory leak
          assert(it->free_nodes.size() == m_real_num_node);
          ++num_free_nodes;
       }
- assert(num_free_nodes == m_totally_free_chunks);
+ assert(num_free_nodes == m_totally_free_blocks);
       #endif
       priv_invariants();
- m_chunk_multiset.clear_and_dispose
- (chunk_destroyer(this));
- m_totally_free_chunks = 0;
+ m_block_multiset.clear_and_dispose
+ (block_destroyer(this));
+ m_totally_free_blocks = 0;
    }
 
- chunk_info_t *priv_chunk_from_node(void *node) const
+ block_info_t *priv_block_from_node(void *node) const
    {
       hdr_offset_holder *hdr_off_holder =
- (hdr_offset_holder*)((std::size_t)node & std::size_t(~(m_real_chunk_alignment - 1)));
- assert(0 == ((std::size_t)hdr_off_holder & (m_real_chunk_alignment - 1)));
- assert(0 == (hdr_off_holder->hdr_offset & (m_real_chunk_alignment - 1)));
- chunk_info_t *chunk = (chunk_info_t *)(((char*)hdr_off_holder) + hdr_off_holder->hdr_offset);
- assert(chunk->hdr_offset == 0);
- return chunk;
+ (hdr_offset_holder*)((std::size_t)node & std::size_t(~(m_real_block_alignment - 1)));
+ assert(0 == ((std::size_t)hdr_off_holder & (m_real_block_alignment - 1)));
+ assert(0 == (hdr_off_holder->hdr_offset & (m_real_block_alignment - 1)));
+ block_info_t *block = (block_info_t *)(((char*)hdr_off_holder) + hdr_off_holder->hdr_offset);
+ assert(block->hdr_offset == 0);
+ return block;
    }
 
- hdr_offset_holder *priv_first_subchunk_from_chunk(chunk_info_t *chunk) const
+ hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block) const
    {
       hdr_offset_holder *hdr_off_holder = (hdr_offset_holder*)
- (((char*)chunk) - (m_num_subchunks-1)*m_real_chunk_alignment);
- assert(hdr_off_holder->hdr_offset == std::size_t((char*)chunk - (char*)hdr_off_holder));
- assert(0 == ((std::size_t)hdr_off_holder & (m_real_chunk_alignment - 1)));
- assert(0 == (hdr_off_holder->hdr_offset & (m_real_chunk_alignment - 1)));
+ (((char*)block) - (m_num_subblocks-1)*m_real_block_alignment);
+ assert(hdr_off_holder->hdr_offset == std::size_t((char*)block - (char*)hdr_off_holder));
+ assert(0 == ((std::size_t)hdr_off_holder & (m_real_block_alignment - 1)));
+ assert(0 == (hdr_off_holder->hdr_offset & (m_real_block_alignment - 1)));
       return hdr_off_holder;
    }
 
- //!Allocates a several chunks of nodes. Can throw boost::interprocess::bad_alloc
- void priv_alloc_chunk(std::size_t n)
+ //!Allocates a several blocks of nodes. Can throw boost::interprocess::bad_alloc
+ void priv_alloc_block(std::size_t n)
    {
- std::size_t real_chunk_size = m_real_chunk_alignment*m_num_subchunks - SegmentManagerBase::PayloadPerAllocation;
- std::size_t elements_per_subchunk = (m_real_chunk_alignment - HdrOffsetSize)/m_real_node_size;
- std::size_t hdr_subchunk_elements = (m_real_chunk_alignment - HdrSize - SegmentManagerBase::PayloadPerAllocation)/m_real_node_size;
+ std::size_t real_block_size = m_real_block_alignment*m_num_subblocks - SegmentManagerBase::PayloadPerAllocation;
+ std::size_t elements_per_subblock = (m_real_block_alignment - HdrOffsetSize)/m_real_node_size;
+ std::size_t hdr_subblock_elements = (m_real_block_alignment - HdrSize - SegmentManagerBase::PayloadPerAllocation)/m_real_node_size;
 
       for(std::size_t i = 0; i != n; ++i){
          //We allocate a new NodeBlock and put it the last
          //element of the tree
          char *mem_address = detail::char_ptr_cast
- (mp_segment_mngr_base->allocate_aligned(real_chunk_size, m_real_chunk_alignment));
+ (mp_segment_mngr_base->allocate_aligned(real_block_size, m_real_block_alignment));
          if(!mem_address) throw std::bad_alloc();
- ++m_totally_free_chunks;
+ ++m_totally_free_blocks;
 
- //First initialize header information on the last subchunk
- char *hdr_addr = mem_address + m_real_chunk_alignment*(m_num_subchunks-1);
- chunk_info_t *c_info = new(hdr_addr)chunk_info_t;
+ //First initialize header information on the last subblock
+ char *hdr_addr = mem_address + m_real_block_alignment*(m_num_subblocks-1);
+ block_info_t *c_info = new(hdr_addr)block_info_t;
          //Some structural checks
          assert(static_cast<void*>(&static_cast<hdr_offset_holder*>(c_info)->hdr_offset) ==
                 static_cast<void*>(c_info));
          typename free_nodes_t::iterator prev_insert_pos = c_info->free_nodes.before_begin();
- for( std::size_t subchunk = 0, maxsubchunk = m_num_subchunks - 1
- ; subchunk < maxsubchunk
- ; ++subchunk, mem_address += m_real_chunk_alignment){
+ for( std::size_t subblock = 0, maxsubblock = m_num_subblocks - 1
+ ; subblock < maxsubblock
+ ; ++subblock, mem_address += m_real_block_alignment){
             //Initialize header offset mark
             new(mem_address) hdr_offset_holder(std::size_t(hdr_addr - mem_address));
             char *pNode = mem_address + HdrOffsetSize;
- for(std::size_t i = 0; i < elements_per_subchunk; ++i){
+ for(std::size_t i = 0; i < elements_per_subblock; ++i){
                prev_insert_pos = c_info->free_nodes.insert_after(prev_insert_pos, *new (pNode) node_t);
                pNode += m_real_node_size;
             }
@@ -520,13 +553,13 @@
             char *pNode = hdr_addr + HdrSize;
             //We initialize all Nodes in Node Block to insert
             //them in the free Node list
- for(std::size_t i = 0; i < hdr_subchunk_elements; ++i){
+ for(std::size_t i = 0; i < hdr_subblock_elements; ++i){
                prev_insert_pos = c_info->free_nodes.insert_after(prev_insert_pos, *new (pNode) node_t);
                pNode += m_real_node_size;
             }
          }
- //Insert the chunk after the free node list is full
- m_chunk_multiset.insert(m_chunk_multiset.end(), *c_info);
+ //Insert the block after the free node list is full
+ m_block_multiset.insert(m_block_multiset.end(), *c_info);
       }
    }
 
@@ -534,25 +567,25 @@
    typedef typename pointer_to_other
       <void_pointer, segment_manager_base_type>::type segment_mngr_base_ptr_t;
 
- const std::size_t m_max_free_chunks;
+ const std::size_t m_max_free_blocks;
    const std::size_t m_real_node_size;
    //Round the size to a power of two value.
    //This is the total memory size (including payload) that we want to
    //allocate from the general-purpose allocator
- const std::size_t m_real_chunk_alignment;
- std::size_t m_num_subchunks;
- //This is the real number of nodes per chunk
+ const std::size_t m_real_block_alignment;
+ std::size_t m_num_subblocks;
+ //This is the real number of nodes per block
    //const
    std::size_t m_real_num_node;
    segment_mngr_base_ptr_t mp_segment_mngr_base;//Segment manager
- chunk_multiset_t m_chunk_multiset; //Intrusive chunk list
- std::size_t m_totally_free_chunks; //Free chunks
+ block_multiset_t m_block_multiset; //Intrusive block list
+ std::size_t m_totally_free_blocks; //Free blocks
 };
 
 template< class SegmentManager
         , std::size_t NodeSize
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
         , unsigned char OverheadPercent
>
 class private_adaptive_node_pool
@@ -569,11 +602,14 @@
    public:
    typedef SegmentManager segment_manager;
 
- static const std::size_t nodes_per_chunk = NodesPerChunk;
+ static const std::size_t nodes_per_block = NodesPerBlock;
+
+ //Deprecated, use node_per_block
+ static const std::size_t nodes_per_chunk = NodesPerBlock;
 
    //!Constructor from a segment manager. Never throws
    private_adaptive_node_pool(segment_manager *segment_mngr)
- : base_t(segment_mngr, NodeSize, NodesPerChunk, MaxFreeChunks, OverheadPercent)
+ : base_t(segment_mngr, NodeSize, NodesPerBlock, MaxFreeBlocks, OverheadPercent)
    {}
 
    //!Returns the segment manager. Never throws
@@ -584,22 +620,22 @@
 //!Pooled shared memory allocator using adaptive pool. Includes
 //!a reference count but the class does not delete itself, this is
 //!responsibility of user classes. Node size (NodeSize) and the number of
-//!nodes allocated per chunk (NodesPerChunk) are known at compile time
+//!nodes allocated per block (NodesPerBlock) are known at compile time
 template< class SegmentManager
         , std::size_t NodeSize
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
         , unsigned char OverheadPercent
>
 class shared_adaptive_node_pool
    : public detail::shared_pool_impl
       < private_adaptive_node_pool
- <SegmentManager, NodeSize, NodesPerChunk, MaxFreeChunks, OverheadPercent>
+ <SegmentManager, NodeSize, NodesPerBlock, MaxFreeBlocks, OverheadPercent>
>
 {
    typedef detail::shared_pool_impl
       < private_adaptive_node_pool
- <SegmentManager, NodeSize, NodesPerChunk, MaxFreeChunks, OverheadPercent>
+ <SegmentManager, NodeSize, NodesPerBlock, MaxFreeBlocks, OverheadPercent>
> base_t;
    public:
    shared_adaptive_node_pool(SegmentManager *segment_mgnr)

Modified: branches/release/boost/interprocess/allocators/detail/allocator_common.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/allocator_common.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/allocator_common.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -294,7 +294,7 @@
          (command, limit_size, preferred_size, received_size, detail::get_pointer(reuse));
    }
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -307,7 +307,7 @@
    }
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements)
    {
@@ -315,7 +315,7 @@
          (this->derived()->get_segment_manager()->allocate_many(elem_sizes, n_elements, sizeof(T)));
    }
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -342,7 +342,12 @@
    //!Default construct an object.
    //!Throws if T's default constructor throws
    void construct(const pointer &ptr)
- { new(detail::get_pointer(ptr)) value_type; }
+ { new((void*)detail::get_pointer(ptr)) value_type; }
+
+ //!Copy construct an object
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v)
+ { new((void*)detail::get_pointer(ptr)) value_type(v); }
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -386,64 +391,94 @@
    typedef typename SegmentManager::
       multiallocation_chain multiallocation_chain;
 
+ template <int Dummy>
+ struct node_pool
+ {
+ typedef typename Derived::template node_pool<0>::type type;
+ static type *get(void *p)
+ { return static_cast<type*>(p); }
+ };
+
    public:
    //!Allocate memory for an array of count elements.
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate(size_type count, cvoid_pointer hint = 0)
    {
       (void)hint;
+ typedef typename node_pool<0>::type node_pool_t;
+ node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
       if(count > this->max_size())
          throw bad_alloc();
       else if(Version == 1 && count == 1)
- return pointer(static_cast<value_type*>(this->derived()->get_node_pool()->allocate_node()));
+ return pointer(static_cast<value_type*>
+ (pool->allocate_node()));
       else
          return pointer(static_cast<value_type*>
- (this->derived()->get_node_pool()->get_segment_manager()->allocate(sizeof(T)*count)));
+ (pool->get_segment_manager()->allocate(sizeof(T)*count)));
    }
 
    //!Deallocate allocated memory. Never throws
    void deallocate(const pointer &ptr, size_type count)
    {
       (void)count;
+ typedef typename node_pool<0>::type node_pool_t;
+ node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
       if(Version == 1 && count == 1)
- this->derived()->get_node_pool()->deallocate_node(detail::get_pointer(ptr));
+ pool->deallocate_node(detail::get_pointer(ptr));
       else
- this->derived()->get_node_pool()->get_segment_manager()->deallocate(detail::get_pointer(ptr));
+ pool->get_segment_manager()->deallocate((void*)detail::get_pointer(ptr));
    }
 
    //!Allocates just one object. Memory allocated with this function
    //!must be deallocated only with deallocate_one().
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one()
- { return pointer(static_cast<value_type*>(this->derived()->get_node_pool()->allocate_node())); }
+ {
+ typedef typename node_pool<0>::type node_pool_t;
+ node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
+ return pointer(static_cast<value_type*>(pool->allocate_node()));
+ }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
    //!will be assigned to received_size. Memory allocated with this function
    //!must be deallocated only with deallocate_one().
    multiallocation_iterator allocate_individual(std::size_t num_elements)
- { return multiallocation_iterator(this->derived()->get_node_pool()->allocate_nodes(num_elements)); }
+ {
+ typedef typename node_pool<0>::type node_pool_t;
+ node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
+ return multiallocation_iterator(pool->allocate_nodes(num_elements));
+ }
 
    //!Deallocates memory previously allocated with allocate_one().
    //!You should never use deallocate_one to deallocate memory allocated
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p)
- { this->derived()->get_node_pool()->deallocate_node(detail::get_pointer(p)); }
+ {
+ typedef typename node_pool<0>::type node_pool_t;
+ node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
+ pool->deallocate_node(detail::get_pointer(p));
+ }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
    //!will be assigned to received_size. Memory allocated with this function
    //!must be deallocated only with deallocate_one().
    void deallocate_individual(multiallocation_iterator it)
- { this->derived()->get_node_pool()->deallocate_nodes(it.base()); }
+ { node_pool<0>::get(this->derived()->get_node_pool())->deallocate_nodes(it.base()); }
 
- //!Deallocates all free chunks of the pool
+ //!Deallocates all free blocks of the pool
+ void deallocate_free_blocks()
+ { node_pool<0>::get(this->derived()->get_node_pool())->deallocate_free_blocks(); }
+
+ //!Deprecated, use deallocate_free_blocks.
+ //!Deallocates all free chunks of the pool.
    void deallocate_free_chunks()
- { this->derived()->get_node_pool()->deallocate_free_chunks(); }
+ { node_pool<0>::get(this->derived()->get_node_pool())->deallocate_free_blocks(); }
 };
 
 template<class T, class NodePool, unsigned int Version>
@@ -536,7 +571,7 @@
          m_cache.cached_deallocation(detail::get_pointer(ptr));
       }
       else{
- this->get_segment_manager()->deallocate(detail::get_pointer(ptr));
+ this->get_segment_manager()->deallocate((void*)detail::get_pointer(ptr));
       }
    }
 
@@ -546,7 +581,7 @@
    pointer allocate_one()
    { return pointer(static_cast<value_type*>(this->m_cache.cached_allocation())); }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -561,7 +596,7 @@
    void deallocate_one(const pointer &p)
    { this->m_cache.cached_deallocation(detail::get_pointer(p)); }
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -570,9 +605,9 @@
    void deallocate_individual(multiallocation_iterator it)
    { m_cache.cached_deallocation(it.base()); }
 
- //!Deallocates all free chunks of the pool
- void deallocate_free_chunks()
- { m_cache.get_node_pool()->deallocate_free_chunks(); }
+ //!Deallocates all free blocks of the pool
+ void deallocate_free_blocks()
+ { m_cache.get_node_pool()->deallocate_free_blocks(); }
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different shared memory segments, the result is undefined.
@@ -586,6 +621,10 @@
    void deallocate_cache()
    { m_cache.deallocate_all_cached_nodes(); }
 
+ //!Deprecated use deallocate_free_blocks.
+ void deallocate_free_chunks()
+ { m_cache.get_node_pool()->deallocate_free_blocks(); }
+
    /// @cond
    private:
    cache_impl<node_pool_t> m_cache;
@@ -609,7 +648,7 @@
 //!Pooled shared memory allocator using adaptive pool. Includes
 //!a reference count but the class does not delete itself, this is
 //!responsibility of user classes. Node size (NodeSize) and the number of
-//!nodes allocated per chunk (NodesPerChunk) are known at compile time
+//!nodes allocated per block (NodesPerBlock) are known at compile time
 template<class private_node_allocator_t>
 class shared_pool_impl
    : public private_node_allocator_t
@@ -631,7 +670,7 @@
       : private_node_allocator_t(segment_mngr)
    {}
 
- //!Destructor. Deallocates all allocated chunks. Never throws
+ //!Destructor. Deallocates all allocated blocks. Never throws
    ~shared_pool_impl()
    {}
 
@@ -700,24 +739,24 @@
       private_node_allocator_t::deallocate_nodes(it);
    }
 
- //!Deallocates all the free chunks of memory. Never throws
- void deallocate_free_chunks()
+ //!Deallocates all the free blocks of memory. Never throws
+ void deallocate_free_blocks()
    {
       //-----------------------
       boost::interprocess::scoped_lock<mutex_type> guard(m_header);
       //-----------------------
- private_node_allocator_t::deallocate_free_chunks();
+ private_node_allocator_t::deallocate_free_blocks();
    }
 
    //!Deallocates all used memory from the common pool.
    //!Precondition: all nodes allocated from this pool should
    //!already be deallocated. Otherwise, undefined behavior. Never throws
- void purge_chunks()
+ void purge_blocks()
    {
       //-----------------------
       boost::interprocess::scoped_lock<mutex_type> guard(m_header);
       //-----------------------
- private_node_allocator_t::purge_chunks();
+ private_node_allocator_t::purge_blocks();
    }
 
    //!Increments internal reference count and returns new count. Never throws
@@ -739,6 +778,24 @@
       return --m_header.m_usecount;
    }
 
+ //!Deprecated, use deallocate_free_blocks.
+ void deallocate_free_chunks()
+ {
+ //-----------------------
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
+ //-----------------------
+ private_node_allocator_t::deallocate_free_blocks();
+ }
+
+ //!Deprecated, use purge_blocks.
+ void purge_chunks()
+ {
+ //-----------------------
+ boost::interprocess::scoped_lock<mutex_type> guard(m_header);
+ //-----------------------
+ private_node_allocator_t::purge_blocks();
+ }
+
    private:
    //!This struct includes needed data and derives from
    //!interprocess_mutex to allow EBO when using null_mutex

Modified: branches/release/boost/interprocess/allocators/detail/node_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/node_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/detail/node_pool.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -60,30 +60,30 @@
    typedef typename bi::make_slist
       < node_t, bi::base_hook<slist_hook_t>
       , bi::linear<true>
- , bi::constant_time_size<false> >::type chunkslist_t;
+ , bi::constant_time_size<false> >::type blockslist_t;
    public:
 
    //!Segment manager typedef
    typedef SegmentManagerBase segment_manager_base_type;
 
    //!Constructor from a segment manager. Never throws
- private_node_pool_impl(segment_manager_base_type *segment_mngr_base, std::size_t node_size, std::size_t nodes_per_chunk)
- : m_nodes_per_chunk(nodes_per_chunk)
+ private_node_pool_impl(segment_manager_base_type *segment_mngr_base, std::size_t node_size, std::size_t nodes_per_block)
+ : m_nodes_per_block(nodes_per_block)
    , m_real_node_size(detail::lcm(node_size, std::size_t(alignment_of<node_t>::value)))
       //General purpose allocator
    , mp_segment_mngr_base(segment_mngr_base)
- , m_chunklist()
+ , m_blocklist()
    , m_freelist()
       //Debug node count
    , m_allocated(0)
    {}
 
- //!Destructor. Deallocates all allocated chunks. Never throws
+ //!Destructor. Deallocates all allocated blocks. Never throws
    ~private_node_pool_impl()
- { this->purge_chunks(); }
+ { this->purge_blocks(); }
 
    std::size_t get_real_num_node() const
- { return m_nodes_per_chunk; }
+ { return m_nodes_per_block; }
 
    //!Returns the segment manager. Never throws
    segment_manager_base_type* get_segment_manager_base()const
@@ -94,7 +94,7 @@
    {
       //If there are no free nodes we allocate a new block
       if (m_freelist.empty())
- priv_alloc_chunk();
+ priv_alloc_block();
       //We take the first free node
       node_t *n = (node_t*)&m_freelist.front();
       m_freelist.pop_front();
@@ -173,36 +173,36 @@
       }
    }
 
- //!Deallocates all the free chunks of memory. Never throws
- void deallocate_free_chunks()
+ //!Deallocates all the free blocks of memory. Never throws
+ void deallocate_free_blocks()
    {
       typedef typename free_nodes_t::iterator nodelist_iterator;
- typename chunkslist_t::iterator bit(m_chunklist.before_begin()),
- it(m_chunklist.begin()),
- itend(m_chunklist.end());
+ typename blockslist_t::iterator bit(m_blocklist.before_begin()),
+ it(m_blocklist.begin()),
+ itend(m_blocklist.end());
       free_nodes_t backup_list;
       nodelist_iterator backup_list_last = backup_list.before_begin();
 
       //Execute the algorithm and get an iterator to the last value
       std::size_t blocksize = detail::get_rounded_size
- (m_real_node_size*m_nodes_per_chunk, alignment_of<node_t>::value);
+ (m_real_node_size*m_nodes_per_block, alignment_of<node_t>::value);
 
       while(it != itend){
- //Collect all the nodes from the chunk pointed by it
+ //Collect all the nodes from the block pointed by it
          //and push them in the list
          free_nodes_t free_nodes;
          nodelist_iterator last_it = free_nodes.before_begin();
- const void *addr = get_chunk_from_hook(&*it, blocksize);
+ const void *addr = get_block_from_hook(&*it, blocksize);
 
          m_freelist.remove_and_dispose_if
             (is_between(addr, blocksize), push_in_list(free_nodes, last_it));
 
- //If the number of nodes is equal to m_nodes_per_chunk
+ //If the number of nodes is equal to m_nodes_per_block
          //this means that the block can be deallocated
- if(free_nodes.size() == m_nodes_per_chunk){
+ if(free_nodes.size() == m_nodes_per_block){
             //Unlink the nodes
             free_nodes.clear();
- it = m_chunklist.erase_after(bit);
+ it = m_blocklist.erase_after(bit);
             mp_segment_mngr_base->deallocate((void*)addr);
          }
          //Otherwise, insert them in the backup list, since the
@@ -240,20 +240,20 @@
 
    //!Deallocates all used memory. Precondition: all nodes allocated from this pool should
    //!already be deallocated. Otherwise, undefined behaviour. Never throws
- void purge_chunks()
+ void purge_blocks()
    {
       //check for memory leaks
       assert(m_allocated==0);
       std::size_t blocksize = detail::get_rounded_size
- (m_real_node_size*m_nodes_per_chunk, alignment_of<node_t>::value);
- typename chunkslist_t::iterator
- it(m_chunklist.begin()), itend(m_chunklist.end()), aux;
+ (m_real_node_size*m_nodes_per_block, alignment_of<node_t>::value);
+ typename blockslist_t::iterator
+ it(m_blocklist.begin()), itend(m_blocklist.end()), aux;
 
       //We iterate though the NodeBlock list to free the memory
- while(!m_chunklist.empty()){
- void *addr = get_chunk_from_hook(&m_chunklist.front(), blocksize);
- m_chunklist.pop_front();
- mp_segment_mngr_base->deallocate(addr);
+ while(!m_blocklist.empty()){
+ void *addr = get_block_from_hook(&m_blocklist.front(), blocksize);
+ m_blocklist.pop_front();
+ mp_segment_mngr_base->deallocate((void*)addr);
       }
       //Just clear free node list
       m_freelist.clear();
@@ -262,7 +262,7 @@
    void swap(private_node_pool_impl &other)
    {
       std::swap(mp_segment_mngr_base, other.mp_segment_mngr_base);
- m_chunklist.swap(other.m_chunklist);
+ m_blocklist.swap(other.m_blocklist);
       m_freelist.swap(other.m_freelist);
       std::swap(m_allocated, other.m_allocated);
    }
@@ -305,36 +305,44 @@
       const char * end_;
    };
 
- //!Allocates a chunk of nodes. Can throw boost::interprocess::bad_alloc
- void priv_alloc_chunk()
+ //!Allocates a block of nodes. Can throw boost::interprocess::bad_alloc
+ void priv_alloc_block()
    {
       //We allocate a new NodeBlock and put it as first
       //element in the free Node list
       std::size_t blocksize =
- detail::get_rounded_size(m_real_node_size*m_nodes_per_chunk, alignment_of<node_t>::value);
+ detail::get_rounded_size(m_real_node_size*m_nodes_per_block, alignment_of<node_t>::value);
       char *pNode = detail::char_ptr_cast
          (mp_segment_mngr_base->allocate(blocksize + sizeof(node_t)));
       if(!pNode) throw bad_alloc();
       char *pBlock = pNode;
- m_chunklist.push_front(get_chunk_hook(pBlock, blocksize));
+ m_blocklist.push_front(get_block_hook(pBlock, blocksize));
 
       //We initialize all Nodes in Node Block to insert
       //them in the free Node list
- for(std::size_t i = 0; i < m_nodes_per_chunk; ++i, pNode += m_real_node_size){
+ for(std::size_t i = 0; i < m_nodes_per_block; ++i, pNode += m_real_node_size){
          m_freelist.push_front(*new (pNode) node_t);
       }
    }
 
+ //!Deprecated, use deallocate_free_blocks
+ void deallocate_free_chunks()
+ { this->deallocate_free_blocks(); }
+
+ //!Deprecated, use purge_blocks
+ void purge_chunks()
+ { this->purge_blocks(); }
+
    private:
- //!Returns a reference to the chunk hook placed in the end of the chunk
- static inline node_t & get_chunk_hook (void *chunk, std::size_t blocksize)
+ //!Returns a reference to the block hook placed in the end of the block
+ static inline node_t & get_block_hook (void *block, std::size_t blocksize)
    {
       return *static_cast<node_t*>(
- static_cast<void*>((detail::char_ptr_cast(chunk) + blocksize)));
+ static_cast<void*>((detail::char_ptr_cast(block) + blocksize)));
    }
 
- //!Returns the starting address of the chunk reference to the chunk hook placed in the end of the chunk
- inline void *get_chunk_from_hook (node_t *hook, std::size_t blocksize)
+ //!Returns the starting address of the block reference to the block hook placed in the end of the block
+ inline void *get_block_from_hook (node_t *hook, std::size_t blocksize)
    {
       return static_cast<void*>((detail::char_ptr_cast(hook) - blocksize));
    }
@@ -343,10 +351,10 @@
    typedef typename pointer_to_other
       <void_pointer, segment_manager_base_type>::type segment_mngr_base_ptr_t;
 
- const std::size_t m_nodes_per_chunk;
+ const std::size_t m_nodes_per_block;
    const std::size_t m_real_node_size;
    segment_mngr_base_ptr_t mp_segment_mngr_base; //Segment manager
- chunkslist_t m_chunklist; //Intrusive container of chunks
+ blockslist_t m_blocklist; //Intrusive container of blocks
    free_nodes_t m_freelist; //Intrusive container of free nods
    std::size_t m_allocated; //Used nodes for debugging
 };
@@ -355,8 +363,8 @@
 //!Pooled shared memory allocator using single segregated storage. Includes
 //!a reference count but the class does not delete itself, this is
 //!responsibility of user classes. Node size (NodeSize) and the number of
-//!nodes allocated per chunk (NodesPerChunk) are known at compile time
-template< class SegmentManager, std::size_t NodeSize, std::size_t NodesPerChunk >
+//!nodes allocated per block (NodesPerBlock) are known at compile time
+template< class SegmentManager, std::size_t NodeSize, std::size_t NodesPerBlock >
 class private_node_pool
    //Inherit from the implementation to avoid template bloat
    : public private_node_pool_impl<typename SegmentManager::segment_manager_base_type>
@@ -370,11 +378,13 @@
    public:
    typedef SegmentManager segment_manager;
 
- static const std::size_t nodes_per_chunk = NodesPerChunk;
+ static const std::size_t nodes_per_block = NodesPerBlock;
+ //Deprecated, use nodes_per_block
+ static const std::size_t nodes_per_chunk = NodesPerBlock;
 
    //!Constructor from a segment manager. Never throws
    private_node_pool(segment_manager *segment_mngr)
- : base_t(segment_mngr, NodeSize, NodesPerChunk)
+ : base_t(segment_mngr, NodeSize, NodesPerBlock)
    {}
 
    //!Returns the segment manager. Never throws
@@ -386,24 +396,24 @@
 //!Pooled shared memory allocator using single segregated storage. Includes
 //!a reference count but the class does not delete itself, this is
 //!responsibility of user classes. Node size (NodeSize) and the number of
-//!nodes allocated per chunk (NodesPerChunk) are known at compile time
+//!nodes allocated per block (NodesPerBlock) are known at compile time
 //!Pooled shared memory allocator using adaptive pool. Includes
 //!a reference count but the class does not delete itself, this is
 //!responsibility of user classes. Node size (NodeSize) and the number of
-//!nodes allocated per chunk (NodesPerChunk) are known at compile time
+//!nodes allocated per block (NodesPerBlock) are known at compile time
 template< class SegmentManager
         , std::size_t NodeSize
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class shared_node_pool
    : public detail::shared_pool_impl
       < private_node_pool
- <SegmentManager, NodeSize, NodesPerChunk>
+ <SegmentManager, NodeSize, NodesPerBlock>
>
 {
    typedef detail::shared_pool_impl
       < private_node_pool
- <SegmentManager, NodeSize, NodesPerChunk>
+ <SegmentManager, NodeSize, NodesPerBlock>
> base_t;
    public:
    shared_node_pool(SegmentManager *segment_mgnr)

Modified: branches/release/boost/interprocess/allocators/node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/node_allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/node_allocator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -43,12 +43,12 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class node_allocator_base
    : public node_pool_allocation_impl
    < node_allocator_base
- < Version, T, SegmentManager, NodesPerChunk>
+ < Version, T, SegmentManager, NodesPerBlock>
    , Version
    , T
    , SegmentManager
@@ -58,11 +58,20 @@
    typedef typename SegmentManager::void_pointer void_pointer;
    typedef SegmentManager segment_manager;
    typedef node_allocator_base
- <Version, T, SegmentManager, NodesPerChunk> self_t;
- typedef detail::shared_node_pool
- < SegmentManager, sizeof(T), NodesPerChunk> node_pool_t;
- typedef typename detail::
- pointer_to_other<void_pointer, node_pool_t>::type node_pool_ptr;
+ <Version, T, SegmentManager, NodesPerBlock> self_t;
+
+ /// @cond
+
+ template <int dummy>
+ struct node_pool
+ {
+ typedef detail::shared_node_pool
+ < SegmentManager, sizeof_value<T>::value, NodesPerBlock> type;
+
+ static type *get(void *p)
+ { return static_cast<type*>(p); }
+ };
+ /// @endcond
 
    BOOST_STATIC_ASSERT((Version <=2));
 
@@ -93,7 +102,7 @@
    template<class T2>
    struct rebind
    {
- typedef node_allocator_base<Version, T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator_base<Version, T2, SegmentManager, NodesPerBlock> other;
    };
 
    /// @cond
@@ -104,7 +113,7 @@
       (const node_allocator_base<Version2, T2, SegmentManager2, N2>&);
 
    //!Not assignable from other node_allocator_base
- node_allocator_base& operator=(const node_allocator_base&);
+ //node_allocator_base& operator=(const node_allocator_base&);
    /// @endcond
 
    public:
@@ -112,14 +121,14 @@
    //!pool. Increments the reference count of the associated node pool.
    //!Can throw boost::interprocess::bad_alloc
    node_allocator_base(segment_manager *segment_mngr)
- : mp_node_pool(detail::get_or_create_node_pool<node_pool_t>(segment_mngr)) { }
+ : mp_node_pool(detail::get_or_create_node_pool<typename node_pool<0>::type>(segment_mngr)) { }
 
    //!Copy constructor from other node_allocator_base. Increments the reference
    //!count of the associated node pool. Never throws
    node_allocator_base(const node_allocator_base &other)
       : mp_node_pool(other.get_node_pool())
    {
- mp_node_pool->inc_ref_count();
+ node_pool<0>::get(detail::get_pointer(mp_node_pool))->inc_ref_count();
    }
 
    //!Copy constructor from related node_allocator_base. If not present, constructs
@@ -127,23 +136,31 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    node_allocator_base
- (const node_allocator_base<Version, T2, SegmentManager, NodesPerChunk> &other)
- : mp_node_pool(detail::get_or_create_node_pool<node_pool_t>(other.get_segment_manager())) { }
+ (const node_allocator_base<Version, T2, SegmentManager, NodesPerBlock> &other)
+ : mp_node_pool(detail::get_or_create_node_pool<typename node_pool<0>::type>(other.get_segment_manager())) { }
+
+ //!Assignment from other node_allocator_base
+ node_allocator_base& operator=(const node_allocator_base &other)
+ {
+ node_allocator_base c(other);
+ swap(*this, c);
+ return *this;
+ }
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
    ~node_allocator_base()
- { detail::destroy_node_pool_if_last_link(detail::get_pointer(mp_node_pool)); }
+ { detail::destroy_node_pool_if_last_link(node_pool<0>::get(detail::get_pointer(mp_node_pool))); }
 
    //!Returns a pointer to the node pool.
    //!Never throws
- node_pool_t* get_node_pool() const
+ void* get_node_pool() const
    { return detail::get_pointer(mp_node_pool); }
 
    //!Returns the segment manager.
    //!Never throws
    segment_manager* get_segment_manager()const
- { return mp_node_pool->get_segment_manager(); }
+ { return node_pool<0>::get(detail::get_pointer(mp_node_pool))->get_segment_manager(); }
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -152,44 +169,44 @@
 
    /// @cond
    private:
- node_pool_ptr mp_node_pool;
+ void_pointer mp_node_pool;
    /// @endcond
 };
 
 //!Equality test for same type
 //!of node_allocator_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk> inline
-bool operator==(const node_allocator_base<V, T, S, NodesPerChunk> &alloc1,
- const node_allocator_base<V, T, S, NodesPerChunk> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NPC> inline
+bool operator==(const node_allocator_base<V, T, S, NPC> &alloc1,
+ const node_allocator_base<V, T, S, NPC> &alloc2)
    { return alloc1.get_node_pool() == alloc2.get_node_pool(); }
 
 //!Inequality test for same type
 //!of node_allocator_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const node_allocator_base<V, T, S, NodesPerChunk> &alloc1,
- const node_allocator_base<V, T, S, NodesPerChunk> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NPC> inline
+bool operator!=(const node_allocator_base<V, T, S, NPC> &alloc1,
+ const node_allocator_base<V, T, S, NPC> &alloc2)
    { return alloc1.get_node_pool() != alloc2.get_node_pool(); }
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
+ , std::size_t NodesPerBlock = 64
>
 class node_allocator_v1
    : public node_allocator_base
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
 {
    public:
    typedef detail::node_allocator_base
- < 1, T, SegmentManager, NodesPerChunk> base_t;
+ < 1, T, SegmentManager, NodesPerBlock> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef node_allocator_v1<T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator_v1<T2, SegmentManager, NodesPerBlock> other;
    };
 
    node_allocator_v1(SegmentManager *segment_mngr)
@@ -198,7 +215,7 @@
 
    template<class T2>
    node_allocator_v1
- (const node_allocator_v1<T2, SegmentManager, NodesPerChunk> &other)
+ (const node_allocator_v1<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 };
@@ -213,11 +230,11 @@
 //!placing the allocator in shared memory, memory mapped-files, etc...
 //!This node allocator shares a segregated storage between all instances
 //!of node_allocator with equal sizeof(T) placed in the same segment
-//!group. NodesPerChunk is the number of nodes allocated at once when the allocator
+//!group. NodesPerBlock is the number of nodes allocated at once when the allocator
 //!needs runs out of nodes
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class node_allocator
    /// @cond
@@ -225,21 +242,21 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
    /// @endcond
 {
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::node_allocator_base
- < 2, T, SegmentManager, NodesPerChunk> base_t;
+ < 2, T, SegmentManager, NodesPerBlock> base_t;
    public:
    typedef detail::version_type<node_allocator, 2> version;
 
    template<class T2>
    struct rebind
    {
- typedef node_allocator<T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator<T2, SegmentManager, NodesPerBlock> other;
    };
 
    node_allocator(SegmentManager *segment_mngr)
@@ -248,7 +265,7 @@
 
    template<class T2>
    node_allocator
- (const node_allocator<T2, SegmentManager, NodesPerChunk> &other)
+ (const node_allocator<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 
@@ -271,7 +288,7 @@
    template<class T2>
    struct rebind
    {
- typedef node_allocator<T2, SegmentManager, NodesPerChunk> other;
+ typedef node_allocator<T2, SegmentManager, NodesPerBlock> other;
    };
 
    private:
@@ -283,7 +300,7 @@
 
    //!Not assignable from
    //!other node_allocator
- node_allocator& operator=(const node_allocator&);
+ //node_allocator& operator=(const node_allocator&);
 
    public:
    //!Constructor from a segment manager. If not present, constructs a node
@@ -300,7 +317,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    node_allocator
- (const node_allocator<T2, SegmentManager, NodesPerChunk> &other);
+ (const node_allocator<T2, SegmentManager, NodesPerBlock> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -308,7 +325,7 @@
 
    //!Returns a pointer to the node pool.
    //!Never throws
- node_pool_t* get_node_pool() const;
+ void* get_node_pool() const;
 
    //!Returns the segment manager.
    //!Never throws
@@ -326,9 +343,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -342,9 +359,9 @@
    //!Never throws
    const_pointer address(const_reference value) const;
 
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr);
+ //!Copy construct an object.
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v);
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -361,7 +378,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -370,11 +387,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -387,7 +404,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -400,7 +417,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -414,15 +431,15 @@
 
 //!Equality test for same type
 //!of node_allocator
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const node_allocator<T, S, NodesPerChunk, F, OP> &alloc1,
- const node_allocator<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NPC> inline
+bool operator==(const node_allocator<T, S, NPC> &alloc1,
+ const node_allocator<T, S, NPC> &alloc2);
 
 //!Inequality test for same type
 //!of node_allocator
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const node_allocator<T, S, NodesPerChunk, F, OP> &alloc1,
- const node_allocator<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NPC> inline
+bool operator!=(const node_allocator<T, S, NPC> &alloc1,
+ const node_allocator<T, S, NPC> &alloc2);
 
 #endif
 

Modified: branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp (original)
+++ branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -42,31 +42,34 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class private_adaptive_pool_base
    : public node_pool_allocation_impl
- < private_adaptive_pool_base < Version, T, SegmentManager, NodesPerChunk
- , MaxFreeChunks, OverheadPercent>
+ < private_adaptive_pool_base < Version, T, SegmentManager, NodesPerBlock
+ , MaxFreeBlocks, OverheadPercent>
    , Version
    , T
    , SegmentManager
>
 {
+ public:
+ //Segment manager
+ typedef SegmentManager segment_manager;
+ typedef typename SegmentManager::void_pointer void_pointer;
+
    /// @cond
    private:
- typedef typename SegmentManager::void_pointer void_pointer;
- typedef SegmentManager segment_manager;
    typedef private_adaptive_pool_base
- < Version, T, SegmentManager, NodesPerChunk
- , MaxFreeChunks, OverheadPercent> self_t;
+ < Version, T, SegmentManager, NodesPerBlock
+ , MaxFreeBlocks, OverheadPercent> self_t;
    typedef detail::private_adaptive_node_pool
       <SegmentManager
- , sizeof(T)
- , NodesPerChunk
- , MaxFreeChunks
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ , MaxFreeBlocks
       , OverheadPercent
> node_pool_t;
 
@@ -100,10 +103,26 @@
    struct rebind
    {
       typedef private_adaptive_pool_base
- <Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    /// @cond
+
+ template <int dummy>
+ struct node_pool
+ {
+ typedef detail::private_adaptive_node_pool
+ <SegmentManager
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ , MaxFreeBlocks
+ , OverheadPercent
+ > type;
+
+ static type *get(void *p)
+ { return static_cast<type*>(p); }
+ };
+
    private:
    //!Not assignable from related private_adaptive_pool_base
    template<unsigned int Version2, class T2, class MemoryAlgorithm2, std::size_t N2, std::size_t F2, unsigned char OP2>
@@ -129,7 +148,7 @@
    template<class T2>
    private_adaptive_pool_base
       (const private_adaptive_pool_base
- <Version, T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ <Version, T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : m_node_pool(other.get_segment_manager())
    {}
 
@@ -157,21 +176,21 @@
 };
 
 //!Equality test for same type of private_adaptive_pool_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc2)
 { return &alloc1 == &alloc2; }
 
 //!Inequality test for same type of private_adaptive_pool_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool_base<V, T, S, NodesPerChunk, F, OP> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool_base<V, T, S, NodesPerBlock, F, OP> &alloc2)
 { return &alloc1 != &alloc2; }
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
- , std::size_t MaxFreeChunks = 2
+ , std::size_t NodesPerBlock = 64
+ , std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class private_adaptive_pool_v1
@@ -179,19 +198,19 @@
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
 {
    public:
    typedef detail::private_adaptive_pool_base
- < 1, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 1, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef private_adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ typedef private_adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private_adaptive_pool_v1(SegmentManager *segment_mngr)
@@ -200,7 +219,7 @@
 
    template<class T2>
    private_adaptive_pool_v1
- (const private_adaptive_pool_v1<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const private_adaptive_pool_v1<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 };
@@ -215,17 +234,17 @@
 //!placing the allocator in shared memory, memory mapped-files, etc...
 //!This allocator has its own node pool.
 //!
-//!NodesPerChunk is the minimum number of nodes of nodes allocated at once when
-//!the allocator needs runs out of nodes. MaxFreeChunks is the maximum number of totally free chunks
-//!that the adaptive node pool will hold. The rest of the totally free chunks will be
+//!NodesPerBlock is the minimum number of nodes of nodes allocated at once when
+//!the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks
+//!that the adaptive node pool will hold. The rest of the totally free blocks will be
 //!deallocated with the segment manager.
 //!
 //!OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator:
 //!(memory usable for nodes / total memory allocated from the segment manager)
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
- , std::size_t MaxFreeChunks
+ , std::size_t NodesPerBlock
+ , std::size_t MaxFreeBlocks
          , unsigned char OverheadPercent
>
 class private_adaptive_pool
@@ -234,8 +253,8 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
- , MaxFreeChunks
+ , NodesPerBlock
+ , MaxFreeBlocks
          , OverheadPercent
>
    /// @endcond
@@ -243,7 +262,7 @@
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::private_adaptive_pool_base
- < 2, T, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> base_t;
+ < 2, T, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> base_t;
    public:
    typedef detail::version_type<private_adaptive_pool, 2> version;
 
@@ -251,7 +270,7 @@
    struct rebind
    {
       typedef private_adaptive_pool
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private_adaptive_pool(SegmentManager *segment_mngr)
@@ -260,7 +279,7 @@
 
    template<class T2>
    private_adaptive_pool
- (const private_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other)
+ (const private_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other)
       : base_t(other)
    {}
 
@@ -284,7 +303,7 @@
    struct rebind
    {
       typedef private_adaptive_pool
- <T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> other;
+ <T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> other;
    };
 
    private:
@@ -313,7 +332,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    private_adaptive_pool
- (const private_adaptive_pool<T2, SegmentManager, NodesPerChunk, MaxFreeChunks, OverheadPercent> &other);
+ (const private_adaptive_pool<T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -339,9 +358,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -355,9 +374,9 @@
    //!Never throws
    const_pointer address(const_reference value) const;
 
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr);
+ //!Copy construct an object.
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v);
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -374,7 +393,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -383,11 +402,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -400,7 +419,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -413,7 +432,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -427,15 +446,15 @@
 
 //!Equality test for same type
 //!of private_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of private_adaptive_pool
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_adaptive_pool<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_adaptive_pool<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: branches/release/boost/interprocess/allocators/private_node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/private_node_allocator.hpp (original)
+++ branches/release/boost/interprocess/allocators/private_node_allocator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -7,211 +7,6 @@
 // See http://www.boost.org/libs/interprocess for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-/*
-#ifndef BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
-#define BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
-
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif
-
-#include <boost/interprocess/detail/config_begin.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
-
-#include <boost/interprocess/interprocess_fwd.hpp>
-#include <boost/assert.hpp>
-#include <boost/utility/addressof.hpp>
-#include <boost/interprocess/allocators/detail/node_pool.hpp>
-#include <boost/interprocess/exceptions.hpp>
-#include <boost/interprocess/detail/utilities.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
-#include <memory>
-#include <algorithm>
-#include <cstddef>
-
-//!\file
-//!Describes private_node_allocator pooled shared memory STL compatible allocator
-
-namespace boost {
-namespace interprocess {
-
-//!An STL node allocator that uses a segment manager as memory
-//!source. The internal pointer type will of the same type (raw, smart) as
-//!"typename SegmentManager::void_pointer" type. This allows
-//!placing the allocator in shared memory, memory mapped-files, etc...
-//!This allocator has its own node pool. NodesPerChunk is the number of nodes allocated
-//!at once when the allocator needs runs out of nodes
-template<class T, class SegmentManager, std::size_t NodesPerChunk>
-class private_node_allocator
-{
- /// @cond
- private:
- typedef typename SegmentManager::void_pointer void_pointer;
- typedef typename detail::
- pointer_to_other<void_pointer, const void>::type cvoid_pointer;
- typedef SegmentManager segment_manager;
- typedef typename detail::pointer_to_other
- <void_pointer, segment_manager>::type segment_mngr_ptr_t;
- typedef private_node_allocator
- <T, SegmentManager, NodesPerChunk> self_t;
- typedef detail::private_node_pool
- <SegmentManager, sizeof(T), NodesPerChunk> priv_node_pool_t;
- /// @endcond
-
- public:
- //-------
- typedef typename detail::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename detail::
- pointer_to_other<void_pointer, const T>::type const_pointer;
- typedef T value_type;
- typedef typename detail::add_reference
- <value_type>::type reference;
- typedef typename detail::add_reference
- <const value_type>::type const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
- //!Obtains node_allocator from other node_allocator
- template<class T2>
- struct rebind
- {
- typedef private_node_allocator<T2, SegmentManager, NodesPerChunk> other;
- };
-
- /// @cond
- private:
- //!Not assignable from related private_node_allocator
- template<class T2, class MemoryAlgorithm2, std::size_t N2>
- private_node_allocator& operator=
- (const private_node_allocator<T2, MemoryAlgorithm2, N2>&);
-
- //!Not assignable from other private_node_allocator
- private_node_allocator& operator=(const private_node_allocator&);
- /// @endcond
-
- public:
-
- //!Constructor from a segment manager
- private_node_allocator(segment_manager *segment_mngr)
- : m_node_pool(segment_mngr){}
-
- //!Copy constructor from other private_node_allocator. Never throws
- private_node_allocator(const private_node_allocator &other)
- : m_node_pool(other.get_segment_manager()){}
-
- //!Copy constructor from related private_node_allocator. Never throws.
- template<class T2>
- private_node_allocator
- (const private_node_allocator<T2, SegmentManager, NodesPerChunk> &other)
- : m_node_pool(other.get_segment_manager())
- {}
-
- //!Destructor, frees all used memory. Never throws
- ~private_node_allocator()
- {}
-
- //!Returns the segment manager. Never throws
- segment_manager* get_segment_manager()const
- { return m_node_pool.get_segment_manager(); }
-
- //!Returns the number of elements that could be allocated. Never throws
- size_type max_size() const
- { return this->get_segment_manager()->get_size()/sizeof(value_type); }
-
- //!Allocate memory for an array of count elements.
- //!Throws boost::interprocess::bad_alloc if there is no enough memory
- pointer allocate(size_type count, cvoid_pointer hint = 0)
- {
- (void)hint;
- if(count > this->max_size())
- throw bad_alloc();
- else if(count == 1)
- return pointer(static_cast<value_type*>(m_node_pool.allocate_node()));
- else
- return pointer(static_cast<value_type*>
- (m_node_pool.get_segment_manager()->allocate(sizeof(T)*count)));
- }
-
- //!Deallocate allocated memory. Never throws
- void deallocate(const pointer &ptr, size_type count)
- {
- if(count == 1)
- m_node_pool.deallocate_node(detail::get_pointer(ptr));
- else
- m_node_pool.get_segment_manager()->deallocate(detail::get_pointer(ptr));
- }
-
- //!Deallocates all free chunks of the pool
- void deallocate_free_chunks()
- { m_node_pool.deallocate_free_chunks(); }
-
- //!Swaps allocators. Does not throw. If each allocator is placed in a
- //!different shared memory segments, the result is undefined.
- friend void swap(self_t &alloc1,self_t &alloc2)
- { alloc1.m_node_pool.swap(alloc2.m_node_pool); }
-
- //These functions are obsolete. These are here to conserve
- //backwards compatibility with containers using them...
-
- //!Returns address of mutable object.
- //!Never throws
- pointer address(reference value) const
- { return pointer(boost::addressof(value)); }
-
- //!Returns address of non mutable object.
- //!Never throws
- const_pointer address(const_reference value) const
- { return const_pointer(boost::addressof(value)); }
-
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr)
- { new(detail::get_pointer(ptr)) value_type; }
-
- //!Destroys object. Throws if object's
- //!destructor throws
- void destroy(const pointer &ptr)
- { BOOST_ASSERT(ptr != 0); (*ptr).~value_type(); }
-
- /// @cond
- private:
- priv_node_pool_t m_node_pool;
- /// @endcond
-};
-
-//!Equality test for same type of private_node_allocator
-template<class T, class S, std::size_t NodesPerChunk> inline
-bool operator==(const private_node_allocator<T, S, NodesPerChunk> &alloc1,
- const private_node_allocator<T, S, NodesPerChunk> &alloc2)
-{ return &alloc1 == &alloc2; }
-
-//!Inequality test for same type of private_node_allocator
-template<class T, class S, std::size_t NodesPerChunk> inline
-bool operator!=(const private_node_allocator<T, S, NodesPerChunk> &alloc1,
- const private_node_allocator<T, S, NodesPerChunk> &alloc2)
-{
- return &alloc1 != &alloc2;
-}
-
-} //namespace interprocess {
-} //namespace boost {
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
-
-*/
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2008. 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/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
 
 #ifndef BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
 #define BOOST_INTERPROCESS_PRIVATE_NODE_ALLOCATOR_HPP
@@ -247,26 +42,29 @@
 template < unsigned int Version
          , class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class private_node_allocator_base
    : public node_pool_allocation_impl
- < private_node_allocator_base < Version, T, SegmentManager, NodesPerChunk>
+ < private_node_allocator_base < Version, T, SegmentManager, NodesPerBlock>
    , Version
    , T
    , SegmentManager
>
 {
+ public:
+ //Segment manager
+ typedef SegmentManager segment_manager;
+ typedef typename SegmentManager::void_pointer void_pointer;
+
    /// @cond
    private:
- typedef typename SegmentManager::void_pointer void_pointer;
- typedef SegmentManager segment_manager;
    typedef private_node_allocator_base
- < Version, T, SegmentManager, NodesPerChunk> self_t;
+ < Version, T, SegmentManager, NodesPerBlock> self_t;
    typedef detail::private_node_pool
       <SegmentManager
- , sizeof(T)
- , NodesPerChunk
+ , sizeof_value<T>::value
+ , NodesPerBlock
> node_pool_t;
 
    BOOST_STATIC_ASSERT((Version <=2));
@@ -299,10 +97,23 @@
    struct rebind
    {
       typedef private_node_allocator_base
- <Version, T2, SegmentManager, NodesPerChunk> other;
+ <Version, T2, SegmentManager, NodesPerBlock> other;
    };
 
    /// @cond
+ template <int dummy>
+ struct node_pool
+ {
+ typedef detail::private_node_pool
+ <SegmentManager
+ , sizeof_value<T>::value
+ , NodesPerBlock
+ > type;
+
+ static type *get(void *p)
+ { return static_cast<type*>(p); }
+ };
+
    private:
    //!Not assignable from related private_node_allocator_base
    template<unsigned int Version2, class T2, class MemoryAlgorithm2, std::size_t N2>
@@ -328,7 +139,7 @@
    template<class T2>
    private_node_allocator_base
       (const private_node_allocator_base
- <Version, T2, SegmentManager, NodesPerChunk> &other)
+ <Version, T2, SegmentManager, NodesPerBlock> &other)
       : m_node_pool(other.get_segment_manager())
    {}
 
@@ -356,37 +167,37 @@
 };
 
 //!Equality test for same type of private_node_allocator_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk> inline
-bool operator==(const private_node_allocator_base<V, T, S, NodesPerChunk> &alloc1,
- const private_node_allocator_base<V, T, S, NodesPerChunk> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NPC> inline
+bool operator==(const private_node_allocator_base<V, T, S, NPC> &alloc1,
+ const private_node_allocator_base<V, T, S, NPC> &alloc2)
 { return &alloc1 == &alloc2; }
 
 //!Inequality test for same type of private_node_allocator_base
-template<unsigned int V, class T, class S, std::size_t NodesPerChunk> inline
-bool operator!=(const private_node_allocator_base<V, T, S, NodesPerChunk> &alloc1,
- const private_node_allocator_base<V, T, S, NodesPerChunk> &alloc2)
+template<unsigned int V, class T, class S, std::size_t NPC> inline
+bool operator!=(const private_node_allocator_base<V, T, S, NPC> &alloc1,
+ const private_node_allocator_base<V, T, S, NPC> &alloc2)
 { return &alloc1 != &alloc2; }
 
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk = 64
+ , std::size_t NodesPerBlock = 64
>
 class private_node_allocator_v1
    : public private_node_allocator_base
          < 1
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
 {
    public:
    typedef detail::private_node_allocator_base
- < 1, T, SegmentManager, NodesPerChunk> base_t;
+ < 1, T, SegmentManager, NodesPerBlock> base_t;
 
    template<class T2>
    struct rebind
    {
- typedef private_node_allocator_v1<T2, SegmentManager, NodesPerChunk> other;
+ typedef private_node_allocator_v1<T2, SegmentManager, NodesPerBlock> other;
    };
 
    private_node_allocator_v1(SegmentManager *segment_mngr)
@@ -395,7 +206,7 @@
 
    template<class T2>
    private_node_allocator_v1
- (const private_node_allocator_v1<T2, SegmentManager, NodesPerChunk> &other)
+ (const private_node_allocator_v1<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 };
@@ -408,11 +219,11 @@
 //!source. The internal pointer type will of the same type (raw, smart) as
 //!"typename SegmentManager::void_pointer" type. This allows
 //!placing the allocator in shared memory, memory mapped-files, etc...
-//!This allocator has its own node pool. NodesPerChunk is the number of nodes allocated
+//!This allocator has its own node pool. NodesPerBlock is the number of nodes allocated
 //!at once when the allocator needs runs out of nodes
 template < class T
          , class SegmentManager
- , std::size_t NodesPerChunk
+ , std::size_t NodesPerBlock
>
 class private_node_allocator
    /// @cond
@@ -420,14 +231,14 @@
          < 2
          , T
          , SegmentManager
- , NodesPerChunk
+ , NodesPerBlock
>
    /// @endcond
 {
 
    #ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
    typedef detail::private_node_allocator_base
- < 2, T, SegmentManager, NodesPerChunk> base_t;
+ < 2, T, SegmentManager, NodesPerBlock> base_t;
    public:
    typedef detail::version_type<private_node_allocator, 2> version;
 
@@ -435,7 +246,7 @@
    struct rebind
    {
       typedef private_node_allocator
- <T2, SegmentManager, NodesPerChunk> other;
+ <T2, SegmentManager, NodesPerBlock> other;
    };
 
    private_node_allocator(SegmentManager *segment_mngr)
@@ -444,7 +255,7 @@
 
    template<class T2>
    private_node_allocator
- (const private_node_allocator<T2, SegmentManager, NodesPerChunk> &other)
+ (const private_node_allocator<T2, SegmentManager, NodesPerBlock> &other)
       : base_t(other)
    {}
 
@@ -468,7 +279,7 @@
    struct rebind
    {
       typedef private_node_allocator
- <T2, SegmentManager, NodesPerChunk> other;
+ <T2, SegmentManager, NodesPerBlock> other;
    };
 
    private:
@@ -497,7 +308,7 @@
    //!Can throw boost::interprocess::bad_alloc
    template<class T2>
    private_node_allocator
- (const private_node_allocator<T2, SegmentManager, NodesPerChunk> &other);
+ (const private_node_allocator<T2, SegmentManager, NodesPerBlock> &other);
 
    //!Destructor, removes node_pool_t from memory
    //!if its reference count reaches to zero. Never throws
@@ -523,9 +334,9 @@
    //!Never throws
    void deallocate(const pointer &ptr, size_type count);
 
- //!Deallocates all free chunks
+ //!Deallocates all free blocks
    //!of the pool
- void deallocate_free_chunks();
+ void deallocate_free_blocks();
 
    //!Swaps allocators. Does not throw. If each allocator is placed in a
    //!different memory segment, the result is undefined.
@@ -539,9 +350,9 @@
    //!Never throws
    const_pointer address(const_reference value) const;
 
- //!Default construct an object.
- //!Throws if T's default constructor throws
- void construct(const pointer &ptr);
+ //!Copy construct an object.
+ //!Throws if T's copy constructor throws
+ void construct(const pointer &ptr, const_reference v);
 
    //!Destroys object. Throws if object's
    //!destructor throws
@@ -558,7 +369,7 @@
                          size_type preferred_size,
                          size_type &received_size, const pointer &reuse = 0);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -567,11 +378,11 @@
    multiallocation_iterator allocate_many(size_type elem_size, std::size_t num_elements);
 
    //!Allocates n_elements elements, each one of size elem_sizes[i]in a
- //!contiguous chunk
+ //!contiguous block
    //!of memory. The elements must be deallocated
    multiallocation_iterator allocate_many(const size_type *elem_sizes, size_type n_elements);
 
- //!Allocates many elements of size elem_size in a contiguous chunk
+ //!Allocates many elements of size elem_size in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -584,7 +395,7 @@
    //!Throws boost::interprocess::bad_alloc if there is no enough memory
    pointer allocate_one();
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -597,7 +408,7 @@
    //!with other functions different from allocate_one(). Never throws
    void deallocate_one(const pointer &p);
 
- //!Allocates many elements of size == 1 in a contiguous chunk
+ //!Allocates many elements of size == 1 in a contiguous block
    //!of memory. The minimum number to be allocated is min_elements,
    //!the preferred and maximum number is
    //!preferred_elements. The number of actually allocated elements is
@@ -611,15 +422,15 @@
 
 //!Equality test for same type
 //!of private_node_allocator
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator==(const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator==(const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc2);
 
 //!Inequality test for same type
 //!of private_node_allocator
-template<class T, class S, std::size_t NodesPerChunk, std::size_t F, unsigned char OP> inline
-bool operator!=(const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc1,
- const private_node_allocator<T, S, NodesPerChunk, F, OP> &alloc2);
+template<class T, class S, std::size_t NodesPerBlock, std::size_t F, unsigned char OP> inline
+bool operator!=(const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc1,
+ const private_node_allocator<T, S, NodesPerBlock, F, OP> &alloc2);
 
 #endif
 

Modified: branches/release/boost/interprocess/containers/deque.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/deque.hpp (original)
+++ branches/release/boost/interprocess/containers/deque.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -580,7 +580,7 @@
    { this->swap(mx.get()); }
    #else
    deque(deque &&x)
- : Base(x))
+ : Base(detail::move_impl(x))
    { this->swap(x); }
    #endif
 
@@ -658,7 +658,7 @@
    void push_back(const value_type& t)
    {
       if (this->members_.m_finish.m_cur != this->members_.m_finish.m_last - 1) {
- new(detail::get_pointer(this->members_.m_finish.m_cur))value_type(t);
+ new((void*)detail::get_pointer(this->members_.m_finish.m_cur))value_type(t);
          ++this->members_.m_finish.m_cur;
       }
       else
@@ -669,7 +669,7 @@
    void push_back(const detail::moved_object<value_type> &mt)
    {
       if (this->members_.m_finish.m_cur != this->members_.m_finish.m_last - 1) {
- new(detail::get_pointer(this->members_.m_finish.m_cur))value_type(mt);
+ new((void*)detail::get_pointer(this->members_.m_finish.m_cur))value_type(mt);
          ++this->members_.m_finish.m_cur;
       }
       else
@@ -679,18 +679,18 @@
    void push_back(value_type &&mt)
    {
       if (this->members_.m_finish.m_cur != this->members_.m_finish.m_last - 1) {
- new(detail::get_pointer(this->members_.m_finish.m_cur))value_type(move(mt));
+ new((void*)detail::get_pointer(this->members_.m_finish.m_cur))value_type(detail::move_impl(mt));
          ++this->members_.m_finish.m_cur;
       }
       else
- this->priv_push_back_aux(move(mt));
+ this->priv_push_back_aux(detail::move_impl(mt));
    }
    #endif
 
    void push_front(const value_type& t)
    {
       if (this->members_.m_start.m_cur != this->members_.m_start.m_first) {
- new(detail::get_pointer(this->members_.m_start.m_cur)- 1)value_type(t);
+ new((void*)(detail::get_pointer(this->members_.m_start.m_cur)- 1))value_type(t);
          --this->members_.m_start.m_cur;
       }
       else
@@ -701,7 +701,7 @@
    void push_front(const detail::moved_object<value_type> &mt)
    {
       if (this->members_.m_start.m_cur != this->members_.m_start.m_first) {
- new(detail::get_pointer(this->members_.m_start.m_cur)- 1)value_type(mt);
+ new((void*)(detail::get_pointer(this->members_.m_start.m_cur)- 1))value_type(mt);
          --this->members_.m_start.m_cur;
       }
       else
@@ -711,11 +711,11 @@
    void push_front(value_type &&mt)
    {
       if (this->members_.m_start.m_cur != this->members_.m_start.m_first) {
- new(detail::get_pointer(this->members_.m_start.m_cur)- 1)value_type(move(mt));
+ new((void*)(detail::get_pointer(this->members_.m_start.m_cur)- 1))value_type(detail::move_impl(mt));
          --this->members_.m_start.m_cur;
       }
       else
- this->priv_push_front_aux(move(mt));
+ this->priv_push_front_aux(detail::move_impl(mt));
    }
    #endif
 
@@ -777,17 +777,17 @@
    iterator insert(iterator position, value_type &&mx)
    {
       if (position.m_cur == this->members_.m_start.m_cur) {
- this->push_front(move(mx));
+ this->push_front(detail::move_impl(mx));
          return this->members_.m_start;
       }
       else if (position.m_cur == this->members_.m_finish.m_cur) {
- this->push_back(move(mx));
+ this->push_back(detail::move_impl(mx));
          iterator tmp = this->members_.m_finish;
          --tmp;
          return tmp;
       }
       else {
- return this->priv_insert_aux(position, move(mx));
+ return this->priv_insert_aux(position, detail::move_impl(mx));
       }
    }
    #endif
@@ -824,13 +824,13 @@
          this->priv_reserve_elements_at_back(new_size);
 
          while(n--){
- //T default_constructed = move(T());
+ //T default_constructed = detail::move_impl(T());
             T default_constructed;
 /* if(boost::is_scalar<T>::value){
                //Value initialization
                new(&default_constructed)T();
             }*/
- this->push_back(move(default_constructed));
+ this->push_back(detail::move_impl(default_constructed));
          }
       }
    }
@@ -1217,7 +1217,7 @@
       this->priv_reserve_map_at_back();
       *(this->members_.m_finish.m_node + 1) = this->priv_allocate_node();
       BOOST_TRY {
- new(detail::get_pointer(this->members_.m_finish.m_cur))value_type(t);
+ new((void*)detail::get_pointer(this->members_.m_finish.m_cur))value_type(t);
          this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node + 1);
          this->members_.m_finish.m_cur = this->members_.m_finish.m_first;
       }
@@ -1235,7 +1235,7 @@
       this->priv_reserve_map_at_back();
       *(this->members_.m_finish.m_node + 1) = this->priv_allocate_node();
       BOOST_TRY {
- new(detail::get_pointer(this->members_.m_finish.m_cur))value_type(mt);
+ new((void*)detail::get_pointer(this->members_.m_finish.m_cur))value_type(mt);
          this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node + 1);
          this->members_.m_finish.m_cur = this->members_.m_finish.m_first;
       }
@@ -1251,7 +1251,7 @@
       this->priv_reserve_map_at_back();
       *(this->members_.m_finish.m_node + 1) = this->priv_allocate_node();
       BOOST_TRY {
- new(detail::get_pointer(this->members_.m_finish.m_cur))value_type(move(mt));
+ new((void*)detail::get_pointer(this->members_.m_finish.m_cur))value_type(detail::move_impl(mt));
          this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node + 1);
          this->members_.m_finish.m_cur = this->members_.m_finish.m_first;
       }
@@ -1271,7 +1271,7 @@
       BOOST_TRY {
          this->members_.m_start.priv_set_node(this->members_.m_start.m_node - 1);
          this->members_.m_start.m_cur = this->members_.m_start.m_last - 1;
- new(detail::get_pointer(this->members_.m_start.m_cur))value_type(t);
+ new((void*)detail::get_pointer(this->members_.m_start.m_cur))value_type(t);
       }
       BOOST_CATCH(...){
          ++this->members_.m_start;
@@ -1289,7 +1289,7 @@
       BOOST_TRY {
          this->members_.m_start.priv_set_node(this->members_.m_start.m_node - 1);
          this->members_.m_start.m_cur = this->members_.m_start.m_last - 1;
- new(detail::get_pointer(this->members_.m_start.m_cur))value_type(mt);
+ new((void*)detail::get_pointer(this->members_.m_start.m_cur))value_type(mt);
       }
       BOOST_CATCH(...){
          ++this->members_.m_start;
@@ -1306,7 +1306,7 @@
       BOOST_TRY {
          this->members_.m_start.priv_set_node(this->members_.m_start.m_node - 1);
          this->members_.m_start.m_cur = this->members_.m_start.m_last - 1;
- new(detail::get_pointer(this->members_.m_start.m_cur))value_type(move(mt));
+ new((void*)detail::get_pointer(this->members_.m_start.m_cur))value_type(detail::move_impl(mt));
       }
       BOOST_CATCH(...){
          ++this->members_.m_start;

Modified: branches/release/boost/interprocess/containers/detail/flat_tree.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/detail/flat_tree.hpp (original)
+++ branches/release/boost/interprocess/containers/detail/flat_tree.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -135,11 +135,11 @@
 
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_tree(const detail::moved_object<flat_tree> &x)
- : m_data(move(x.get().m_data))
+ : m_data(detail::move_impl(x.get().m_data))
    { }
    #else
    flat_tree(flat_tree &&x)
- : m_data(move(x.m_data))
+ : m_data(detail::move_impl(x.m_data))
    { }
    #endif
 
@@ -151,10 +151,10 @@
 
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_tree& operator=(const detail::moved_object<flat_tree>& mx)
- { m_data = move(mx.get().m_data); return *this; }
+ { m_data = detail::move_impl(mx.get().m_data); return *this; }
    #else
    flat_tree& operator=(flat_tree &&mx)
- { m_data = move(mx.m_data); return *this; }
+ { m_data = detail::move_impl(mx.m_data); return *this; }
    #endif
 
    public:
@@ -250,7 +250,7 @@
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(mval, data);
       if(ret.second){
- ret.first = priv_insert_commit(data, move(mval));
+ ret.first = priv_insert_commit(data, detail::move_impl(mval));
       }
       return ret;
    }
@@ -275,7 +275,7 @@
    iterator insert_equal(value_type && mval)
    {
       iterator i = this->upper_bound(KeyOfValue()(mval));
- i = this->m_data.m_vect.insert(i, move(mval));
+ i = this->m_data.m_vect.insert(i, detail::move_impl(mval));
       return i;
    }
    #endif
@@ -306,7 +306,7 @@
       insert_commit_data data;
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(pos, mval, data);
       if(ret.second){
- ret.first = priv_insert_commit(data, move(mval));
+ ret.first = priv_insert_commit(data, detail::move_impl(mval));
       }
       return ret.first;
    }
@@ -331,7 +331,7 @@
    {
       insert_commit_data data;
       priv_insert_equal_prepare(pos, mval, data);
- return priv_insert_commit(data, move(mval));
+ return priv_insert_commit(data, detail::move_impl(mval));
    }
    #endif
 
@@ -547,7 +547,7 @@
    template<class Convertible>
    iterator priv_insert_commit
       (insert_commit_data &commit_data, Convertible &&convertible)
- { return this->m_data.m_vect.insert(commit_data.position, forward<Convertible>(convertible)); }
+ { return this->m_data.m_vect.insert(commit_data.position, detail::forward_impl<Convertible>(convertible)); }
    #endif
 
    template <class RanIt>

Modified: branches/release/boost/interprocess/containers/detail/node_alloc_holder.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/detail/node_alloc_holder.hpp (original)
+++ branches/release/boost/interprocess/containers/detail/node_alloc_holder.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -88,11 +88,11 @@
 
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    node_alloc_holder(const detail::moved_object<node_alloc_holder> &other)
- : members_(move(other.get().node_alloc()))
+ : members_(detail::move_impl(other.get().node_alloc()))
    { this->swap(other.get()); }
    #else
    node_alloc_holder(node_alloc_holder &&other)
- : members_(move(other.node_alloc()))
+ : members_(detail::move_impl(other.node_alloc()))
    { this->swap(other); }
    #endif
 
@@ -145,15 +145,15 @@
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    template<class Convertible>
    static void construct(const NodePtr &ptr, const Convertible &value)
- { new(detail::get_pointer(ptr)) Node(value); }
+ { new((void*)detail::get_pointer(ptr)) Node(value); }
    #else
    template<class Convertible>
    static void construct(const NodePtr &ptr, Convertible &&value)
- { new(detail::get_pointer(ptr)) Node(forward<Convertible>(value)); }
+ { new((void*)detail::get_pointer(ptr)) Node(detail::forward_impl<Convertible>(value)); }
    #endif
 
    static void construct(const NodePtr &ptr)
- { new(detail::get_pointer(ptr)) Node(); }
+ { new((void*)detail::get_pointer(ptr)) Node(); }
 
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    template<class Convertible1, class Convertible2>
@@ -169,9 +169,9 @@
       new(static_cast<hook_type*>(nodeptr))hook_type();
       //Now construct pair members_holder
       value_type *valueptr = &nodeptr->m_data;
- new((void*)&valueptr->first) first_type(move(value.get().first));
+ new((void*)&valueptr->first) first_type(detail::move_impl(value.get().first));
       BOOST_TRY{
- new((void*)&valueptr->second) second_type(move(value.get().second));
+ new((void*)&valueptr->second) second_type(detail::move_impl(value.get().second));
       }
       BOOST_CATCH(...){
          valueptr->first.~first_type();
@@ -194,9 +194,9 @@
       new(static_cast<hook_type*>(nodeptr))hook_type();
       //Now construct pair members_holder
       value_type *valueptr = &nodeptr->m_data;
- new((void*)&valueptr->first) first_type(move(value.first));
+ new((void*)&valueptr->first) first_type(detail::move_impl(value.first));
       BOOST_TRY{
- new((void*)&valueptr->second) second_type(move(value.second));
+ new((void*)&valueptr->second) second_type(detail::move_impl(value.second));
       }
       BOOST_CATCH(...){
          valueptr->first.~first_type();
@@ -226,7 +226,7 @@
    {
       NodePtr p = this->allocate_one();
       Deallocator node_deallocator(p, this->node_alloc());
- self_t::construct(p, forward<Convertible>(x));
+ self_t::construct(p, detail::forward_impl<Convertible>(x));
       node_deallocator.release();
       return (p);
    }
@@ -275,7 +275,7 @@
    {
       typedef typename NodeAlloc::multiallocation_iterator multiallocation_iterator;
 
- //Try to allocate memory in a single chunk
+ //Try to allocate memory in a single block
       multiallocation_iterator itbeg =
          this->node_alloc().allocate_individual(n), itend, itold;
       int constructed = 0;

Modified: branches/release/boost/interprocess/containers/detail/tree.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/detail/tree.hpp (original)
+++ branches/release/boost/interprocess/containers/detail/tree.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -109,7 +109,7 @@
    #else
    template<class Convertible>
    rbtree_node(Convertible &&conv)
- : m_data(forward<Convertible>(conv)){}
+ : m_data(detail::forward_impl<Convertible>(conv)){}
    #endif
 
    rbtree_node &operator=(const rbtree_node &other)
@@ -130,7 +130,7 @@
    { m_data = v; }
 
    public:
- #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ #if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE)
 
    template<class Convertible>
    static void construct(node_type *ptr, const Convertible &value)
@@ -149,11 +149,11 @@
       new((void*)ptr) hack_node_t(value);
    }
 
- #else
+ #elif !defined(BOOST_INTERPROCESS_RVALUE_PAIR)
 
    template<class Convertible>
    static void construct(node_type *ptr, Convertible &&value)
- { new(ptr) node_type(forward<Convertible>(value)); }
+ { new(ptr) node_type(detail::forward_impl<Convertible>(value)); }
 
    template<class Convertible1, class Convertible2>
    static void construct(node_type *ptr,
@@ -167,19 +167,18 @@
 
       new((void*)ptr) hack_node_t(value);
    }
-
    #endif
 };
 
 }//namespace detail {
-
+#if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE) || !defined(BOOST_INTERPROCESS_RVALUE_PAIR)
 template<class T, class VoidPointer>
 struct has_own_construct_from_it
    < boost::interprocess::detail::rbtree_node<T, VoidPointer> >
 {
    static const bool value = true;
 };
-
+#endif
 namespace detail {
 
 template<class A, class ValueCompare>
@@ -578,7 +577,7 @@
    iterator insert_unique_commit
       (MovableConvertible && mv, insert_commit_data &data)
    {
- NodePtr tmp = AllocHolder::create_node(forward<MovableConvertible>(mv));
+ NodePtr tmp = AllocHolder::create_node(detail::forward_impl<MovableConvertible>(mv));
       iiterator it(this->icont().insert_unique_commit(*tmp, data));
       return iterator(it);
    }
@@ -618,7 +617,7 @@
       if(!ret.second)
          return ret;
       return std::pair<iterator,bool>
- (this->insert_unique_commit(forward<MovableConvertible>(mv), data), true);
+ (this->insert_unique_commit(detail::forward_impl<MovableConvertible>(mv), data), true);
    }
    #endif
 
@@ -654,7 +653,7 @@
          this->insert_unique_check(hint, KeyOfValue()(mv), data);
       if(!ret.second)
          return ret.first;
- return this->insert_unique_commit(forward<MovableConvertible>(mv), data);
+ return this->insert_unique_commit(detail::forward_impl<MovableConvertible>(mv), data);
    }
    #endif
 
@@ -691,7 +690,7 @@
    template<class MovableConvertible>
    iterator insert_equal(MovableConvertible &&mv)
    {
- NodePtr p(AllocHolder::create_node(forward<MovableConvertible>(mv)));
+ NodePtr p(AllocHolder::create_node(detail::forward_impl<MovableConvertible>(mv)));
       return iterator(this->icont().insert_equal(this->icont().end(), *p));
    }
    #endif
@@ -713,7 +712,7 @@
    template<class MovableConvertible>
    iterator insert_equal(const_iterator hint, MovableConvertible &&mv)
    {
- NodePtr p(AllocHolder::create_node(move(mv)));
+ NodePtr p(AllocHolder::create_node(detail::move_impl(mv)));
       return iterator(this->icont().insert_equal(hint.get(), *p));
    }
    #endif

Modified: branches/release/boost/interprocess/containers/flat_map.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/flat_map.hpp (original)
+++ branches/release/boost/interprocess/containers/flat_map.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -70,6 +70,14 @@
 {
    /// @cond
    private:
+ //This is the tree that we should store if pair was movable
+ typedef detail::flat_tree<Key,
+ std::pair<Key, T>,
+ detail::select1st< std::pair<Key, T> >,
+ Pred,
+ Alloc> tree_t;
+
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    //This is the real tree stored here. It's based on a movable pair
    typedef detail::flat_tree<Key,
                            detail::pair<Key, T>,
@@ -77,15 +85,10 @@
                            Pred,
                            typename Alloc::template
                               rebind<detail::pair<Key, T> >::other> impl_tree_t;
+ #else
+ typedef tree_t impl_tree_t;
+ #endif
 
- //This is the tree that we should store if pair was movable
- typedef detail::flat_tree<Key,
- std::pair<Key, T>,
- detail::select1st< std::pair<Key, T> >,
- Pred,
- Alloc> tree_t;
-
-// tree_t m_flat_tree; // flat tree representing flat_map
    impl_tree_t m_flat_tree; // flat tree representing flat_map
 
    typedef typename impl_tree_t::value_type impl_value_type;
@@ -101,19 +104,23 @@
    typedef typename impl_tree_t::allocator_type impl_allocator_type;
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    typedef detail::moved_object<impl_value_type> impl_moved_value_type;
- #else
- typedef impl_value_type&& impl_moved_value_type;
    #endif
 
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    template<class D, class S>
    static D &force(const S &s)
- { return *const_cast<D*>((reinterpret_cast<const D*>(&s))); }
-
- #ifdef BOOST_INTERPROCESS_RVALUE_REFERENCE
- template<class D, class S>
- static D &&force(S &&s)
- { return reinterpret_cast<D&&>(s); }
+ { return *((D*)(void*)(const void*)(&s)); }
+ #else
+ //For rvalue-aware compilers, just forward
+ template<class Type>
+ static const Type &force(const Type &t)
+ { return t; }
+
+ template<class Type>
+ static Type &force(Type &t)
+ { return t; }
    #endif
+
    /// @endcond
 
    public:
@@ -168,11 +175,11 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_map(const detail::moved_object<flat_map<Key,T,Pred,Alloc> >& x)
- : m_flat_tree(move(x.get().m_flat_tree)) {}
+ : m_flat_tree(detail::move_impl(x.get().m_flat_tree)) {}
 
    #else
    flat_map(flat_map<Key,T,Pred,Alloc> && x)
- : m_flat_tree(move(x.m_flat_tree)) {}
+ : m_flat_tree(detail::move_impl(x.m_flat_tree)) {}
    #endif
 
    //! <b>Effects</b>: Makes *this a copy of x.
@@ -189,10 +196,10 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_map<Key,T,Pred,Alloc>& operator=(const detail::moved_object<flat_map<Key, T, Pred, Alloc> >& mx)
- { m_flat_tree = move(mx.get().m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.get().m_flat_tree); return *this; }
    #else
    flat_map<Key,T,Pred,Alloc>& operator=(flat_map<Key, T, Pred, Alloc> && mx)
- { m_flat_tree = move(mx.m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.m_flat_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -210,7 +217,7 @@
       { return value_compare(force<key_compare>(m_flat_tree.key_comp())); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the object’s constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -315,7 +322,7 @@
       { return m_flat_tree.max_size(); }
 
    //! Effects: If there is no key equivalent to x in the flat_map, inserts
- //! value_type(move(x), T()) into the flat_map (the key is move-constructed)
+ //! value_type(detail::move_impl(x), T()) into the flat_map (the key is move-constructed)
    //!
    //! Returns: A reference to the mapped_type corresponding to x in *this.
    //!
@@ -342,7 +349,7 @@
       iterator i = lower_bound(k);
       // i->first is greater than or equivalent to k.
       if (i == end() || key_comp()(k, (*i).first))
- i = insert(i, value_type(k, move(T())));
+ i = insert(i, value_type(k, detail::move_impl(T())));
       return (*i).second;
    }
    #else
@@ -358,7 +365,7 @@
       iterator i = lower_bound(k);
       // i->first is greater than or equivalent to k.
       if (i == end() || key_comp()(k, (*i).first))
- i = insert(i, value_type(forward<key_type>(k), move(T())));
+ i = insert(i, value_type(detail::forward_impl<key_type>(k), detail::move_impl(T())));
       return (*i).second;
    }
    #endif
@@ -418,8 +425,7 @@
          m_flat_tree.insert_unique(force<impl_moved_value_type>(x))); }
    #else
    std::pair<iterator,bool> insert(value_type &&x)
- { return force<std::pair<iterator,bool> >(
- m_flat_tree.insert_unique(force<impl_moved_value_type>(move(x)))); }
+ { return m_flat_tree.insert_unique(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
@@ -452,8 +458,7 @@
          m_flat_tree.insert_unique(force<impl_iterator>(position), force<impl_moved_value_type>(x))); }
    #else
    iterator insert(iterator position, value_type &&x)
- { return force<iterator>(
- m_flat_tree.insert_unique(force<impl_iterator>(position), force<impl_moved_value_type>(move(x)))); }
+ { return m_flat_tree.insert_unique(position, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.
@@ -479,8 +484,8 @@
    //!
    //! <b>Note</b>: Invalidates elements with keys
    //! not less than the erased element.
- void erase(const_iterator position)
- { m_flat_tree.erase(force<impl_const_iterator>(position)); }
+ iterator erase(const_iterator position)
+ { return force<iterator>(m_flat_tree.erase(force<impl_const_iterator>(position))); }
 
    //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
    //!
@@ -499,8 +504,8 @@
    //!
    //! <b>Complexity</b>: Logarithmic search time plus erasure time
    //! linear to the elements with bigger keys.
- void erase(const_iterator first, const_iterator last)
- { m_flat_tree.erase(force<impl_const_iterator>(first), force<impl_const_iterator>(last)); }
+ iterator erase(const_iterator first, const_iterator last)
+ { return force<iterator>(m_flat_tree.erase(force<impl_const_iterator>(first), force<impl_const_iterator>(last))); }
 
    //! <b>Effects</b>: erase(a.begin(),a.end()).
    //!
@@ -715,6 +720,12 @@
 {
    /// @cond
    private:
+ typedef detail::flat_tree<Key,
+ std::pair<Key, T>,
+ detail::select1st< std::pair<Key, T> >,
+ Pred,
+ Alloc> tree_t;
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    //This is the real tree stored here. It's based on a movable pair
    typedef detail::flat_tree<Key,
                            detail::pair<Key, T>,
@@ -722,13 +733,10 @@
                            Pred,
                            typename Alloc::template
                               rebind<detail::pair<Key, T> >::other> impl_tree_t;
+ #else
+ typedef tree_t impl_tree_t;
+ #endif
 
- typedef detail::flat_tree<Key,
- std::pair<Key, T>,
- detail::select1st< std::pair<Key, T> >,
- Pred,
- Alloc> tree_t;
-// tree_t m_flat_tree; // flat tree representing flat_multimap
    impl_tree_t m_flat_tree; // flat tree representing flat_map
 
    typedef typename impl_tree_t::value_type impl_value_type;
@@ -744,18 +752,21 @@
    typedef typename impl_tree_t::allocator_type impl_allocator_type;
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    typedef detail::moved_object<impl_value_type> impl_moved_value_type;
- #else
- typedef impl_value_type&& impl_moved_value_type;
    #endif
 
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    template<class D, class S>
    static D &force(const S &s)
    { return *const_cast<D*>((reinterpret_cast<const D*>(&s))); }
-
- #ifdef BOOST_INTERPROCESS_RVALUE_REFERENCE
- template<class D, class S>
- static D &&force(S &&s)
- { return reinterpret_cast<D&&>(s); }
+ #else
+ //For rvalue-aware compilers, just forward
+ template<class Type>
+ static const Type &force(const Type &t)
+ { return t; }
+
+ template<class Type>
+ static Type &force(Type &t)
+ { return t; }
    #endif
    /// @endcond
 
@@ -812,10 +823,10 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_multimap(const detail::moved_object<flat_multimap<Key,T,Pred,Alloc> >& x)
- : m_flat_tree(move(x.get().m_flat_tree)) { }
+ : m_flat_tree(detail::move_impl(x.get().m_flat_tree)) { }
    #else
    flat_multimap(flat_multimap<Key,T,Pred,Alloc> && x)
- : m_flat_tree(move(x.m_flat_tree)) { }
+ : m_flat_tree(detail::move_impl(x.m_flat_tree)) { }
    #endif
 
    //! <b>Effects</b>: Makes *this a copy of x.
@@ -831,11 +842,11 @@
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_multimap<Key,T,Pred,Alloc>&
    operator=(const detail::moved_object<flat_multimap<Key,T,Pred,Alloc> >& mx)
- { m_flat_tree = move(mx.get().m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.get().m_flat_tree); return *this; }
    #else
    flat_multimap<Key,T,Pred,Alloc>&
    operator=(flat_multimap<Key,T,Pred,Alloc> && mx)
- { m_flat_tree = move(mx.m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.m_flat_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -853,7 +864,7 @@
       { return value_compare(force<key_compare>(m_flat_tree.key_comp())); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the object’s constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -1002,7 +1013,7 @@
       { return force<iterator>(m_flat_tree.insert_equal(force<impl_moved_value_type>(x))); }
    #else
    iterator insert(value_type &&x)
- { return force<iterator>(m_flat_tree.insert_equal(force<impl_moved_value_type>(move(x)))); }
+ { return m_flat_tree.insert_equal(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container.
@@ -1035,7 +1046,7 @@
       { return force<iterator>(m_flat_tree.insert_equal(force<impl_iterator>(position), force<impl_moved_value_type>(x))); }
    #else
    iterator insert(iterator position, value_type &&x)
- { return force<iterator>(m_flat_tree.insert_equal(force<impl_iterator>(position), force<impl_moved_value_type>(move(x)))); }
+ { return m_flat_tree.insert_equal(force<impl_iterator>(position), detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.
@@ -1060,8 +1071,8 @@
    //!
    //! <b>Note</b>: Invalidates elements with keys
    //! not less than the erased element.
- void erase(const_iterator position)
- { m_flat_tree.erase(force<impl_const_iterator>(position)); }
+ iterator erase(const_iterator position)
+ { return force<iterator>(m_flat_tree.erase(force<impl_const_iterator>(position))); }
 
    //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
    //!
@@ -1080,8 +1091,8 @@
    //!
    //! <b>Complexity</b>: Logarithmic search time plus erasure time
    //! linear to the elements with bigger keys.
- void erase(const_iterator first, const_iterator last)
- { m_flat_tree.erase(force<impl_const_iterator>(first), force<impl_const_iterator>(last)); }
+ iterator erase(const_iterator first, const_iterator last)
+ { return force<iterator>(m_flat_tree.erase(force<impl_const_iterator>(first), force<impl_const_iterator>(last))); }
 
    //! <b>Effects</b>: erase(a.begin(),a.end()).
    //!

Modified: branches/release/boost/interprocess/containers/flat_set.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/flat_set.hpp (original)
+++ branches/release/boost/interprocess/containers/flat_set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -117,10 +117,10 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_set(const detail::moved_object<flat_set<T,Pred,Alloc> >& mx)
- : m_flat_tree(move(mx.get().m_flat_tree)) {}
+ : m_flat_tree(detail::move_impl(mx.get().m_flat_tree)) {}
    #else
    flat_set(flat_set<T,Pred,Alloc> && mx)
- : m_flat_tree(move(mx.m_flat_tree)) {}
+ : m_flat_tree(detail::move_impl(mx.m_flat_tree)) {}
    #endif
 
    //! <b>Effects</b>: Makes *this a copy of x.
@@ -134,11 +134,11 @@
    //! <b>Complexity</b>: Linear in x.size().
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_set<T,Pred,Alloc>& operator=(const detail::moved_object<flat_set<T, Pred, Alloc> > &mx)
- { m_flat_tree = move(mx.get().m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.get().m_flat_tree); return *this; }
 
    #else
    flat_set<T,Pred,Alloc>& operator=(flat_set<T, Pred, Alloc> &&mx)
- { m_flat_tree = move(mx.m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.m_flat_tree); return *this; }
 
    #endif
 
@@ -157,7 +157,7 @@
       { return m_flat_tree.key_comp(); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the object’s constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -314,7 +314,7 @@
       { return m_flat_tree.insert_unique(x); }
    #else
    std::pair<iterator,bool> insert(value_type && x)
- { return m_flat_tree.insert_unique(move(x)); }
+ { return m_flat_tree.insert_unique(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
@@ -345,7 +345,7 @@
       { return m_flat_tree.insert_unique(position, x); }
    #else
    iterator insert(iterator position, value_type && x)
- { return m_flat_tree.insert_unique(position, move(x)); }
+ { return m_flat_tree.insert_unique(position, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.
@@ -588,6 +588,17 @@
                       const flat_multiset<T,Pred,Alloc>& y);
 /// @endcond
 
+//! flat_multiset is a Sorted Associative Container that stores objects of type Key.
+//! flat_multiset is a Simple Associative Container, meaning that its value type,
+//! as well as its key type, is Key.
+//! flat_Multiset can store multiple copies of the same key value.
+//!
+//! flat_multiset is similar to std::multiset but it's implemented like an ordered vector.
+//! This means that inserting a new element into a flat_multiset invalidates
+//! previous iterators and references
+//!
+//! Erasing an element of a flat_multiset invalidates iterators and references
+//! pointing to elements that come after (their keys are equal or bigger) the erased element.
 template <class T, class Pred, class Alloc>
 class flat_multiset
 {
@@ -633,10 +644,10 @@
 
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_multiset(const detail::moved_object<flat_multiset<T,Pred,Alloc> >& x)
- : m_flat_tree(move(x.get().m_flat_tree)) {}
+ : m_flat_tree(detail::move_impl(x.get().m_flat_tree)) {}
    #else
    flat_multiset(flat_multiset<T,Pred,Alloc> && x)
- : m_flat_tree(move(x.m_flat_tree)) {}
+ : m_flat_tree(detail::move_impl(x.m_flat_tree)) {}
    #endif
 
    flat_multiset<T,Pred,Alloc>& operator=(const flat_multiset<T,Pred,Alloc>& x)
@@ -644,10 +655,10 @@
 
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    flat_multiset<T,Pred,Alloc>& operator=(const detail::moved_object<flat_multiset<T,Pred,Alloc> >& mx)
- { m_flat_tree = move(mx.get().m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.get().m_flat_tree); return *this; }
    #else
    flat_multiset<T,Pred,Alloc>& operator=(flat_multiset<T,Pred,Alloc> && mx)
- { m_flat_tree = move(mx.m_flat_tree); return *this; }
+ { m_flat_tree = detail::move_impl(mx.m_flat_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -665,7 +676,7 @@
       { return m_flat_tree.key_comp(); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the object’s constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -814,7 +825,7 @@
       { return m_flat_tree.insert_equal(x); }
    #else
    iterator insert(value_type && x)
- { return m_flat_tree.insert_equal(move(x)); }
+ { return m_flat_tree.insert_equal(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container.
@@ -845,7 +856,7 @@
       { return m_flat_tree.insert_equal(position, x); }
    #else
    iterator insert(iterator position, value_type && x)
- { return m_flat_tree.insert_equal(position, move(x)); }
+ { return m_flat_tree.insert_equal(position, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.

Modified: branches/release/boost/interprocess/containers/list.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/list.hpp (original)
+++ branches/release/boost/interprocess/containers/list.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -93,7 +93,7 @@
    #else
    template<class Convertible>
    list_node(Convertible &&conv)
- : m_data(forward<Convertible>(conv))
+ : m_data(detail::forward_impl<Convertible>(conv))
    {}
    #endif
 
@@ -323,7 +323,7 @@
    {}
 
 // list(size_type n)
-// : AllocHolder(move(allocator_type()))
+// : AllocHolder(detail::move_impl(allocator_type()))
 // { this->resize(n); }
 
    //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
@@ -355,11 +355,11 @@
    //! <b>Complexity</b>: Constant.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    list(const detail::moved_object<list> &x)
- : AllocHolder(move((AllocHolder&)x.get()))
+ : AllocHolder(detail::move_impl((AllocHolder&)x.get()))
    {}
    #else
    list(list &&x)
- : AllocHolder(move((AllocHolder&)x))
+ : AllocHolder(detail::move_impl((AllocHolder&)x))
    {}
    #endif
 
@@ -518,7 +518,7 @@
    { this->insert(this->begin(), x); }
    #else
    void push_front(T &&x)
- { this->insert(this->begin(), move(x)); }
+ { this->insert(this->begin(), detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Removes the last element from the list.
@@ -539,7 +539,7 @@
    { this->insert(this->end(), x); }
    #else
    void push_back (T &&x)
- { this->insert(this->end(), move(x)); }
+ { this->insert(this->end(), detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Removes the first element from the list.
@@ -610,7 +610,7 @@
    //! <b>Complexity</b>: Linear to the difference between size() and new_size.
    void resize(size_type new_size, const T& x)
    {
- iterator i = this->begin(), iend = this->end();
+ iterator iend = this->end();
       size_type len = this->size();
       
       if(len > new_size){
@@ -633,15 +633,26 @@
    //! <b>Complexity</b>: Linear to the difference between size() and new_size.
    void resize(size_type new_size)
    {
- iterator i = this->begin(), iend = this->end();
+ iterator iend = this->end();
       size_type len = this->size();
       
       if(len > new_size){
          size_type to_erase = len - new_size;
- while(to_erase--){
- --iend;
+ iterator ifirst;
+ if(to_erase < len/2u){
+ ifirst = iend;
+ while(to_erase--){
+ --ifirst;
+ }
          }
- this->erase(iend, this->end());
+ else{
+ ifirst = this->begin();
+ size_type to_skip = len - to_erase;
+ while(to_skip--){
+ ++ifirst;
+ }
+ }
+ this->erase(ifirst, iend);
       }
       else{
          this->priv_create_and_insert_nodes(this->end(), new_size - len);
@@ -763,7 +774,7 @@
    #else
    iterator insert(iterator p, T &&x)
    {
- NodePtr tmp = AllocHolder::create_node(move(x));
+ NodePtr tmp = AllocHolder::create_node(detail::move_impl(x));
       return iterator(this->icont().insert(p.get(), *tmp));
    }
    #endif

Modified: branches/release/boost/interprocess/containers/map.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/map.hpp (original)
+++ branches/release/boost/interprocess/containers/map.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -8,7 +8,7 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 //
-// This file comes from SGI's stl_map/stl_multimap files. Modified by Ion Gazta�ga 2004.
+// This file comes from SGI's stl_map/stl_multimap files. Modified by Ion Gaztanaga.
 // Renaming, isolating and porting to generic algorithms. Pointer typedef
 // set to allocator::pointer to allow placing it in shared memory.
 //
@@ -166,11 +166,11 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    map(const detail::moved_object<map<Key,T,Pred,Alloc> >& x)
- : m_tree(move(x.get().m_tree))
+ : m_tree(detail::move_impl(x.get().m_tree))
    {}
    #else
    map(map<Key,T,Pred,Alloc> &&x)
- : m_tree(move(x.m_tree))
+ : m_tree(detail::move_impl(x.m_tree))
    {}
    #endif
 
@@ -185,10 +185,10 @@
    //! <b>Complexity</b>: Constant.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    map<Key,T,Pred,Alloc>& operator=(const detail::moved_object<map<Key,T,Pred,Alloc> >& x)
- { m_tree = move(x.get().m_tree); return *this; }
+ { m_tree = detail::move_impl(x.get().m_tree); return *this; }
    #else
    map<Key,T,Pred,Alloc>& operator=(map<Key,T,Pred,Alloc> &&x)
- { m_tree = move(x.m_tree); return *this; }
+ { m_tree = detail::move_impl(x.m_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -206,7 +206,7 @@
    { return value_compare(m_tree.key_comp()); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the objects constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -322,14 +322,14 @@
       iterator i = lower_bound(k);
       // i->first is greater than or equivalent to k.
       if (i == end() || key_comp()(k, (*i).first)){
- value_type val(k, move(T()));
- i = insert(i, move(val));
+ value_type val(k, detail::move_impl(T()));
+ i = insert(i, detail::move_impl(val));
       }
       return (*i).second;
    }
 
    //! Effects: If there is no key equivalent to x in the map, inserts
- //! value_type(move(x), T()) into the map (the key is move-constructed)
+ //! value_type(detail::move_impl(x), T()) into the map (the key is move-constructed)
    //!
    //! Returns: A reference to the mapped_type corresponding to x in *this.
    //!
@@ -342,8 +342,8 @@
       iterator i = lower_bound(k);
       // i->first is greater than or equivalent to k.
       if (i == end() || key_comp()(k, (*i).first)){
- value_type val(k, move(T()));
- i = insert(i, move(val));
+ value_type val(k, detail::move_impl(T()));
+ i = insert(i, detail::move_impl(val));
       }
       return (*i).second;
    }
@@ -355,8 +355,8 @@
       iterator i = lower_bound(k);
       // i->first is greater than or equivalent to k.
       if (i == end() || key_comp()(k, (*i).first)){
- value_type val(move(k), move(T()));
- i = insert(i, move(val));
+ value_type val(detail::move_impl(k), detail::move_impl(T()));
+ i = insert(i, detail::move_impl(val));
       }
       return (*i).second;
    }
@@ -364,7 +364,7 @@
 
 /*
    //! Effects: If there is no key equivalent to x in the map, inserts
- //! value_type(move(x), T()) into the map (the key is move-constructed)
+ //! value_type(detail::move_impl(x), T()) into the map (the key is move-constructed)
    //!
    //! Returns: A reference to the mapped_type corresponding to x in *this.
    //!
@@ -379,8 +379,8 @@
       iterator i = lower_bound(k);
       // i->first is greater than or equivalent to k.
       if (i == end() || key_comp()(k, (*i).first)){
- value_type val(k, move(T()));
- i = insert(i, move(val));
+ value_type val(k, detail::move_impl(T()));
+ i = insert(i, detail::move_impl(val));
       }
       return (*i).second;
    }
@@ -449,7 +449,7 @@
    { return m_tree.insert_unique(x); }
    #else
    std::pair<iterator,bool> insert(std::pair<key_type, mapped_type> &&x)
- { return m_tree.insert_unique(move(x)); }
+ { return m_tree.insert_unique(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Move constructs a new value from x if and only if there is
@@ -465,7 +465,7 @@
    { return m_tree.insert_unique(x); }
    #else
    std::pair<iterator,bool> insert(value_type &&x)
- { return m_tree.insert_unique(move(x)); }
+ { return m_tree.insert_unique(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
@@ -494,7 +494,7 @@
    { return m_tree.insert_unique(position, x); }
    #else
    iterator insert(iterator position, std::pair<key_type, mapped_type> &&x)
- { return m_tree.insert_unique(position, move(x)); }
+ { return m_tree.insert_unique(position, detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container.
@@ -517,7 +517,7 @@
    { return m_tree.insert_unique(position, x); }
    #else
    iterator insert(iterator position, value_type &&x)
- { return m_tree.insert_unique(position, move(x)); }
+ { return m_tree.insert_unique(position, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.
@@ -813,11 +813,11 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    multimap(const detail::moved_object<multimap<Key,T,Pred,Alloc> >& x)
- : m_tree(move(x.get().m_tree))
+ : m_tree(detail::move_impl(x.get().m_tree))
    {}
    #else
    multimap(multimap<Key,T,Pred,Alloc> && x)
- : m_tree(move(x.m_tree))
+ : m_tree(detail::move_impl(x.m_tree))
    {}
    #endif
 
@@ -834,11 +834,11 @@
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    multimap<Key,T,Pred,Alloc>&
    operator=(const detail::moved_object<multimap<Key,T,Pred,Alloc> >& x)
- { m_tree = move(x.get().m_tree); return *this; }
+ { m_tree = detail::move_impl(x.get().m_tree); return *this; }
    #else
    multimap<Key,T,Pred,Alloc>&
    operator=(multimap<Key,T,Pred,Alloc> && x)
- { m_tree = move(x.m_tree); return *this; }
+ { m_tree = detail::move_impl(x.m_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -856,7 +856,7 @@
    { return value_compare(m_tree.key_comp()); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the objects constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -1006,7 +1006,7 @@
    { return m_tree.insert_equal(x); }
    #else
    iterator insert(std::pair<key_type, mapped_type> && x)
- { return m_tree.insert_equal(move(x)); }
+ { return m_tree.insert_equal(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container.
@@ -1044,7 +1044,7 @@
    { return m_tree.insert_equal(position, x); }
    #else
    iterator insert(iterator position, std::pair<key_type, mapped_type> && x)
- { return m_tree.insert_equal(position, move(x)); }
+ { return m_tree.insert_equal(position, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.

Modified: branches/release/boost/interprocess/containers/set.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/set.hpp (original)
+++ branches/release/boost/interprocess/containers/set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -143,11 +143,11 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    set(const detail::moved_object<set<T,Pred,Alloc> >& x)
- : m_tree(move(x.get().m_tree))
+ : m_tree(detail::move_impl(x.get().m_tree))
    {}
    #else
    set(set<T,Pred,Alloc> &&x)
- : m_tree(move(x.m_tree))
+ : m_tree(detail::move_impl(x.m_tree))
    {}
    #endif
 
@@ -162,10 +162,10 @@
    //! <b>Complexity</b>: Constant.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    set<T,Pred,Alloc>& operator=(const detail::moved_object<set<T, Pred, Alloc> >& x)
- { m_tree = move(x.get().m_tree); return *this; }
+ { m_tree = detail::move_impl(x.get().m_tree); return *this; }
    #else
    set<T,Pred,Alloc>& operator=(set<T, Pred, Alloc> &&x)
- { m_tree = move(x.m_tree); return *this; }
+ { m_tree = detail::move_impl(x.m_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -183,7 +183,7 @@
    { return m_tree.key_comp(); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the object’s constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -334,7 +334,7 @@
    { return m_tree.insert_unique(x); }
    #else
    std::pair<iterator,bool> insert(value_type &&x)
- { return m_tree.insert_unique(move(x)); }
+ { return m_tree.insert_unique(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
@@ -360,7 +360,7 @@
    { return m_tree.insert_unique(p, x); }
    #else
    iterator insert(const_iterator p, value_type &&x)
- { return m_tree.insert_unique(p, move(x)); }
+ { return m_tree.insert_unique(p, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.
@@ -632,11 +632,11 @@
    //! <b>Postcondition</b>: x is emptied.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    multiset(const detail::moved_object<multiset<T,Pred,Alloc> >& x)
- : m_tree(move(x.get().m_tree))
+ : m_tree(detail::move_impl(x.get().m_tree))
    {}
    #else
    multiset(multiset<T,Pred,Alloc> &&x)
- : m_tree(move(x.m_tree))
+ : m_tree(detail::move_impl(x.m_tree))
    {}
    #endif
 
@@ -651,10 +651,10 @@
    //! <b>Complexity</b>: Constant.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    multiset<T,Pred,Alloc>& operator=(const detail::moved_object<multiset<T,Pred,Alloc> >& x)
- { m_tree = move(x.get().m_tree); return *this; }
+ { m_tree = detail::move_impl(x.get().m_tree); return *this; }
    #else
    multiset<T,Pred,Alloc>& operator=(multiset<T,Pred,Alloc> &&x)
- { m_tree = move(x.m_tree); return *this; }
+ { m_tree = detail::move_impl(x.m_tree); return *this; }
    #endif
 
    //! <b>Effects</b>: Returns the comparison object out
@@ -672,7 +672,7 @@
    { return m_tree.key_comp(); }
 
    //! <b>Effects</b>: Returns a copy of the Allocator that
- //! was passed to the object’s constructor.
+ //! was passed to the object's constructor.
    //!
    //! <b>Complexity</b>: Constant.
    allocator_type get_allocator() const
@@ -818,7 +818,7 @@
    { return m_tree.insert_equal(x); }
    #else
    iterator insert(value_type && x)
- { return m_tree.insert_equal(move(x)); }
+ { return m_tree.insert_equal(detail::move_impl(x)); }
    #endif
 
    //! <b>Effects</b>: Inserts a copy of x in the container.
@@ -845,7 +845,7 @@
    { return m_tree.insert_equal(p, x); }
    #else
    iterator insert(const_iterator p, value_type && x)
- { return m_tree.insert_equal(p, move(x)); }
+ { return m_tree.insert_equal(p, detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: i, j are not iterators into *this.

Modified: branches/release/boost/interprocess/containers/slist.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/slist.hpp (original)
+++ branches/release/boost/interprocess/containers/slist.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -87,7 +87,7 @@
    #else
    template<class Convertible>
    slist_node(Convertible &&value)
- : m_data(forward<Convertible>(value)){}
+ : m_data(detail::forward_impl<Convertible>(value)){}
    #endif
 
    T m_data;
@@ -321,7 +321,7 @@
    {}
 
 // explicit slist(size_type n)
-// : AllocHolder(move(allocator_type()))
+// : AllocHolder(detail::move_impl(allocator_type()))
 // { this->resize(n); }
 
    //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
@@ -367,11 +367,11 @@
    //! <b>Complexity</b>: Constant.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    slist(const detail::moved_object<slist> &x)
- : AllocHolder(move((AllocHolder&)x.get()))
+ : AllocHolder(detail::move_impl((AllocHolder&)x.get()))
    {}
    #else
    slist(slist &&x)
- : AllocHolder(move((AllocHolder&)x))
+ : AllocHolder(detail::move_impl((AllocHolder&)x))
    {}
    #endif
 
@@ -594,7 +594,7 @@
    { this->icont().push_front(*this->create_node(x)); }
    #else
    void push_front(T && x)
- { this->icont().push_front(*this->create_node(move(x))); }
+ { this->icont().push_front(*this->create_node(detail::move_impl(x))); }
    #endif
 
    //! <b>Effects</b>: Removes the first element from the list.
@@ -659,7 +659,7 @@
    { return iterator(this->icont().insert_after(prev_pos.get(), *this->create_node(x))); }
    #else
    iterator insert_after(iterator prev_pos, value_type && x)
- { return iterator(this->icont().insert_after(prev_pos.get(), *this->create_node(move(x)))); }
+ { return iterator(this->icont().insert_after(prev_pos.get(), *this->create_node(detail::move_impl(x)))); }
    #endif
 
    //! <b>Requires</b>: prev_pos must be a valid iterator of *this.
@@ -717,7 +717,7 @@
    { return this->insert_after(previous(p), x); }
    #else
    iterator insert(iterator p, value_type && x)
- { return this->insert_after(previous(p), move(x)); }
+ { return this->insert_after(previous(p), detail::move_impl(x)); }
    #endif
 
    //! <b>Requires</b>: p must be a valid iterator of *this.
@@ -1426,7 +1426,8 @@
 // Specialization of insert_iterator so that insertions will be constant
 // time rather than linear time.
 
-//iG
+///@cond
+
 //Ummm, I don't like to define things in namespace std, but
 //there is no other way
 namespace std {
@@ -1464,7 +1465,7 @@
 
 } //namespace std;
 
-
+///@endcond
 
 #include <boost/interprocess/detail/config_end.hpp>
 

Modified: branches/release/boost/interprocess/containers/string.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/string.hpp (original)
+++ branches/release/boost/interprocess/containers/string.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -281,7 +281,7 @@
       (void)limit_size;
       (void)reuse;
       if(!(command & allocate_new))
- return std::pair<pointer, bool>(0, 0);
+ return std::pair<pointer, bool>(pointer(0), 0);
       received_size = preferred_size;
       return std::make_pair(this->alloc().allocate(received_size), false);
    }
@@ -308,7 +308,7 @@
    }
 
    void construct(pointer p, const value_type &value = value_type())
- { new(detail::get_pointer(p)) value_type(value); }
+ { new((void*)detail::get_pointer(p)) value_type(value); }
 
    void destroy(pointer p, size_type n)
    {
@@ -520,8 +520,9 @@
    /// @endcond
 
    public: // Constructor, destructor, assignment.
-
+ /// @cond
    struct reserve_t {};
+ /// @endcond
 
    basic_string(reserve_t, std::size_t n,
                const allocator_type& a = allocator_type())
@@ -551,11 +552,11 @@
    //! <b>Complexity</b>: Constant.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_string(const detail::moved_object<basic_string>& s)
- : base_t(move((base_t&)s.get()))
+ : base_t(detail::move_impl((base_t&)s.get()))
    {}
    #else
    basic_string(basic_string && s)
- : base_t(move((base_t&)s))
+ : base_t(detail::move_impl((base_t&)s))
    {}
    #endif
 
@@ -1940,7 +1941,7 @@
           const basic_string<CharT,Traits,A>& y)
 {
    mx += y;
- return move(mx);
+ return detail::move_impl(mx);
 }
 #endif
 
@@ -1994,7 +1995,7 @@
           basic_string<CharT,Traits,A> && my)
 {
    typedef typename basic_string<CharT,Traits,A>::size_type size_type;
- return move(my.get().replace(size_type(0), size_type(0), s));
+ return detail::move_impl(my.get().replace(size_type(0), size_type(0), s));
 }
 #endif
 
@@ -2061,7 +2062,7 @@
           const CharT* s)
 {
    mx += s;
- return move(mx);
+ return detail::move_impl(mx);
 }
 #endif
 
@@ -2093,7 +2094,7 @@
 operator+(basic_string<CharT,Traits,A> && mx, const CharT c)
 {
    mx += c;
- return move(mx);
+ return detail::move_impl(mx);
 }
 #endif
 

Modified: branches/release/boost/interprocess/containers/vector.hpp
==============================================================================
--- branches/release/boost/interprocess/containers/vector.hpp (original)
+++ branches/release/boost/interprocess/containers/vector.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -288,7 +288,7 @@
       (void)limit_size;
       (void)reuse;
       if(!(command & allocate_new))
- return std::pair<pointer, bool>(0, 0);
+ return std::pair<pointer, bool>(pointer(0), 0);
       received_size = preferred_size;
       return std::make_pair(this->alloc().allocate(received_size), false);
    }
@@ -301,8 +301,8 @@
                          const pointer &reuse,
                          allocator_v2)
    {
- return this->alloc().allocation_command(command, limit_size, preferred_size,
- received_size, reuse);
+ return this->alloc().allocation_command
+ (command, limit_size, preferred_size, received_size, reuse);
    }
 
    size_type next_capacity(size_type additional_objects) const
@@ -434,7 +434,10 @@
    //This is the optimized move iterator for copy constructors
    //so that std::copy and similar can use memcpy
    typedef typename detail::if_c
- <base_t::trivial_copy
+ <base_t::trivial_copy
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ || !is_movable<value_type>::value
+ #endif
       ,T*
       ,detail::move_iterator<T*>
>::type copy_move_it;
@@ -443,6 +446,9 @@
    //so that std::uninitialized_copy and similar can use memcpy
    typedef typename detail::if_c
       <base_t::trivial_assign
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ || !is_movable<value_type>::value
+ #endif
       ,T*
       ,detail::move_iterator<T*>
>::type assign_move_it;
@@ -491,7 +497,7 @@
    { this->swap(mx.get()); }
    #else
    vector(vector<T, A> && mx)
- : base_t(mx)
+ : base_t(detail::move_impl(mx))
    { this->swap(mx); }
    #endif
 
@@ -859,7 +865,7 @@
    {
       if (this->members_.m_size < this->members_.m_capacity){
          //There is more memory, just construct a new object at the end
- new(detail::get_pointer(this->members_.m_start) + this->members_.m_size)value_type(x);
+ new((void*)(detail::get_pointer(this->members_.m_start) + this->members_.m_size))value_type(x);
          ++this->members_.m_size;
       }
       else{
@@ -878,7 +884,7 @@
    {
       if (this->members_.m_size < this->members_.m_capacity){
          //There is more memory, just construct a new object at the end
- new(detail::get_pointer(this->members_.m_start + this->members_.m_size))value_type(mx);
+ new((void*)detail::get_pointer(this->members_.m_start + this->members_.m_size))value_type(mx);
          ++this->members_.m_size;
       }
       else{
@@ -890,11 +896,11 @@
    {
       if (this->members_.m_size < this->members_.m_capacity){
          //There is more memory, just construct a new object at the end
- new(detail::get_pointer(this->members_.m_start + this->members_.m_size))value_type(move(mx));
+ new((void*)detail::get_pointer(this->members_.m_start + this->members_.m_size))value_type(detail::move_impl(mx));
          ++this->members_.m_size;
       }
       else{
- this->insert(this->end(), move(mx));
+ this->insert(this->end(), detail::move_impl(mx));
       }
    }
    #endif
@@ -1101,7 +1107,7 @@
          T *ptr = detail::get_pointer(this->members_.m_start + this->members_.m_size);
          while(n--){
             //Default construct
- new(ptr++)T();
+ new((void*)ptr++)T();
             ++this->members_.m_size;
          }
       }
@@ -1148,8 +1154,15 @@
          }
          else{
             size_type received_size;
- this->alloc().allocation_command(shrink_in_place, this->size(), this->capacity()
- ,received_size, this->members_.m_start);
+ if(this->alloc().allocation_command
+ ( shrink_in_place | nothrow_allocation
+ , this->capacity(), this->size()
+ , received_size, this->members_.m_start).first){
+ this->members_.m_capacity = received_size;
+ #ifdef BOOST_INTERPROCESS_VECTOR_ALLOC_STATS
+ ++this->num_shrink;
+ #endif
+ }
          }
       }
    }
@@ -1241,9 +1254,9 @@
          std::uninitialized_copy(copy_move_it(old_finish - n), copy_move_it(old_finish), old_finish);
          this->members_.m_size += n;
          //Copy previous to last objects to the initialized end
- std::copy_backward(assign_move_it(detail::get_pointer(pos)), assign_move_it(old_finish - n), old_finish);
+ std::copy_backward(assign_move_it(pos), assign_move_it(old_finish - n), old_finish);
          //Insert new objects in the pos
- std::copy(first, last, detail::get_pointer(pos));
+ std::copy(first, last, pos);
       }
       else {
          //The new elements don't fit in the [pos, end()) range. Copy
@@ -1254,12 +1267,12 @@
          this->members_.m_size += n - elems_after;
          //Copy old [pos, end()) elements to the uninitialized memory
          std::uninitialized_copy
- ( copy_move_it(detail::get_pointer(pos))
+ ( copy_move_it(pos)
             , copy_move_it(old_finish)
             , detail::get_pointer(this->members_.m_start) + this->members_.m_size);
          this->members_.m_size += elems_after;
          //Copy first new elements in pos
- std::copy(first, mid, detail::get_pointer(pos));
+ std::copy(first, mid, pos);
       }
    }
 
@@ -1277,7 +1290,7 @@
       //the start of the new buffer
       new_finish = std::uninitialized_copy
          ( copy_move_it(detail::get_pointer(this->members_.m_start))
- , copy_move_it(detail::get_pointer(pos))
+ , copy_move_it(pos)
          , old_finish = new_finish);
       construted_values_destroyer.increment_size(new_finish - old_finish);
       //Initialize new objects, starting from previous point
@@ -1287,9 +1300,9 @@
       //Initialize from the rest of the old buffer,
       //starting from previous point
       new_finish = std::uninitialized_copy
- ( copy_move_it(detail::get_pointer(pos))
+ ( copy_move_it(pos)
          , copy_move_it(detail::get_pointer(this->members_.m_start) + this->members_.m_size)
- , detail::get_pointer(new_finish));
+ , new_finish);
 
       //All construction successful, disable rollbacks
       construted_values_destroyer.release();
@@ -1345,13 +1358,11 @@
          //Copy first old values before pos, after that the
          //new objects
          boost::interprocess::uninitialized_copy_copy
- (copy_move_it(old_start), copy_move_it(detail::get_pointer(pos)), first, last, detail::get_pointer(new_start));
+ (copy_move_it(old_start), copy_move_it(pos), first, last, new_start);
          UCopiedArrayDestructor new_values_destroyer(new_start, elemsbefore);
          //Now initialize the rest of memory with the last old values
          std::uninitialized_copy
- ( copy_move_it(detail::get_pointer(pos))
- , copy_move_it(old_finish)
- , detail::get_pointer(new_start) + elemsbefore + n);
+ (copy_move_it(pos), copy_move_it(old_finish), new_start + elemsbefore + n);
          //All new elements correctly constructed, avoid new element destruction
          new_values_destroyer.release();
          this->members_.m_size = old_size + n;
@@ -1376,17 +1387,13 @@
          //Copy first old values before pos, after that the
          //new objects
          boost::interprocess::uninitialized_copy_copy
- ( copy_move_it(old_start)
- , copy_move_it(detail::get_pointer(pos))
- , first, last, detail::get_pointer(new_start));
+ (copy_move_it(old_start), copy_move_it(pos), first, last, new_start);
          UCopiedArrayDestructor new_values_destroyer(new_start, elemsbefore);
          size_type raw_gap = s_before - (elemsbefore + n);
          //Now initialize the rest of s_before memory with the
          //first of elements after new values
          std::uninitialized_copy
- ( copy_move_it(detail::get_pointer(pos))
- , copy_move_it(detail::get_pointer(pos) + raw_gap)
- , detail::get_pointer(new_start) + elemsbefore + n);
+ (copy_move_it(pos), copy_move_it(pos + raw_gap), new_start + elemsbefore + n);
          //All new elements correctly constructed, avoid new element destruction
          new_values_destroyer.release();
          //All new elements correctly constructed, avoid old element destruction
@@ -1394,7 +1401,7 @@
          //Update size since we have a contiguous buffer
          this->members_.m_size = old_size + s_before;
          //Now copy remaining last objects in the old buffer begin
- T *to_destroy = std::copy(assign_move_it(detail::get_pointer(pos) + raw_gap), assign_move_it(old_finish), old_start);
+ T *to_destroy = std::copy(assign_move_it(pos + raw_gap), assign_move_it(old_finish), old_start);
          //Now destroy redundant elements except if they were moved and
          //they have trivial destructor after move
          size_type n_destroy = old_finish - to_destroy;
@@ -1460,24 +1467,22 @@
             //Copy the first part of old_begin to raw_mem
             T *start_n = old_start + difference_type(s_before);
             std::uninitialized_copy
- ( copy_move_it(old_start)
- , copy_move_it(start_n)
- , detail::get_pointer(new_start));
+ (copy_move_it(old_start), copy_move_it(start_n), new_start);
             //The buffer is all constructed until old_end,
             //release destroyer and update size
             old_values_destroyer.release();
             this->members_.m_size = old_size + s_before;
             //Now copy the second part of old_begin overwriting himself
- T* next = std::copy(assign_move_it(start_n), assign_move_it(detail::get_pointer(pos)), old_start);
+ T* next = std::copy(assign_move_it(start_n), assign_move_it(pos), old_start);
             if(do_after){
                //Now copy the new_beg elements
- std::copy(first, before_end, detail::get_pointer(next));
+ std::copy(first, before_end, next);
             }
             else{
                //Now copy the all the new elements
- T* move_start = std::copy(first, last, detail::get_pointer(next));
+ T* move_start = std::copy(first, last, next);
                //Now displace old_end elements
- T* move_end = std::copy(assign_move_it(detail::get_pointer(pos)), assign_move_it(old_finish), detail::get_pointer(move_start));
+ T* move_end = std::copy(assign_move_it(pos), assign_move_it(old_finish), move_start);
                //Destroy remaining moved elements from old_end except if
                //they have trivial destructor after being moved
                difference_type n_destroy = s_before - n;
@@ -1513,9 +1518,7 @@
             size_type n_new_init = difference_type(s_before) - elemsbefore;
             std::advance(mid, n_new_init);
             boost::interprocess::uninitialized_copy_copy
- ( copy_move_it(old_start)
- , copy_move_it(detail::get_pointer(pos))
- , first, mid, detail::get_pointer(new_start));
+ (copy_move_it(old_start), copy_move_it(pos), first, mid, new_start);
             //The buffer is all constructed until old_end,
             //release destroyer and update size
             old_values_destroyer.release();
@@ -1529,7 +1532,7 @@
                //Copy all new elements
                T* move_start = std::copy(mid, last, old_start);
                //Displace old_end
- T* move_end = std::copy(copy_move_it(detail::get_pointer(pos)), copy_move_it(old_finish), detail::get_pointer(move_start));
+ T* move_end = std::copy(copy_move_it(pos), copy_move_it(old_finish), move_start);
                //Destroy remaining moved elements from old_end except if they
                //have trivial destructor after being moved
                difference_type n_destroy = s_before - n;
@@ -1584,14 +1587,12 @@
                //First copy the part of old_end raw_mem
                T* finish_n = old_finish - difference_type(n_after);
                std::uninitialized_copy
- ( copy_move_it(detail::get_pointer(finish_n))
- , copy_move_it(old_finish)
- , old_finish);
+ (copy_move_it(finish_n), copy_move_it(old_finish), old_finish);
                this->members_.m_size += n_after;
                //Displace the rest of old_end to the new position
- std::copy_backward(assign_move_it(detail::get_pointer(pos)), assign_move_it(detail::get_pointer(finish_n)), old_finish);
+ std::copy_backward(assign_move_it(pos), assign_move_it(finish_n), old_finish);
                //Now overwrite with new_end
- std::copy(first, last, detail::get_pointer(pos));
+ std::copy(first, last, pos);
             }
             else {
                //The raw_mem from end will divide new_end part
@@ -1610,13 +1611,10 @@
                std::advance(mid, elemsafter);
                //First initialize data in raw memory
                boost::interprocess::uninitialized_copy_copy
- ( mid, last
- , copy_move_it(detail::get_pointer(pos))
- , copy_move_it(old_finish)
- , old_finish);
+ ( mid, last, copy_move_it(pos), copy_move_it(old_finish), old_finish);
                this->members_.m_size += n_after;
                //Now copy the part of new_end over constructed elements
- std::copy(first, mid, detail::get_pointer(pos));
+ std::copy(first, mid, pos);
             }
          }
       }
@@ -1727,8 +1725,9 @@
          //Backup old buffer data
          size_type old_offset = old_start - detail::get_pointer(ret.first);
          size_type first_count = min_value(n, old_offset);
- FwdIt mid = boost::interprocess::n_uninitialized_copy_n
+ boost::interprocess::uninitialized_copy_n
             (first, first_count, detail::get_pointer(ret.first));
+ FwdIt mid = first + first_count;
 
          if(old_offset > n){
             //All old elements will be destroyed by "old_values_destroyer"
@@ -1742,12 +1741,13 @@
             this->members_.m_size = first_count + old_size;
             //Now overwrite the old values
             size_type second_count = min_value(old_size, n - first_count);
- mid = copy_n(mid, second_count, old_start);
+ copy_n(mid, second_count, old_start);
+ mid += second_count;
             
             //Check if we still have to append elements in the
             //uninitialized end
             if(second_count == old_size){
- boost::interprocess::n_uninitialized_copy_n
+ boost::interprocess::uninitialized_copy_n
                   ( mid
                   , n - first_count - second_count
                   , old_start + old_size);
@@ -1801,9 +1801,10 @@
    public:
    unsigned int num_expand_fwd;
    unsigned int num_expand_bwd;
+ unsigned int num_shrink;
    unsigned int num_alloc;
    void reset_alloc_stats()
- { num_expand_fwd = num_expand_bwd = num_alloc = 0; }
+ { num_expand_fwd = num_expand_bwd = num_alloc = 0, num_shrink = 0; }
    #endif
    /// @endcond
 };

Modified: branches/release/boost/interprocess/creation_tags.hpp
==============================================================================
--- branches/release/boost/interprocess/creation_tags.hpp (original)
+++ branches/release/boost/interprocess/creation_tags.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -26,20 +26,36 @@
 struct open_only_t {};
 
 //!Tag to indicate that the resource must
+//!be only opened for reading
+struct open_read_only_t {};
+
+//!Tag to indicate that the resource must
+//!be only opened for reading
+struct open_copy_on_write_t {};
+
+//!Tag to indicate that the resource must
 //!be created. If already created, it must be opened.
 struct open_or_create_t {};
 
 //!Value to indicate that the resource must
 //!be only created
-static const create_only_t create_only = create_only_t();
+static const create_only_t create_only = create_only_t();
 
 //!Value to indicate that the resource must
 //!be only opened
-static const open_only_t open_only = open_only_t();
+static const open_only_t open_only = open_only_t();
+
+//!Value to indicate that the resource must
+//!be only opened for reading
+static const open_read_only_t open_read_only = open_read_only_t();
 
 //!Value to indicate that the resource must
 //!be created. If already created, it must be opened.
-static const open_or_create_t open_or_create = open_or_create_t();
+static const open_or_create_t open_or_create = open_or_create_t();
+
+//!Value to indicate that the resource must
+//!be only opened for reading
+static const open_copy_on_write_t open_copy_on_write = open_copy_on_write_t();
 
 namespace detail {
 

Modified: branches/release/boost/interprocess/detail/algorithms.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/algorithms.hpp (original)
+++ branches/release/boost/interprocess/detail/algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -20,12 +20,18 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/detail/iterators.hpp>
-#include <boost/get_pointer.hpp>
+#include <boost/interprocess/detail/type_traits.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_assign.hpp>
 #include <boost/detail/no_exceptions_support.hpp>
+#include <boost/get_pointer.hpp>
+#include <cstring>
 
 namespace boost {
 namespace interprocess {
 
+#if !defined(BOOST_INTERPROCESS_RVALUE_REFERENCE) || !defined(BOOST_INTERPROCESS_RVALUE_PAIR)
+
 template<class T>
 struct has_own_construct_from_it
 {
@@ -43,7 +49,7 @@
 template<class T, class InpIt>
 inline void construct_in_place_impl(T* dest, const InpIt &source, detail::false_)
 {
- new(dest)T(*source);
+ new((void*)dest)T(*source);
 }
 
 } //namespace detail {
@@ -55,25 +61,81 @@
    detail::construct_in_place_impl(dest, source, boolean_t());
 }
 
+#else
+template<class T, class InpIt>
+inline void construct_in_place(T* dest, InpIt source)
+{ new((void*)dest)T(*source); }
+#endif
+
 template<class T, class U, class D>
 inline void construct_in_place(T *dest, default_construct_iterator<U, D>)
 {
- new(dest)T();
+ new((void*)dest)T();
 }
 
+
+template<class InIt, class OutIt>
+struct optimize_assign
+{
+ static const bool value = false;
+};
+
+template<class T>
+struct optimize_assign<const T*, T*>
+{
+ static const bool value = boost::has_trivial_assign<T>::value;
+};
+
+template<class T>
+struct optimize_assign<T*, T*>
+ : public optimize_assign<const T*, T*>
+{};
+
 template<class InIt, class OutIt>
-InIt copy_n(InIt first, typename std::iterator_traits<InIt>::difference_type length, OutIt dest)
+struct optimize_copy
+{
+ static const bool value = false;
+};
+
+template<class T>
+struct optimize_copy<const T*, T*>
+{
+ static const bool value = boost::has_trivial_copy<T>::value;
+};
+
+template<class T>
+struct optimize_copy<T*, T*>
+ : public optimize_copy<const T*, T*>
+{};
+
+
+template<class InIt, class OutIt> inline
+OutIt copy_n_dispatch(InIt first, typename std::iterator_traits<InIt>::difference_type length, OutIt dest, detail::bool_<false>)
 {
    for (; length--; ++dest, ++first)
       *dest = *first;
- return first;
+ return dest;
+}
+
+template<class T> inline
+T *copy_n_dispatch(const T *first, typename std::iterator_traits<const T*>::difference_type length, T *dest, detail::bool_<true>)
+{
+ std::size_t size = length*sizeof(T);
+ return ((T*)std::memmove(dest, first, size)) + size;
+}
+
+template<class InIt, class OutIt> inline
+OutIt copy_n(InIt first, typename std::iterator_traits<InIt>::difference_type length, OutIt dest)
+{
+ const bool do_optimized_assign = optimize_assign<InIt, OutIt>::value;
+ return copy_n_dispatch(first, length, dest, detail::bool_<do_optimized_assign>());
 }
 
 template<class InIt, class FwdIt> inline
-InIt n_uninitialized_copy_n
+FwdIt uninitialized_copy_n_dispatch
    (InIt first,
     typename std::iterator_traits<InIt>::difference_type count,
- FwdIt dest)
+ FwdIt dest, detail::bool_<false>)
 {
    typedef typename std::iterator_traits<FwdIt>::value_type value_type;
    //Save initial destination position
@@ -95,9 +157,28 @@
       BOOST_RETHROW
    }
    BOOST_CATCH_END
- return first;
+ return dest;
 }
 
+
+template<class T> inline
+T *uninitialized_copy_n_dispatch(const T *first, typename std::iterator_traits<const T*>::difference_type length, T *dest, detail::bool_<true>)
+{
+ std::size_t size = length*sizeof(T);
+ return ((T*)std::memmove(dest, first, size)) + size;
+}
+
+template<class InIt, class FwdIt> inline
+FwdIt uninitialized_copy_n
+ (InIt first,
+ typename std::iterator_traits<InIt>::difference_type count,
+ FwdIt dest)
+{
+ const bool do_optimized_copy = optimize_copy<InIt, FwdIt>::value;
+ return uninitialized_copy_n_dispatch(first, count, dest, detail::bool_<do_optimized_copy>());
+}
+
+
 // uninitialized_copy_copy
 // Copies [first1, last1) into [result, result + (last1 - first1)), and
 // copies [first2, last2) into

Modified: branches/release/boost/interprocess/detail/config_begin.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/config_begin.hpp (original)
+++ branches/release/boost/interprocess/detail/config_begin.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -30,4 +30,5 @@
    #pragma warning (disable : 4711) // function selected for automatic inline expansion
    #pragma warning (disable : 4786) // identifier truncated in debug info
    #pragma warning (disable : 4996) // 'function': was declared deprecated
+ #pragma warning (disable : 4197) // top-level volatile in cast is ignored
 #endif

Modified: branches/release/boost/interprocess/detail/file_wrapper.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/file_wrapper.hpp (original)
+++ branches/release/boost/interprocess/detail/file_wrapper.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -51,7 +51,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    file_wrapper
- (detail::moved_object<file_wrapper> &moved)
+ (detail::moved_object<file_wrapper> moved)
    { this->swap(moved.get()); }
    #else
    file_wrapper(file_wrapper &&moved)
@@ -63,7 +63,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    file_wrapper &operator=
- (detail::moved_object<file_wrapper> &moved)
+ (detail::moved_object<file_wrapper> moved)
    {
       file_wrapper tmp(moved);
       this->swap(tmp);
@@ -72,7 +72,7 @@
    #else
    file_wrapper &operator=(file_wrapper &&moved)
    {
- file_wrapper tmp(move(moved));
+ file_wrapper tmp(detail::move_impl(moved));
       this->swap(tmp);
       return *this;
    }

Modified: branches/release/boost/interprocess/detail/managed_memory_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/managed_memory_impl.hpp (original)
+++ branches/release/boost/interprocess/detail/managed_memory_impl.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -94,6 +94,8 @@
 
    /// @cond
 
+ typedef typename
+ segment_manager::char_ptr_holder_t char_ptr_holder_t;
    //Experimental. Don't use.
 
    typedef typename segment_manager::multiallocation_iterator multiallocation_iterator;
@@ -105,9 +107,6 @@
    private:
    typedef basic_managed_memory_impl
                <CharType, MemoryAlgorithm, IndexType, Offset> self_t;
- typedef typename
- segment_manager::char_ptr_holder_t char_ptr_holder_t;
-
    protected:
    template<class ManagedMemory>
    static bool grow(const char *filename, std::size_t extra_bytes)
@@ -687,6 +686,15 @@
       get_deleter()
    { return mp_header->get_deleter<T>(); }
 
+ /// @cond
+ //!Tries to find a previous named allocation address. Returns a memory
+ //!buffer and the object count. If not found returned pointer is 0.
+ //!Never throws.
+ template <class T>
+ std::pair<T*, std::size_t> find_no_lock (char_ptr_holder_t name)
+ { return mp_header->template find_no_lock<T>(name); }
+ /// @endcond
+
    protected:
    //!Swaps the segment manager's managed by this managed memory segment.
    //!NOT thread-safe. Never throws.

Modified: branches/release/boost/interprocess/detail/move.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/move.hpp (original)
+++ branches/release/boost/interprocess/detail/move.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -17,6 +17,8 @@
 
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
+#include <boost/interprocess/interprocess_fwd.hpp>
+#include <boost/interprocess/detail/mpl.hpp>
 
 //!\file
 //!Describes a function and a type to emulate move semantics.
@@ -79,7 +81,7 @@
    public:
    typedef T type;
 
- move_return(T& returned)
+ move_return(const T& returned)
       : m_moved(moved_object<T>(returned))
    {}
 
@@ -106,16 +108,25 @@
 namespace boost {
 namespace interprocess {
 
+namespace detail{
+
 //!A function that converts an object to a moved object so that
 //!it can match a function taking a detail::moved_object object.
 template<class Object>
-typename detail::move_type<Object>::type move
- (const Object &object)
+typename detail::move_type<Object>::type move_impl(const Object &object)
 {
    typedef typename detail::move_type<Object>::type type;
    return type(object);
 }
 
+} //namespace detail {
+
+//!A function that converts an object to a moved object so that
+//!it can match a function taking a detail::moved_object object.
+template<class Object>
+typename detail::move_type<Object>::type move(const Object &object)
+{ return detail::move_impl(object); }
+
 } //namespace interprocess {
 } //namespace boost {
 
@@ -126,15 +137,20 @@
 namespace boost {
 namespace interprocess {
 
+namespace detail {
+
 template <class T>
-inline typename detail::remove_reference<T>::type&&
-move(T&& t)
+inline typename detail::remove_reference<T>::type&& move_impl(T&& t)
 { return t; }
 
 template <class T>
-inline
-T&&
-forward(typename identity<T>::type&& t)
+inline T&& forward_impl(typename detail::identity<T>::type&& t)
+{ return t; }
+
+} //namespace detail {
+
+template <class T>
+inline typename detail::remove_reference<T>::type&& move(T&& t)
 { return t; }
 
 } //namespace interprocess {

Modified: branches/release/boost/interprocess/detail/move_iterator.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/move_iterator.hpp (original)
+++ branches/release/boost/interprocess/detail/move_iterator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -53,7 +53,7 @@
 
    reference operator*() const
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- { return move(*m_it); }
+ { return detail::move_impl(*m_it); }
    #else
    { return *m_it; }
    #endif
@@ -86,7 +86,7 @@
    { m_it -= n; return *this; }
 
    reference operator[](difference_type n) const
- { return move(m_it[n]); }
+ { return detail::move_impl(m_it[n]); }
 
    private:
    It m_it;

Modified: branches/release/boost/interprocess/detail/mpl.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/mpl.hpp (original)
+++ branches/release/boost/interprocess/detail/mpl.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -17,7 +17,7 @@
 # pragma once
 #endif
 
-//#include <functional>
+#include <cstddef>
 
 namespace boost {
 namespace interprocess {
@@ -117,10 +117,29 @@
 struct identity
 // : public std::unary_function<T,T>
 {
+ typedef T type;
    const T& operator()(const T& x) const
    { return x; }
 };
 
+template<std::size_t S>
+struct ls_zeros
+{
+ static const std::size_t value = (S & std::size_t(1)) ? 0 : (1u + ls_zeros<(S >> 1u)>::value);
+};
+
+template<>
+struct ls_zeros<0>
+{
+ static const std::size_t value = 0;
+};
+
+template<>
+struct ls_zeros<1>
+{
+ static const std::size_t value = 0;
+};
+
 } //namespace detail {
 } //namespace interprocess {
 } //namespace boost {

Modified: branches/release/boost/interprocess/detail/named_proxy.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/named_proxy.hpp (original)
+++ branches/release/boost/interprocess/detail/named_proxy.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -48,13 +48,13 @@
    self_t operator++(int) { return *this; }
 
    void construct(void *mem)
- { new(mem)T; }
+ { new((void*)mem)T; }
 
    virtual void construct_n(void *mem, std::size_t num, std::size_t &constructed)
    {
- T* memory = static_cast<T*>(mem);
+ T* memory = (T*)(mem);
       for(constructed = 0; constructed < num; ++constructed)
- new(memory++)T;
+ new((void*)memory++)T;
    }
 };
 
@@ -88,13 +88,13 @@
 // : p1((P1 &)p_1), p2((P2 &)p_2) {}
 //
 // void construct(void *mem)
-// { new(object)T(m_p1, m_p2); }
+// { new((void*)object)T(m_p1, m_p2); }
 //
 // virtual void construct_n(void *mem
 // , std::size_t num
 // , std::size_t &constructed)
 // {
-// T* memory = static_cast<T*>(mem);
+// T* memory = (T*)(mem);
 // for(constructed = 0; constructed < num; ++constructed){
 // this->construct(memory++, IsIterator());
 // this->do_increment(IsIterator());
@@ -103,10 +103,10 @@
 //
 // private:
 // void construct(void *mem, detail::true_)
-// { new(mem)T(*m_p1, *m_p2); }
+// { new((void*)mem)T(*m_p1, *m_p2); }
 //
 // void construct(void *mem, detail::false_)
-// { new(mem)T(m_p1, m_p2); }
+// { new((void*)mem)T(m_p1, m_p2); }
 //
 // P1 &m_p1; P2 &m_p2;
 // };
@@ -163,7 +163,7 @@
                         , std::size_t num \
                         , std::size_t &constructed) \
       { \
- T* memory = static_cast<T*>(mem); \
+ T* memory = (T*)(mem); \
          for(constructed = 0; constructed < num; ++constructed){ \
             this->construct(memory++, IsIterator()); \
             this->do_increment(IsIterator()); \
@@ -172,10 +172,10 @@
                                                                            \
       private: \
       void construct(void *mem, detail::true_) \
- { new(mem)T(BOOST_PP_ENUM_PARAMS(n, *m_p)); } \
+ { new((void*)mem)T(BOOST_PP_ENUM_PARAMS(n, *m_p)); } \
                                                                            \
       void construct(void *mem, detail::false_) \
- { new(mem)T(BOOST_PP_ENUM_PARAMS(n, m_p)); } \
+ { new((void*)mem)T(BOOST_PP_ENUM_PARAMS(n, m_p)); } \
                                                                            \
       BOOST_PP_REPEAT(n, BOOST_INTERPROCESS_AUX_PARAM_DEFINE, _) \
    }; \

Modified: branches/release/boost/interprocess/detail/win32_api.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/win32_api.hpp (original)
+++ branches/release/boost/interprocess/detail/win32_api.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -225,7 +225,7 @@
 extern "C" __declspec(dllimport) void * __stdcall CreateFileMappingA (void *, interprocess_security_attributes*, unsigned long, unsigned long, unsigned long, const char *);
 extern "C" __declspec(dllimport) void * __stdcall MapViewOfFileEx (void *, unsigned long, unsigned long, unsigned long, std::size_t, void*);
 extern "C" __declspec(dllimport) void * __stdcall OpenFileMappingA (unsigned long, int, const char *);
-extern "C" __declspec(dllimport) void * __stdcall CreateFileA (const char *, unsigned long, unsigned long, struct _SECURITY_ATTRIBUTES*, unsigned long, unsigned long, void *);
+extern "C" __declspec(dllimport) void * __stdcall CreateFileA (const char *, unsigned long, unsigned long, struct interprocess_security_attributes*, unsigned long, unsigned long, void *);
 extern "C" __declspec(dllimport) int __stdcall DeleteFileA (const char *);
 extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *);
 extern "C" __declspec(dllimport) int __stdcall FlushViewOfFile (void *, std::size_t);

Modified: branches/release/boost/interprocess/detail/workaround.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/workaround.hpp (original)
+++ branches/release/boost/interprocess/detail/workaround.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -13,6 +13,8 @@
 
 #include <boost/interprocess/detail/config_begin.hpp>
 
+#undef BOOST_DISABLE_WIN32
+
 #if !(defined BOOST_WINDOWS) || (defined BOOST_DISABLE_WIN32)
 
    #include <unistd.h>
@@ -105,8 +107,11 @@
 // defined by some very early development versions of GCC 4.3; we will
 // remove this part of the check in the near future.
 # if defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_INTERPROCESS_RVALUE_REFERENCE
-# define BOOST_INTERPROCESS_VARIADIC_TEMPLATES
+# define BOOST_INTERPROCESS_RVALUE_REFERENCE
+# define BOOST_INTERPROCESS_VARIADIC_TEMPLATES
+# if defined(__GLIBCPP__) || defined(__GLIBCXX__)
+# define BOOST_INTERPROCESS_RVALUE_PAIR
+# endif
 # endif
 #endif
 

Modified: branches/release/boost/interprocess/errors.hpp
==============================================================================
--- branches/release/boost/interprocess/errors.hpp (original)
+++ branches/release/boost/interprocess/errors.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -10,8 +10,8 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 //
-// Copyright © 2002 Beman Dawes
-// Copyright © 2001 Dietmar Kühl
+// Copyright (C) 2002 Beman Dawes
+// Copyright (C) 2001 Dietmar Kuehl
 // Use, modification, and distribution is subject to 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)

Modified: branches/release/boost/interprocess/file_mapping.hpp
==============================================================================
--- branches/release/boost/interprocess/file_mapping.hpp (original)
+++ branches/release/boost/interprocess/file_mapping.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -19,6 +19,7 @@
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/detail/os_file_functions.hpp>
+#include <boost/interprocess/detail/move.hpp>
 #include <string> //std::string
 #include <cstdio> //std::remove
 #include <string>
@@ -55,10 +56,12 @@
    //!After the call, "moved" does not represent any shared memory object.
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- file_mapping(detail::moved_object<file_mapping> &moved)
+ file_mapping(detail::moved_object<file_mapping> moved)
+ : m_handle(file_handle_t(detail::invalid_file()))
    { this->swap(moved.get()); }
    #else
    file_mapping(file_mapping &&moved)
+ : m_handle(file_handle_t(detail::invalid_file()))
    { this->swap(moved); }
    #endif
 
@@ -67,7 +70,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    file_mapping &operator=
- (detail::moved_object<file_mapping> &moved)
+ (detail::moved_object<file_mapping> moved)
    {
       file_mapping tmp(moved);
       this->swap(tmp);
@@ -76,7 +79,7 @@
    #else
    file_mapping &operator=(file_mapping &&moved)
    {
- file_mapping tmp(move(moved));
+ file_mapping tmp(detail::move_impl(moved));
       this->swap(tmp);
       return *this;
    }
@@ -157,6 +160,8 @@
    m_mode = mode;
 }
 
+///@cond
+
 inline void file_mapping::priv_close()
 {
    if(m_handle != detail::invalid_file()){
@@ -165,6 +170,33 @@
    }
 }
 
+
+//!Trait class to detect if a type is
+//!movable
+template<>
+struct is_movable<file_mapping>
+{
+ enum { value = true };
+};
+
+///@endcond
+
+//!A class that stores the name of a a file
+//!and call std::remove(name) in its destructor
+//!Useful to remove temporary files in the presence
+//!of exceptions
+class remove_file_on_destroy
+{
+ const char * m_name;
+ public:
+ remove_file_on_destroy(const char *name)
+ : m_name(name)
+ {}
+
+ ~remove_file_on_destroy()
+ { std::remove(m_name); }
+};
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/interprocess/indexes/map_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/map_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/map_index.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -77,7 +77,7 @@
    //!This tries to free previously allocate
    //!unused memory.
    void shrink_to_fit()
- { base_type::get_stored_allocator().deallocate_free_chunks(); }
+ { base_type::get_stored_allocator().deallocate_free_blocks(); }
 };
 
 /// @cond

Modified: branches/release/boost/interprocess/indexes/unordered_map_index.hpp
==============================================================================
--- branches/release/boost/interprocess/indexes/unordered_map_index.hpp (original)
+++ branches/release/boost/interprocess/indexes/unordered_map_index.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -27,6 +27,8 @@
 namespace boost {
 namespace interprocess {
 
+///@cond
+
 //!Helper class to define typedefs from
 //!IndexTraits
 template <class MapConfig>
@@ -55,6 +57,8 @@
                          key_equal, allocator_type> index_t;
 };
 
+///@endcond
+
 //!Index type based in unordered_map. Just derives from unordered_map and
 //!defines the interface needed by managed memory segments
 template <class MapConfig>

Modified: branches/release/boost/interprocess/interprocess_fwd.hpp
==============================================================================
--- branches/release/boost/interprocess/interprocess_fwd.hpp (original)
+++ branches/release/boost/interprocess/interprocess_fwd.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -120,26 +120,26 @@
 template<class T, class SegmentManager>
 class allocator;
 
-template<class T, class SegmentManager, std::size_t NodesPerChunk = 64>
+template<class T, class SegmentManager, std::size_t NodesPerBlock = 64>
 class node_allocator;
 
-template<class T, class SegmentManager, std::size_t NodesPerChunk = 64>
+template<class T, class SegmentManager, std::size_t NodesPerBlock = 64>
 class private_node_allocator;
 
-template<class T, class SegmentManager, std::size_t NodesPerChunk = 64>
+template<class T, class SegmentManager, std::size_t NodesPerBlock = 64>
 class cached_node_allocator;
 
-template<class T, class SegmentManager, std::size_t NodesPerChunk = 64, std::size_t MaxFreeChunks = 2
+template<class T, class SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class adaptive_pool;
 
-template<class T, class SegmentManager, std::size_t NodesPerChunk = 64, std::size_t MaxFreeChunks = 2
+template<class T, class SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class private_adaptive_pool;
 
-template<class T, class SegmentManager, std::size_t NodesPerChunk = 64, std::size_t MaxFreeChunks = 2
+template<class T, class SegmentManager, std::size_t NodesPerBlock = 64, std::size_t MaxFreeBlocks = 2
          , unsigned char OverheadPercent = 5
>
 class cached_adaptive_pool;

Modified: branches/release/boost/interprocess/ipc/message_queue.hpp
==============================================================================
--- branches/release/boost/interprocess/ipc/message_queue.hpp (original)
+++ branches/release/boost/interprocess/ipc/message_queue.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -98,7 +98,7 @@
 
    //!Sends a message stored in buffer "buffer" with size "buffer_size" in the
    //!message queue with priority "priority". If the message queue is full
- //!the sender is retries until time "abs_time" is reached. Returns true if
+ //!the sender retries until time "abs_time" is reached. Returns true if
    //!the message has been successfully sent. Returns false if timeout is reached.
    //!Throws interprocess_error on error.
    bool timed_send (const void *buffer, std::size_t buffer_size,
@@ -106,23 +106,23 @@
 
    //!Receives a message from the message queue. The message is stored in buffer
    //!"buffer", which has size "buffer_size". The received message has size
- //!"recvd_size" and priority "priority". If the message queue is full
- //!the sender is blocked. Throws interprocess_error on error.
+ //!"recvd_size" and priority "priority". If the message queue is empty
+ //!the receiver is blocked. Throws interprocess_error on error.
    void receive (void *buffer, std::size_t buffer_size,
                  std::size_t &recvd_size,unsigned int &priority);
 
    //!Receives a message from the message queue. The message is stored in buffer
    //!"buffer", which has size "buffer_size". The received message has size
- //!"recvd_size" and priority "priority". If the message queue is full
- //!the sender is not blocked and returns false, otherwise returns true.
+ //!"recvd_size" and priority "priority". If the message queue is empty
+ //!the receiver is not blocked and returns false, otherwise returns true.
    //!Throws interprocess_error on error.
    bool try_receive (void *buffer, std::size_t buffer_size,
                      std::size_t &recvd_size,unsigned int &priority);
 
    //!Receives a message from the message queue. The message is stored in buffer
    //!"buffer", which has size "buffer_size". The received message has size
- //!"recvd_size" and priority "priority". If the message queue is full
- //!the sender is retries until time "abs_time" is reached. Returns true if
+ //!"recvd_size" and priority "priority". If the message queue is empty
+ //!the receiver retries until time "abs_time" is reached. Returns true if
    //!the message has been successfully sent. Returns false if timeout is reached.
    //!Throws interprocess_error on error.
    bool timed_receive (void *buffer, std::size_t buffer_size,
@@ -368,7 +368,6 @@
 };
 
 } //namespace detail {
-/// @endcond
 
 inline message_queue::~message_queue()
 {}
@@ -611,6 +610,8 @@
 inline bool message_queue::remove(const char *name)
 { return shared_memory_object::remove(name); }
 
+/// @endcond
+
 }} //namespace boost{ namespace interprocess{
 
 #include <boost/interprocess/detail/config_end.hpp>

Modified: branches/release/boost/interprocess/managed_external_buffer.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_external_buffer.hpp (original)
+++ branches/release/boost/interprocess/managed_external_buffer.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -46,6 +46,12 @@
    /// @endcond
 
    public:
+
+ //!Default constructor. Does nothing.
+ //!Useful in combination with move semantics
+ basic_managed_external_buffer()
+ {}
+
    //!Creates and places the segment manager. This can throw
    basic_managed_external_buffer
       (create_only_t, void *addr, std::size_t size)
@@ -71,7 +77,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_external_buffer
- (detail::moved_object<basic_managed_external_buffer> &moved)
+ (detail::moved_object<basic_managed_external_buffer> moved)
    { this->swap(moved.get()); }
    #else
    basic_managed_external_buffer
@@ -82,7 +88,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_external_buffer &operator=
- (detail::moved_object<basic_managed_external_buffer> &moved)
+ (detail::moved_object<basic_managed_external_buffer> moved)
    { this->swap(moved.get()); return *this; }
    #else
    basic_managed_external_buffer &operator=
@@ -100,6 +106,26 @@
 
 };
 
+///@cond
+
+//!Trait class to detect if a type is
+//!movable
+template
+ <
+ class CharType,
+ class AllocationAlgorithm,
+ template<class IndexConfig> class IndexType
+ >
+struct is_movable<basic_managed_external_buffer
+ <CharType, AllocationAlgorithm, IndexType>
+>
+{
+ static const bool value = true;
+};
+
+///@endcond
+
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/interprocess/managed_heap_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_heap_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_heap_memory.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -50,7 +50,8 @@
 
    public: //functions
 
- //!Constructor. Never throws.
+ //!Default constructor. Does nothing.
+ //!Useful in combination with move semantics
    basic_managed_heap_memory(){}
 
    //!Destructor. Liberates the heap memory holding the managed data.
@@ -72,7 +73,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_heap_memory
- (detail::moved_object<basic_managed_heap_memory> &moved)
+ (detail::moved_object<basic_managed_heap_memory> moved)
    { this->swap(moved.get()); }
    #else
    basic_managed_heap_memory(basic_managed_heap_memory &&moved)
@@ -82,7 +83,7 @@
    //!Moves the ownership of "moved"'s managed memory to *this. Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_heap_memory &operator=
- (detail::moved_object<basic_managed_heap_memory> &moved)
+ (detail::moved_object<basic_managed_heap_memory> moved)
    { this->swap(moved.get()); return *this; }
    #else
    basic_managed_heap_memory &operator=
@@ -139,6 +140,25 @@
    /// @endcond
 };
 
+///@cond
+
+//!Trait class to detect if a type is
+//!movable
+template
+ <
+ class CharType,
+ class AllocationAlgorithm,
+ template<class IndexConfig> class IndexType
+ >
+struct is_movable<basic_managed_heap_memory
+ <CharType, AllocationAlgorithm, IndexType>
+>
+{
+ static const bool value = true;
+};
+
+///@endcond
+
 } //namespace interprocess {
 
 } //namespace boost {

Modified: branches/release/boost/interprocess/managed_mapped_file.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_mapped_file.hpp (original)
+++ branches/release/boost/interprocess/managed_mapped_file.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -22,15 +22,13 @@
 #include <boost/interprocess/creation_tags.hpp>
 #include <boost/interprocess/detail/file_wrapper.hpp>
 #include <boost/interprocess/detail/move.hpp>
-
-//!\file
-//!Describes a named shared memory object allocation user class.
+#include <boost/interprocess/file_mapping.hpp>
 
 namespace boost {
 namespace interprocess {
 
-//!A basic shared memory named object creation class. Initializes the
-//!shared memory segment. Inherits all basic functionality from
+//!A basic mapped file named object creation class. Initializes the
+//!mapped file. Inherits all basic functionality from
 //!basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType>
 template
       <
@@ -57,11 +55,19 @@
 
    basic_managed_mapped_file *get_this_pointer()
    { return this; }
+
+ private:
+ typedef typename base_t::char_ptr_holder_t char_ptr_holder_t;
    /// @endcond
 
    public: //functions
 
- //!Creates shared memory and creates and places the segment manager.
+ //!Creates mapped file and creates and places the segment manager.
+ //!This can throw.
+ basic_managed_mapped_file()
+ {}
+
+ //!Creates mapped file and creates and places the segment manager.
    //!This can throw.
    basic_managed_mapped_file(create_only_t create_only, const char *name,
                              std::size_t size, const void *addr = 0)
@@ -69,7 +75,7 @@
                 create_open_func_t(get_this_pointer(), detail::DoCreate))
    {}
 
- //!Creates shared memory and creates and places the segment manager if
+ //!Creates mapped file and creates and places the segment manager if
    //!segment was not created. If segment was created it connects to the
    //!segment.
    //!This can throw.
@@ -81,8 +87,8 @@
                 detail::DoOpenOrCreate))
    {}
 
- //!Connects to a created shared memory and it's the segment manager.
- //!Never throws.
+ //!Connects to a created mapped file and its segment manager.
+ //!This can throw.
    basic_managed_mapped_file (open_only_t open_only, const char* name,
                               const void *addr = 0)
       : m_mfile(open_only, name, read_write, addr,
@@ -90,11 +96,31 @@
                 detail::DoOpen))
    {}
 
+ //!Connects to a created mapped file and its segment manager
+ //!in copy_on_write mode.
+ //!This can throw.
+ basic_managed_mapped_file (open_copy_on_write_t, const char* name,
+ const void *addr = 0)
+ : m_mfile(open_only, name, copy_on_write, addr,
+ create_open_func_t(get_this_pointer(),
+ detail::DoOpen))
+ {}
+
+ //!Connects to a created mapped file and its segment manager
+ //!in read-only mode.
+ //!This can throw.
+ basic_managed_mapped_file (open_read_only_t, const char* name,
+ const void *addr = 0)
+ : m_mfile(open_only, name, read_only, addr,
+ create_open_func_t(get_this_pointer(),
+ detail::DoOpen))
+ {}
+
    //!Moves the ownership of "moved"'s managed memory to *this.
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_mapped_file
- (detail::moved_object<basic_managed_mapped_file> &moved)
+ (detail::moved_object<basic_managed_mapped_file> moved)
    { this->swap(moved.get()); }
    #else
    basic_managed_mapped_file(basic_managed_mapped_file &&moved)
@@ -105,7 +131,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_mapped_file &operator=
- (detail::moved_object<basic_managed_mapped_file> &moved)
+ (detail::moved_object<basic_managed_mapped_file> moved)
    { this->swap(moved.get()); return *this; }
    #else
    basic_managed_mapped_file &operator=(basic_managed_mapped_file &&moved)
@@ -156,11 +182,45 @@
    }
 
    /// @cond
+
+ //!Tries to find a previous named allocation address. Returns a memory
+ //!buffer and the object count. If not found returned pointer is 0.
+ //!Never throws.
+ template <class T>
+ std::pair<T*, std::size_t> find (char_ptr_holder_t name)
+ {
+ if(m_mfile.get_mapped_region().get_mode() == read_only){
+ return base_t::template find_no_lock<T>(name);
+ }
+ else{
+ return base_t::template find<T>(name);
+ }
+ }
+
    private:
    managed_open_or_create_type m_mfile;
    /// @endcond
 };
 
+///@cond
+
+//!Trait class to detect if a type is
+//!movable
+template
+ <
+ class CharType,
+ class AllocationAlgorithm,
+ template<class IndexConfig> class IndexType
+ >
+struct is_movable<basic_managed_mapped_file
+ <CharType, AllocationAlgorithm, IndexType>
+>
+{
+ static const bool value = true;
+};
+
+///@endcond
+
 } //namespace interprocess {
 
 } //namespace boost {

Modified: branches/release/boost/interprocess/managed_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_shared_memory.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -23,9 +23,6 @@
 #include <boost/interprocess/shared_memory_object.hpp>
 #include <boost/interprocess/creation_tags.hpp>
 
-//!\file
-//!Describes a named shared memory object allocation user class.
-
 namespace boost {
 
 namespace interprocess {
@@ -58,10 +55,11 @@
 
    typedef detail::create_open_func<base_t> create_open_func_t;
 
- basic_managed_shared_memory();
-
    basic_managed_shared_memory *get_this_pointer()
    { return this; }
+
+ private:
+ typedef typename base_t::char_ptr_holder_t char_ptr_holder_t;
    /// @endcond
 
    public: //functions
@@ -75,6 +73,11 @@
    ~basic_managed_shared_memory()
    {}
 
+ //!Default constructor. Does nothing.
+ //!Useful in combination with move semantics
+ basic_managed_shared_memory()
+ {}
+
    //!Creates shared memory and creates and places the segment manager.
    //!This can throw.
    basic_managed_shared_memory(create_only_t create_only, const char *name,
@@ -97,10 +100,32 @@
                 detail::DoOpenOrCreate))
    {}
 
- //!Connects to a created shared memory and it's the segment manager.
- //!Never throws.
+ //!Connects to a created shared memory and its segment manager.
+ //!in copy_on_write mode.
+ //!This can throw.
+ basic_managed_shared_memory (open_copy_on_write_t, const char* name,
+ const void *addr = 0)
+ : base_t()
+ , base2_t(open_only, name, copy_on_write, addr,
+ create_open_func_t(get_this_pointer(),
+ detail::DoOpen))
+ {}
+
+ //!Connects to a created shared memory and its segment manager.
+ //!in read-only mode.
+ //!This can throw.
+ basic_managed_shared_memory (open_read_only_t, const char* name,
+ const void *addr = 0)
+ : base_t()
+ , base2_t(open_only, name, read_only, addr,
+ create_open_func_t(get_this_pointer(),
+ detail::DoOpen))
+ {}
+
+ //!Connects to a created shared memory and its segment manager.
+ //!This can throw.
    basic_managed_shared_memory (open_only_t open_only, const char* name,
- const void *addr = 0)
+ const void *addr = 0)
       : base_t()
       , base2_t(open_only, name, read_write, addr,
                 create_open_func_t(get_this_pointer(),
@@ -111,7 +136,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_shared_memory
- (detail::moved_object<basic_managed_shared_memory> &moved)
+ (detail::moved_object<basic_managed_shared_memory> moved)
    { this->swap(moved.get()); }
    #else
    basic_managed_shared_memory(basic_managed_shared_memory &&moved)
@@ -122,7 +147,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_shared_memory &operator=
- (detail::moved_object<basic_managed_shared_memory> &moved)
+ (detail::moved_object<basic_managed_shared_memory> moved)
    { this->swap(moved.get()); return *this; }
    #else
    basic_managed_shared_memory &operator=(basic_managed_shared_memory &&moved)
@@ -157,8 +182,45 @@
       return base_t::template shrink_to_fit
          <basic_managed_shared_memory>(filename);
    }
+
+ /// @cond
+
+ //!Tries to find a previous named allocation address. Returns a memory
+ //!buffer and the object count. If not found returned pointer is 0.
+ //!Never throws.
+ template <class T>
+ std::pair<T*, std::size_t> find (char_ptr_holder_t name)
+ {
+ if(base2_t::get_mapped_region().get_mode() == read_only){
+ return base_t::template find_no_lock<T>(name);
+ }
+ else{
+ return base_t::template find<T>(name);
+ }
+ }
+
+ /// @endcond
+};
+
+///@cond
+
+//!Trait class to detect if a type is
+//!movable
+template
+ <
+ class CharType,
+ class AllocationAlgorithm,
+ template<class IndexConfig> class IndexType
+ >
+struct is_movable<basic_managed_shared_memory
+ <CharType, AllocationAlgorithm, IndexType>
+>
+{
+ static const bool value = true;
 };
 
+///@endcond
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/interprocess/managed_windows_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/managed_windows_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/managed_windows_shared_memory.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -23,9 +23,6 @@
 #include <boost/interprocess/windows_shared_memory.hpp>
 #include <boost/interprocess/detail/move.hpp>
 
-//!\file
-//!Describes a named shared memory object allocation user class.
-
 namespace boost {
 namespace interprocess {
 
@@ -60,9 +57,18 @@
 
    basic_managed_windows_shared_memory *get_this_pointer()
    { return this; }
+
+ private:
+ typedef typename base_t::char_ptr_holder_t char_ptr_holder_t;
    /// @endcond
 
    public: //functions
+
+ //!Default constructor. Does nothing.
+ //!Useful in combination with move semantics
+ basic_managed_windows_shared_memory()
+ {}
+
    //!Creates shared memory and creates and places the segment manager.
    //!This can throw.
    basic_managed_windows_shared_memory
@@ -85,20 +91,39 @@
                 detail::DoOpenOrCreate))
    {}
 
- //!Connects to a created shared memory and it's the segment manager.
- //!Never throws.
- basic_managed_windows_shared_memory (open_only_t open_only, const char* name,
- const void *addr = 0)
+ //!Connects to a created shared memory and its segment manager.
+ //!This can throw.
+ basic_managed_windows_shared_memory
+ (open_only_t open_only, const char* name, const void *addr = 0)
       : m_wshm(open_only, name, read_write, addr,
                 create_open_func_t(get_this_pointer(),
                 detail::DoOpen))
    {}
 
+ //!Connects to a created shared memory and its segment manager
+ //!in copy_on_write mode.
+ //!This can throw.
+ basic_managed_windows_shared_memory
+ (open_copy_on_write_t, const char* name, const void *addr = 0)
+ : m_wshm(open_only, name, copy_on_write, addr,
+ create_open_func_t(get_this_pointer(), detail::DoOpen))
+ {}
+
+ //!Connects to a created shared memory and its segment manager
+ //!in read-only mode.
+ //!This can throw.
+ basic_managed_windows_shared_memory
+ (open_read_only_t, const char* name, const void *addr = 0)
+ : base_t()
+ , m_wshm(open_only, name, read_only, addr,
+ create_open_func_t(get_this_pointer(), detail::DoOpen))
+ {}
+
    //!Moves the ownership of "moved"'s managed memory to *this.
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_windows_shared_memory
- (detail::moved_object<basic_managed_windows_shared_memory> &moved)
+ (detail::moved_object<basic_managed_windows_shared_memory> moved)
    { this->swap(moved.get()); }
    #else
    basic_managed_windows_shared_memory(basic_managed_windows_shared_memory &&moved)
@@ -109,7 +134,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    basic_managed_windows_shared_memory &operator=
- (detail::moved_object<basic_managed_windows_shared_memory> &moved)
+ (detail::moved_object<basic_managed_windows_shared_memory> moved)
    { this->swap(moved.get()); return *this; }
    #else
    basic_managed_windows_shared_memory &operator=
@@ -133,11 +158,45 @@
       m_wshm.swap(other.m_wshm);
    }
    /// @cond
+
+ //!Tries to find a previous named allocation address. Returns a memory
+ //!buffer and the object count. If not found returned pointer is 0.
+ //!Never throws.
+ template <class T>
+ std::pair<T*, std::size_t> find (char_ptr_holder_t name)
+ {
+ if(m_wshm.get_mapped_region().get_mode() == read_only){
+ return base_t::template find_no_lock<T>(name);
+ }
+ else{
+ return base_t::template find<T>(name);
+ }
+ }
+
    private:
    detail::managed_open_or_create_impl<windows_shared_memory, false> m_wshm;
    /// @endcond
 };
 
+///@cond
+
+//!Trait class to detect if a type is
+//!movable
+template
+ <
+ class CharType,
+ class AllocationAlgorithm,
+ template<class IndexConfig> class IndexType
+ >
+struct is_movable<basic_managed_windows_shared_memory
+ <CharType, AllocationAlgorithm, IndexType>
+>
+{
+ static const bool value = true;
+};
+
+///@endcond
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/interprocess/mapped_region.hpp
==============================================================================
--- branches/release/boost/interprocess/mapped_region.hpp (original)
+++ branches/release/boost/interprocess/mapped_region.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -45,6 +45,8 @@
 
 /// @cond
 namespace detail{ class interprocess_tester; }
+namespace detail{ class raw_mapped_region_creator; }
+
 /// @endcond
 
 //!The mapped_region class represents a portion or region created from a
@@ -107,6 +109,10 @@
    //!mapped memory. Never throws.
    offset_t get_offset() const;
 
+ //!Returns the mode of the mapping used to contruct the mapped file.
+ //!Never throws.
+ mode_t get_mode() const;
+
    //!Flushes to the disk a byte range within the mapped memory.
    //!Never throws
    bool flush(std::size_t mapping_offset = 0, std::size_t numbytes = 0);
@@ -135,15 +141,19 @@
    std::size_t m_size;
    offset_t m_offset;
    offset_t m_extra_offset;
+ mode_t m_mode;
    #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
    file_handle_t m_file_mapping_hnd;
    #endif
 
    friend class detail::interprocess_tester;
+ friend class detail::raw_mapped_region_creator;
    void dont_close_on_destruction();
    /// @endcond
 };
 
+///@cond
+
 inline void swap(mapped_region &x, mapped_region &y)
 { x.swap(y); }
 
@@ -161,16 +171,19 @@
 inline std::size_t mapped_region::get_size() const
 { return m_size; }
 
-inline offset_t mapped_region::get_offset() const
+inline offset_t mapped_region::get_offset() const
 { return m_offset; }
 
+inline mode_t mapped_region::get_mode() const
+{ return m_mode; }
+
 inline void* mapped_region::get_address() const
 { return m_base; }
 
 #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
 
 inline mapped_region::mapped_region()
- : m_base(0), m_size(0), m_offset(0), m_extra_offset(0)
+ : m_base(0), m_size(0), m_offset(0), m_extra_offset(0), m_mode(read_only)
    , m_file_mapping_hnd(detail::invalid_file())
 {}
 
@@ -178,12 +191,14 @@
 inline mapped_region::mapped_region(detail::moved_object<mapped_region> other)
    : m_base(0), m_size(0), m_offset(0)
    , m_extra_offset(0)
+ , m_mode(read_only)
    , m_file_mapping_hnd(detail::invalid_file())
 { this->swap(other.get()); }
 #else
 inline mapped_region::mapped_region(mapped_region &&other)
    : m_base(0), m_size(0), m_offset(0)
    , m_extra_offset(0)
+ , m_mode(read_only)
    , m_file_mapping_hnd(detail::invalid_file())
 { this->swap(other); }
 #endif
@@ -203,7 +218,7 @@
    ,offset_t offset
    ,std::size_t size
    ,const void *address)
- : m_base(0), m_size(0), m_offset(0), m_extra_offset(0)
+ : m_base(0), m_size(0), m_offset(0), m_extra_offset(0), m_mode(mode)
    , m_file_mapping_hnd(detail::invalid_file())
 {
    mapping_handle_t mhandle = mapping.get_mapping_handle();
@@ -362,9 +377,9 @@
       m_base = 0;
    }
    #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
- if(m_file_mapping_hnd){
+ if(m_file_mapping_hnd != detail::invalid_file()){
          winapi::close_handle(m_file_mapping_hnd);
- m_file_mapping_hnd = 0;
+ m_file_mapping_hnd = detail::invalid_file();
       }
    #endif
 }
@@ -375,16 +390,16 @@
 #else //#if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
 
 inline mapped_region::mapped_region()
- : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0)
+ : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0), m_mode(read_only)
 {}
 
 #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
 inline mapped_region::mapped_region(detail::moved_object<mapped_region> other)
- : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0)
+ : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0), m_mode(read_only)
 { this->swap(other.get()); }
 #else
 inline mapped_region::mapped_region(mapped_region &&other)
- : m_base(MAP_FAILED), m_size(0), m_offset(0)
+ : m_base(MAP_FAILED), m_size(0), m_offset(0), m_mode(read_only)
    , m_extra_offset(0)
 { this->swap(other); }
 #endif
@@ -400,7 +415,7 @@
    offset_t offset,
    std::size_t size,
    const void *address)
- : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0)
+ : m_base(MAP_FAILED), m_size(0), m_offset(0), m_extra_offset(0), m_mode(mode)
 {
    if(size == 0){
 // offset_t filesize = lseek64
@@ -441,7 +456,7 @@
       break;
 
       case copy_on_write:
- prot |= PROT_READ;
+ prot |= (PROT_WRITE | PROT_READ);
          flags |= MAP_PRIVATE;
       break;
    
@@ -537,19 +552,26 @@
    detail::do_swap(this->m_size, other.m_size);
    detail::do_swap(this->m_offset, other.m_offset);
    detail::do_swap(this->m_extra_offset, other.m_extra_offset);
+ detail::do_swap(this->m_mode, other.m_mode);
    #if (defined BOOST_WINDOWS) && !(defined BOOST_DISABLE_WIN32)
    detail::do_swap(this->m_file_mapping_hnd, other.m_file_mapping_hnd);
    #endif
 }
 
-/// @cond
-
 //!No-op functor
 struct null_mapped_region_function
 {
    bool operator()(void *, std::size_t , bool) const
       { return true; }
 };
+
+//!Trait class to detect if a type is
+//!movable
+template<>
+struct is_movable<mapped_region>
+{
+ enum { value = true };
+};
 /// @endcond
 
 } //namespace interprocess {

Modified: branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/mem_algo_common.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -23,6 +23,8 @@
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/detail/iterators.hpp>
+#include <boost/interprocess/detail/math_functions.hpp>
+#include <boost/interprocess/detail/utilities.hpp>
 #include <boost/assert.hpp>
 #include <boost/static_assert.hpp>
 
@@ -281,6 +283,101 @@
       return this_type::priv_allocate_many(memory_algo, &elem_bytes, n_elements, 0);
    }
 
+ static bool calculate_lcm_and_needs_backwards_lcmed
+ (std::size_t backwards_multiple, std::size_t received_size, std::size_t size_to_achieve,
+ std::size_t &lcm_out, std::size_t &needs_backwards_lcmed_out)
+ {
+ // Now calculate lcm
+ std::size_t max = backwards_multiple;
+ std::size_t min = Alignment;
+ std::size_t needs_backwards;
+ std::size_t needs_backwards_lcmed;
+ std::size_t lcm;
+ std::size_t current_forward;
+ //Swap if necessary
+ if(max < min){
+ std::size_t tmp = min;
+ min = max;
+ max = tmp;
+ }
+ //Check if it's power of two
+ if((backwards_multiple & (backwards_multiple-1)) == 0){
+ if(0 != (size_to_achieve & ((backwards_multiple-1)))){
+ return false;
+ }
+
+ lcm = max;
+ //If we want to use minbytes data to get a buffer between maxbytes
+ //and minbytes if maxbytes can't be achieved, calculate the
+ //biggest of all possibilities
+ current_forward = detail::get_truncated_size_po2(received_size, backwards_multiple);
+ needs_backwards = size_to_achieve - current_forward;
+ assert((needs_backwards % backwards_multiple) == 0);
+ needs_backwards_lcmed = detail::get_rounded_size_po2(needs_backwards, lcm);
+ lcm_out = lcm;
+ needs_backwards_lcmed_out = needs_backwards_lcmed;
+ return true;
+ }
+ //Check if it's multiple of alignment
+ else if((backwards_multiple & (Alignment - 1u)) == 0){
+ lcm = backwards_multiple;
+ current_forward = detail::get_truncated_size(received_size, backwards_multiple);
+ //No need to round needs_backwards because backwards_multiple == lcm
+ needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
+ assert((needs_backwards_lcmed & (Alignment - 1u)) == 0);
+ lcm_out = lcm;
+ needs_backwards_lcmed_out = needs_backwards_lcmed;
+ return true;
+ }
+ //Check if it's multiple of the half of the alignmment
+ else if((backwards_multiple & ((Alignment/2u) - 1u)) == 0){
+ lcm = backwards_multiple*2u;
+ current_forward = detail::get_truncated_size(received_size, backwards_multiple);
+ needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
+ if(0 != (needs_backwards_lcmed & (Alignment-1)))
+ //while(0 != (needs_backwards_lcmed & (Alignment-1)))
+ needs_backwards_lcmed += backwards_multiple;
+ assert((needs_backwards_lcmed % lcm) == 0);
+ lcm_out = lcm;
+ needs_backwards_lcmed_out = needs_backwards_lcmed;
+ return true;
+ }
+ //Check if it's multiple of the half of the alignmment
+ else if((backwards_multiple & ((Alignment/4u) - 1u)) == 0){
+ std::size_t remainder;
+ lcm = backwards_multiple*4u;
+ current_forward = detail::get_truncated_size(received_size, backwards_multiple);
+ needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
+ //while(0 != (needs_backwards_lcmed & (Alignment-1)))
+ //needs_backwards_lcmed += backwards_multiple;
+ if(0 != (remainder = ((needs_backwards_lcmed & (Alignment-1))>>(Alignment/8u)))){
+ if(backwards_multiple & Alignment/2u){
+ needs_backwards_lcmed += (remainder)*backwards_multiple;
+ }
+ else{
+ needs_backwards_lcmed += (4-remainder)*backwards_multiple;
+ }
+ }
+ assert((needs_backwards_lcmed % lcm) == 0);
+ lcm_out = lcm;
+ needs_backwards_lcmed_out = needs_backwards_lcmed;
+ return true;
+ }
+ else{
+ lcm = detail::lcm(max, min);
+ }
+ //If we want to use minbytes data to get a buffer between maxbytes
+ //and minbytes if maxbytes can't be achieved, calculate the
+ //biggest of all possibilities
+ current_forward = detail::get_truncated_size(received_size, backwards_multiple);
+ needs_backwards = size_to_achieve - current_forward;
+ assert((needs_backwards % backwards_multiple) == 0);
+ needs_backwards_lcmed = detail::get_rounded_size(needs_backwards, lcm);
+ lcm_out = lcm;
+ needs_backwards_lcmed_out = needs_backwards_lcmed;
+ return true;
+ }
+
    static multiallocation_iterator allocate_many
       ( MemoryAlgorithm *memory_algo
       , const std::size_t *elem_sizes
@@ -309,13 +406,13 @@
       if(nbytes > UsableByPreviousChunk)
          nbytes -= UsableByPreviousChunk;
       
- //We can find a aligned portion if we allocate a chunk that has alignment
+ //We can find a aligned portion if we allocate a block that has alignment
       //nbytes + alignment bytes or more.
       std::size_t minimum_allocation = max_value
          (nbytes + alignment, std::size_t(MinBlockUnits*Alignment));
- //Since we will split that chunk, we must request a bit more memory
+ //Since we will split that block, we must request a bit more memory
       //if the alignment is near the beginning of the buffer, because otherwise,
- //there is no space for a new chunk before the alignment.
+ //there is no space for a new block before the alignment.
       //
       // ____ Aligned here
       // |
@@ -390,7 +487,7 @@
       // | MBU +more | ACB | (3) | BCU |
       // -----------------------------------------------------
       //This size will be the minimum size to be able to create a
- //new chunk in the end.
+ //new block in the end.
       const std::size_t second_min_units = max_value(std::size_t(MinBlockUnits),
                         ceil_units(nbytes) + AllocatedCtrlUnits );
 

Modified: branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -564,7 +564,7 @@
                         T *reuse_ptr)
 {
    std::pair<void*, bool> ret = priv_allocation_command
- (command, limit_size, preferred_size, received_size, reuse_ptr, sizeof(T));
+ (command, limit_size, preferred_size, received_size, (void*)reuse_ptr, sizeof(T));
 
    BOOST_ASSERT(0 == ((std::size_t)ret.first % detail::alignment_of<T>::value));
    return std::pair<T *, bool>(static_cast<T*>(ret.first), ret.second);
@@ -577,7 +577,7 @@
                         void *reuse_ptr, std::size_t sizeof_object)
 {
    if(!sizeof_object)
- return std::pair<void *, bool>(0, 0);
+ return std::pair<void *, bool>((void*)0, 0);
    if(command & try_shrink_in_place){
       bool success = algo_impl_t::try_shrink
          ( this, reuse_ptr, limit_objects*sizeof_object
@@ -596,7 +596,7 @@
                        void *reuse_ptr, std::size_t sizeof_object)
 {
    command &= ~expand_bwd;
- if(!command) return std::pair<void *, bool>(0, false);
+ if(!command) return std::pair<void *, bool>((void*)0, false);
 
    std::pair<void*, bool> ret;
    std::size_t max_count = m_header.m_size/sizeof_object;
@@ -769,7 +769,7 @@
    received_size = 0;
 
    if(limit_size > preferred_size)
- return return_type(0, false);
+ return return_type((void*)0, false);
 
    //Number of units to request (including block_ctrl header)
    std::size_t nunits = detail::get_rounded_size(preferred_size, Alignment)/Alignment + BlockCtrlUnits;
@@ -819,7 +819,7 @@
       if(biggest_block){
          std::size_t limit_units = detail::get_rounded_size(limit_size, Alignment)/Alignment + BlockCtrlUnits;
          if(biggest_block->m_size < limit_units)
- return return_type(0, false);
+ return return_type((void*)0, false);
 
          received_size = biggest_block->m_size*Alignment - BlockCtrlUnits;
          void *ret = this->priv_check_and_allocate
@@ -836,7 +836,7 @@
       algo_impl_t::assert_alignment(ret.first);
       return ret;
    }
- return return_type(0, false);
+ return return_type((void*)0, false);
 }
 
 template<class MutexFamily, class VoidPointer> inline
@@ -888,13 +888,13 @@
    }
 
    if(prev_block == root || !prev_block->m_next)
- return prev_pair_t(0, 0);
+ return prev_pair_t((block_ctrl*)0, (block_ctrl*)0);
 
    //Check if the previous block is in the managed segment
    std::size_t distance = (detail::char_ptr_cast(prev_block) - detail::char_ptr_cast(this))/Alignment;
    if(distance >= (m_header.m_size/Alignment)){
       //"previous_block" does not exist so we can't expand "block"
- return prev_pair_t(0, 0);
+ return prev_pair_t((block_ctrl*)0, (block_ctrl*)0);
    }
    return prev_pair_t(prev_2_block, prev_block);
 }

Modified: branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp (original)
+++ branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -352,6 +352,8 @@
    static const std::size_t PayloadPerAllocation = AllocatedCtrlBytes - UsableByPreviousChunk;
 };
 
+/// @cond
+
 template<class MutexFamily, class VoidPointer, std::size_t MemAlignment>
 inline std::size_t rbtree_best_fit<MutexFamily, VoidPointer, MemAlignment>
    ::priv_first_block_offset(const void *this_ptr, std::size_t extra_hdr_bytes)
@@ -651,7 +653,7 @@
                         T *reuse_ptr)
 {
    std::pair<void*, bool> ret = priv_allocation_command
- (command, limit_size, preferred_size, received_size, reuse_ptr, sizeof(T));
+ (command, limit_size, preferred_size, received_size, (void*)reuse_ptr, sizeof(T));
 
    BOOST_ASSERT(0 == ((std::size_t)ret.first % detail::alignment_of<T>::value));
    return std::pair<T *, bool>(static_cast<T*>(ret.first), ret.second);
@@ -664,7 +666,7 @@
                         void *reuse_ptr, std::size_t sizeof_object)
 {
    if(!sizeof_object)
- return std::pair<void *, bool>(0, 0);
+ return std::pair<void *, bool>((void *)0, 0);
    if(command & try_shrink_in_place){
       bool success = algo_impl_t::try_shrink
          ( this, reuse_ptr, limit_objects*sizeof_object
@@ -776,26 +778,16 @@
       assert(prev_block->m_size == reuse->m_prev_size);
       algo_impl_t::assert_alignment(prev_block);
 
- //Let's calculate the number of extra bytes of data before the current
- //block's begin. The value is a multiple of backwards_multiple
- std::size_t needs_backwards = preferred_size -
- detail::get_truncated_size(received_size, backwards_multiple);
-
- const std::size_t lcm = detail::lcm(max_value(backwards_multiple, (std::size_t)Alignment)
- ,min_value(backwards_multiple, (std::size_t)Alignment));
-
- //If we want to use min_size data to get a buffer between preferred_size
- //and min_size if preferred_size can't be achieved, calculate the
- //biggest of all possibilities
- if(!only_preferred_backwards){
- needs_backwards = min_size - detail::get_truncated_size(received_size, backwards_multiple);
+ std::size_t needs_backwards_aligned;
+ std::size_t lcm;
+ if(!algo_impl_t::calculate_lcm_and_needs_backwards_lcmed
+ ( backwards_multiple
+ , received_size
+ , only_preferred_backwards ? preferred_size : min_size
+ , lcm, needs_backwards_aligned)){
+ return 0;
       }
 
- assert((needs_backwards % backwards_multiple) == 0);
-
- const std::size_t needs_backwards_aligned =
- detail::get_rounded_size(needs_backwards, lcm);
-
       //Check if previous block has enough size
       if(std::size_t(prev_block->m_size*Alignment) >= needs_backwards_aligned){
          //Now take all next space. This will succeed
@@ -822,7 +814,7 @@
             assert(prev_block->m_size >= BlockCtrlUnits);
             priv_mark_as_free_block(prev_block);
 
- //Update the old previous block in the free chunks tree
+ //Update the old previous block in the free blocks tree
             //If the new size fulfills tree invariants do nothing,
             //otherwise erase() + insert()
             {
@@ -857,10 +849,8 @@
             m_header.m_imultiset.erase(Imultiset::s_iterator_to(*prev_block));
 
             //Just merge the whole previous block
- needs_backwards = detail::get_truncated_size
- (prev_block->m_size*Alignment, backwards_multiple);
- //received_size = received_size/backwards_multiple*backwards_multiple + needs_backwards;
- received_size = received_size + needs_backwards;
+ //prev_block->m_size*Alignment is multiple of lcm (and backwards_multiple)
+ received_size = received_size + prev_block->m_size*Alignment;
 
             m_header.m_allocated += prev_block->m_size*Alignment;
             //Now update sizes
@@ -942,7 +932,7 @@
    received_size = 0;
 
    if(limit_size > preferred_size)
- return return_type(0, false);
+ return return_type((void*)0, false);
 
    //Number of units to request (including block_ctrl header)
    std::size_t preferred_units = priv_get_total_units(preferred_size);
@@ -981,7 +971,7 @@
          (command, limit_size, preferred_size, received_size, reuse_ptr, false, backwards_multiple), true);
    }
 
- return return_type(0, false);
+ return return_type((void*)0, false);
 }
 
 template<class MutexFamily, class VoidPointer, std::size_t MemAlignment>
@@ -1070,12 +1060,12 @@
       assert(next_block->m_size == priv_next_block(next_block)->m_prev_size);
       const std::size_t rem_units = merged_units - intended_units;
 
- //Check if we we need to update the old next block in the free chunks tree
+ //Check if we we need to update the old next block in the free blocks tree
       //If the new size fulfills tree invariants, we just need to replace the node
       //(the block start has been displaced), otherwise erase() + insert().
       //
- //This fixup must be done in two parts, because the new next chunk might
- //overwrite the tree hook of the old next chunk. So we first erase the
+ //This fixup must be done in two parts, because the new next block might
+ //overwrite the tree hook of the old next block. So we first erase the
       //old if needed and we'll insert the new one after creating the new next
       imultiset_iterator old_next_block_it(Imultiset::s_iterator_to(*next_block));
       const bool size_invariants_broken =
@@ -1304,7 +1294,7 @@
    bool merge_with_prev = !priv_is_prev_allocated(block);
    bool merge_with_next = !priv_is_allocated_block(next_block);
 
- //Merge logic. First just update block sizes, then fix free chunks tree
+ //Merge logic. First just update block sizes, then fix free blocks tree
    if(merge_with_prev || merge_with_next){
       //Merge if the previous is free
       if(merge_with_prev){
@@ -1344,10 +1334,11 @@
    priv_mark_as_free_block(block_to_insert);
 }
 
+/// @endcond
+
 } //namespace interprocess {
 } //namespace boost {
 
 #include <boost/interprocess/detail/config_end.hpp>
 
 #endif //#ifndef BOOST_INTERPROCESS_MEM_ALGO_RBTREE_BEST_FIT_HPP
-

Modified: branches/release/boost/interprocess/offset_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/offset_ptr.hpp (original)
+++ branches/release/boost/interprocess/offset_ptr.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -53,9 +53,6 @@
 {
    /// @cond
    typedef offset_ptr<PointedType> self_t;
- typedef const PointedType * const_pointer_t;
- typedef typename detail::add_reference
- <const PointedType>::type const_reference_t;
 
    void unspecified_bool_type_func() const {}
    typedef void (self_t::*unspecified_bool_type)() const;
@@ -64,6 +61,9 @@
    __declspec(noinline) //this workaround is needed for msvc-8.0 and msvc-9.0
    #endif
    void set_offset(const volatile void *ptr)
+ { set_offset((const void*)ptr); }
+
+ void set_offset(const void *ptr)
    {
       const char *p = static_cast<const char*>(const_cast<const void*>(ptr));
       //offset == 1 && ptr != 0 is not legal for this pointer
@@ -402,68 +402,44 @@
 
 //Predeclaration to avoid including header
 template<class VoidPointer, std::size_t N>
-struct has_pointer_plus_bit;
+struct max_pointer_plus_bits;
 
-template<std::size_t N>
-struct has_pointer_plus_bit<boost::interprocess::offset_ptr<void>, N>
+template<std::size_t Alignment>
+struct max_pointer_plus_bits<boost::interprocess::offset_ptr<void>, Alignment>
 {
- static const bool value = (N % 4u == 0);
+ //The offset ptr can embed one bit less than the alignment since it
+ //uses offset == 1 to store the null pointer.
+ static const std::size_t value = ::boost::interprocess::detail::ls_zeros<Alignment>::value - 1;
 };
 
 //Predeclaration
-template<class Pointer>
-struct pointer_plus_bit;
+template<class Pointer, std::size_t NumBits>
+struct pointer_plus_bits;
 
-//Specialization
-template<class T>
-struct pointer_plus_bit<boost::interprocess::offset_ptr<T> >
+template<class T, std::size_t NumBits>
+struct pointer_plus_bits<boost::interprocess::offset_ptr<T>, NumBits>
 {
    typedef boost::interprocess::offset_ptr<T> pointer;
+ //Bits are stored in the lower bits of the pointer except the LSB,
+ //because this bit is used to represent the null pointer.
+ static const std::size_t Mask = ((std::size_t(1) << NumBits)-1)<<1u;
 
    static pointer get_pointer(const pointer &n)
- { return (T*)(std::size_t(n.get()) & ~std::size_t(2u)); }
+ { return (T*)(std::size_t(n.get()) & ~std::size_t(Mask)); }
 
    static void set_pointer(pointer &n, pointer p)
- { n = (T*)(std::size_t(p.get()) | (std::size_t(n.get()) & std::size_t(2u))); }
-
- static bool get_bit(const pointer &n)
- { return 0 != (std::size_t(n.get()) & std::size_t(2u)); }
-
- static void set_bit(pointer &n, bool c)
- { n = (T*)(std::size_t(get_pointer(n).get()) | (std::size_t(c) << 1u)); }
-};
-
-//Predeclaration to avoid including header
-template<class VoidPointer, std::size_t N>
-struct has_pointer_plus_2_bits;
-
-template<std::size_t N>
-struct has_pointer_plus_2_bits<boost::interprocess::offset_ptr<void>, N>
-{
- static const bool value = (N % 8u == 0);
-};
-
-//Predeclaration
-template<class Pointer>
-struct pointer_plus_2_bits;
-
-template<class T>
-struct pointer_plus_2_bits<boost::interprocess::offset_ptr<T> >
-{
- typedef boost::interprocess::offset_ptr<T> pointer;
-
- static pointer get_pointer(const pointer &n)
- { return (T*)(std::size_t(n.get()) & ~std::size_t(6u)); }
-
- static void set_pointer(pointer &n, pointer p)
- { n = (T*)(std::size_t(p.get()) | (std::size_t(n.get()) & std::size_t(6u))); }
+ {
+ std::size_t pint = std::size_t(p.get());
+ assert(0 == (std::size_t(pint) & Mask));
+ n = (T*)(pint | (std::size_t(n.get()) & std::size_t(Mask)));
+ }
 
    static std::size_t get_bits(const pointer &n)
- { return(std::size_t(n.get()) & std::size_t(6u)) >> 1u; }
+ { return(std::size_t(n.get()) & std::size_t(Mask)) >> 1u; }
 
    static void set_bits(pointer &n, std::size_t b)
    {
- assert(b < 4);
+ assert(b < (std::size_t(1) << NumBits));
       n = (T*)(std::size_t(get_pointer(n).get()) | (b << 1u));
    }
 };

Modified: branches/release/boost/interprocess/segment_manager.hpp
==============================================================================
--- branches/release/boost/interprocess/segment_manager.hpp (original)
+++ branches/release/boost/interprocess/segment_manager.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -32,6 +32,8 @@
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
+#include <boost/interprocess/detail/move.hpp>
+#include <boost/interprocess/sync/scoped_lock.hpp>
 #include <cstddef> //std::size_t
 #include <string> //char_traits
 #include <new> //std::nothrow
@@ -292,7 +294,7 @@
       block_header_t *ctrl_data = block_header_t::block_header_from_value(object, table.size, table.alignment);
 
       //-------------------------------
- //boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ //scoped_lock<rmutex> guard(m_header);
       //-------------------------------
 
       if(ctrl_data->allocation_type() != anonymous_type){
@@ -423,10 +425,10 @@
       void *ret;
 
       if(name == reinterpret_cast<const CharType*>(-1)){
- ret = priv_generic_find<char> (typeid(T).name(), m_header.m_unique_index, table, size, is_intrusive_t());
+ ret = priv_generic_find<char> (typeid(T).name(), m_header.m_unique_index, table, size, is_intrusive_t(), true);
       }
       else{
- ret = priv_generic_find<CharType> (name, m_header.m_named_index, table, size, is_intrusive_t());
+ ret = priv_generic_find<CharType> (name, m_header.m_named_index, table, size, is_intrusive_t(), true);
       }
       return std::pair<T*, std::size_t>(static_cast<T*>(ret), size);
    }
@@ -439,7 +441,7 @@
    {
       detail::placement_destroy<T> table;
       std::size_t size;
- void *ret = priv_generic_find<char>(name, m_header.m_unique_index, table, size, is_intrusive_t());
+ void *ret = priv_generic_find<char>(name, m_header.m_unique_index, table, size, is_intrusive_t(), true);
       return std::pair<T*, std::size_t>(static_cast<T*>(ret), size);
    }
 
@@ -502,7 +504,7 @@
    //!executing the object function call*/
    template <class Func>
    void atomic_func(Func &f)
- { boost::interprocess::scoped_lock<rmutex> guard(m_header); f(); }
+ { scoped_lock<rmutex> guard(m_header); f(); }
 
    //!Destroys a previously created unique instance.
    //!Returns false if the object was not present.
@@ -559,7 +561,7 @@
    void reserve_named_objects(std::size_t num)
    {
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       m_header.m_named_index.reserve(num);
    }
@@ -570,7 +572,7 @@
    void reserve_unique_objects(std::size_t num)
    {
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       m_header.m_unique_index.reserve(num);
    }
@@ -580,7 +582,7 @@
    void shrink_to_fit_indexes()
    {
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       m_header.m_named_index.shrink_to_fit();
       m_header.m_unique_index.shrink_to_fit();
@@ -591,7 +593,7 @@
    std::size_t get_num_named_objects()
    {
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       return m_header.m_named_index.size();
    }
@@ -601,7 +603,7 @@
    std::size_t get_num_unique_objects()
    {
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       return m_header.m_unique_index.size();
    }
@@ -688,6 +690,39 @@
          (priv_generic_construct(name, num, try2find, dothrow, table));
    }
 
+ //!Tries to find a previous named allocation. Returns the address
+ //!and the object count. On failure the first member of the
+ //!returned pair is 0.
+ template <class T>
+ std::pair<T*, std::size_t> find_no_lock (const CharType* name)
+ {
+ //The name can't be null, no anonymous object can be found by name
+ assert(name != 0);
+ detail::placement_destroy<T> table;
+ std::size_t size;
+ void *ret;
+
+ if(name == reinterpret_cast<const CharType*>(-1)){
+ ret = priv_generic_find<char> (typeid(T).name(), m_header.m_unique_index, table, size, is_intrusive_t(), false);
+ }
+ else{
+ ret = priv_generic_find<CharType> (name, m_header.m_named_index, table, size, is_intrusive_t(), false);
+ }
+ return std::pair<T*, std::size_t>(static_cast<T*>(ret), size);
+ }
+
+ //!Tries to find a previous unique allocation. Returns the address
+ //!and the object count. On failure the first member of the
+ //!returned pair is 0.
+ template <class T>
+ std::pair<T*, std::size_t> find_no_lock (const detail::unique_instance_t* name)
+ {
+ detail::placement_destroy<T> table;
+ std::size_t size;
+ void *ret = priv_generic_find<char>(name, m_header.m_unique_index, table, size, is_intrusive_t(), false);
+ return std::pair<T*, std::size_t>(static_cast<T*>(ret), size);
+ }
+
    private:
    void *priv_generic_construct(const CharType *name,
                          std::size_t num,
@@ -790,7 +825,8 @@
        IndexType<detail::index_config<CharT, MemoryAlgorithm> > &index,
        detail::in_place_interface &table,
        std::size_t &length,
- detail::true_ is_intrusive)
+ detail::true_ is_intrusive,
+ bool use_lock)
    {
       (void)is_intrusive;
       typedef IndexType<detail::index_config<CharT, MemoryAlgorithm> > index_type;
@@ -798,7 +834,7 @@
       typedef typename index_type::iterator index_it;
 
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(priv_get_lock(use_lock));
       //-------------------------------
       //Find name in index
       detail::intrusive_compare_key<CharT> key
@@ -829,7 +865,8 @@
        IndexType<detail::index_config<CharT, MemoryAlgorithm> > &index,
        detail::in_place_interface &table,
        std::size_t &length,
- detail::false_ is_intrusive)
+ detail::false_ is_intrusive,
+ bool use_lock)
    {
       (void)is_intrusive;
       typedef IndexType<detail::index_config<CharT, MemoryAlgorithm> > index_type;
@@ -837,7 +874,7 @@
       typedef typename index_type::iterator index_it;
 
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(priv_get_lock(use_lock));
       //-------------------------------
       //Find name in index
       index_it it = index.find(key_type(name, std::char_traits<CharT>::length(name)));
@@ -900,7 +937,7 @@
       typedef typename index_type::value_type intrusive_value_type;
       
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       //Find name in index
       detail::intrusive_compare_key<CharT> key
@@ -950,7 +987,7 @@
       typedef typename index_type::key_type key_type;
 
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       //Try to find the name in the index
       index_it it = index.find(key_type (name,
@@ -1038,7 +1075,7 @@
       typedef std::pair<index_it, bool> index_ib;
 
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       //Insert the node. This can throw.
       //First, we want to know if the key is already present before
@@ -1118,7 +1155,7 @@
 
       //Initialize the node value_eraser to erase inserted node
       //if something goes wrong
- detail::value_eraser<index_type> value_eraser(index, it);
+ value_eraser<index_type> v_eraser(index, it);
       
       //Avoid constructions if constructor is trivial
       //Build scoped ptr to avoid leaks with constructor exception
@@ -1130,8 +1167,8 @@
 
       //All constructors successful, we don't want to release memory
       mem.release();
- //Release node value_eraser since construction was successful
- value_eraser.release();
+ //Release node v_eraser since construction was successful
+ v_eraser.release();
       return ptr;
    }
 
@@ -1164,7 +1201,7 @@
       typedef std::pair<index_it, bool> index_ib;
 
       //-------------------------------
- boost::interprocess::scoped_lock<rmutex> guard(m_header);
+ scoped_lock<rmutex> guard(m_header);
       //-------------------------------
       //Insert the node. This can throw.
       //First, we want to know if the key is already present before
@@ -1204,7 +1241,7 @@
       }
       //Initialize the node value_eraser to erase inserted node
       //if something goes wrong
- detail::value_eraser<index_type> value_eraser(index, it);
+ value_eraser<index_type> v_eraser(index, it);
 
       //Allocates buffer for name + data, this can throw (it hurts)
       void *buffer_ptr;
@@ -1260,8 +1297,8 @@
       //All constructors successful, we don't want to release memory
       mem.release();
 
- //Release node value_eraser since construction was successful
- value_eraser.release();
+ //Release node v_eraser since construction was successful
+ v_eraser.release();
       return ptr;
    }
 
@@ -1272,6 +1309,20 @@
 
    typedef typename MemoryAlgorithm::mutex_family::recursive_mutex_type rmutex;
 
+ #ifdef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ scoped_lock<rmutex>
+ #else
+ detail::move_return<scoped_lock<rmutex> >
+ #endif
+ priv_get_lock(bool use_lock)
+ {
+ scoped_lock<rmutex> local(m_header, defer_lock);
+ if(use_lock){
+ local.lock();
+ }
+ return local;
+ }
+
    //!This struct includes needed data and derives from
    //!rmutex to allow EBO when using null interprocess_mutex
    struct header_t

Modified: branches/release/boost/interprocess/shared_memory_object.hpp
==============================================================================
--- branches/release/boost/interprocess/shared_memory_object.hpp (original)
+++ branches/release/boost/interprocess/shared_memory_object.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -76,10 +76,12 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    shared_memory_object
- (detail::moved_object<shared_memory_object> &moved)
+ (const detail::moved_object<shared_memory_object> moved)
+ : m_handle(file_handle_t(detail::invalid_file()))
    { this->swap(moved.get()); }
    #else
    shared_memory_object(shared_memory_object &&moved)
+ : m_handle(file_handle_t(detail::invalid_file()))
    { this->swap(moved); }
    #endif
 
@@ -88,7 +90,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    shared_memory_object &operator=
- (detail::moved_object<shared_memory_object> &moved)
+ (detail::moved_object<shared_memory_object> moved)
    {
       shared_memory_object tmp(moved);
       this->swap(tmp);
@@ -97,7 +99,7 @@
    #else
    shared_memory_object &operator=(shared_memory_object &&moved)
    {
- shared_memory_object tmp(move(moved));
+ shared_memory_object tmp(detail::move_impl(moved));
       this->swap(tmp);
       return *this;
    }
@@ -150,6 +152,8 @@
    /// @endcond
 };
 
+/// @cond
+
 inline shared_memory_object::shared_memory_object()
    : m_handle(file_handle_t(detail::invalid_file()))
 {}
@@ -341,6 +345,32 @@
 
 #endif
 
+//!Trait class to detect if a type is
+//!movable
+template<>
+struct is_movable<shared_memory_object>
+{
+ enum { value = true };
+};
+
+///@endcond
+
+//!A class that stores the name of a shared memory
+//!and calls shared_memory_object::remove(name) in its destructor
+//!Useful to remove temporary shared memory objects in the presence
+//!of exceptions
+class remove_shared_memory_on_destroy
+{
+ const char * m_name;
+ public:
+ remove_shared_memory_on_destroy(const char *name)
+ : m_name(name)
+ {}
+
+ ~remove_shared_memory_on_destroy()
+ { shared_memory_object::remove(m_name); }
+};
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -73,6 +73,11 @@
    {}
 
    template <class Ptr>
+ shared_count(const shared_count &other_shared_count, const Ptr &p)
+ : m_px(p), m_pi(other_shared_count.m_pi)
+ {}
+
+ template <class Ptr>
    shared_count(const Ptr &p, const VoidAllocator &a, Deleter d)
       : m_px(p), m_pi(0)
    {

Modified: branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/enable_shared_from_this.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -27,6 +27,10 @@
 namespace boost{
 namespace interprocess{
 
+//!This class is used as a base class that allows a shared_ptr to the current
+//!object to be obtained from within a member function.
+//!enable_shared_from_this defines two member functions called shared_from_this
+//!that return a shared_ptr<T> and shared_ptr<T const>, depending on constness, to this.
 template<class T, class A, class D>
 class enable_shared_from_this
 {
@@ -60,7 +64,6 @@
       return p;
    }
 
- private:
    /// @cond
    typedef T element_type;
    mutable weak_ptr<element_type, A, D> _internal_weak_this;

Modified: branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -24,6 +24,7 @@
 #include <boost/assert.hpp>
 #include <boost/interprocess/smart_ptr/detail/shared_count.hpp>
 #include <boost/interprocess/detail/mpl.hpp>
+#include <boost/interprocess/detail/move.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
@@ -47,19 +48,21 @@
 
 template<class T, class VoidAllocator, class Deleter>
 inline void sp_enable_shared_from_this
- (shared_count<T, VoidAllocator, Deleter> const & pn,
- const typename pointer_to_other <typename shared_count<T, VoidAllocator, Deleter>::pointer,
- enable_shared_from_this<T, VoidAllocator, Deleter> >::type &pe,
- const typename shared_count<T, VoidAllocator, Deleter>::pointer &px)
+ (shared_count<T, VoidAllocator, Deleter> const & pn
+ ,enable_shared_from_this<T, VoidAllocator, Deleter> *pe
+ ,T *ptr)
+
 {
- if(pe != 0)
+ (void)ptr;
+ if(pe != 0){
       pe->_internal_weak_this._internal_assign(pn);
+ }
 }
-/*
+
 template<class T, class VoidAllocator, class Deleter>
 inline void sp_enable_shared_from_this(shared_count<T, VoidAllocator, Deleter> const &, ...)
 {}
-*/
+
 } // namespace detail
 
 //!shared_ptr stores a pointer to a dynamically allocated object.
@@ -122,9 +125,17 @@
       typedef typename detail::pointer_to_other<pointer, T>::type ParameterPointer;
       BOOST_STATIC_ASSERT((detail::is_same<pointer, ParameterPointer>::value) ||
                           (detail::is_pointer<pointer>::value));
- //detail::sp_enable_shared_from_this( m_pn, p, p );
+ detail::sp_enable_shared_from_this<T, VoidAllocator, Deleter>( m_pn, detail::get_pointer(p), detail::get_pointer(p) );
    }
 
+
+ //!Constructs a shared_ptr that shares ownership with r and stores p.
+ //!Postconditions: get() == p && use_count() == r.use_count().
+ //!Throws: nothing.
+ shared_ptr(const shared_ptr &other, const pointer &p)
+ : m_pn(other.m_pn, p)
+ {}
+
    //!If r is empty, constructs an empty shared_ptr. Otherwise, constructs
    //!a shared_ptr that shares ownership with r. Never throws.
    template<class Y>
@@ -139,6 +150,19 @@
       : m_pn(r.m_pn) // may throw
    {}
 
+ //!Move-Constructs a shared_ptr that takes ownership of other resource and
+ //!other is put in default-constructed state.
+ //!Throws: nothing.
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ explicit shared_ptr(detail::moved_object<shared_ptr> other)
+ : m_pn()
+ { this->swap(other.get()); }
+ #else
+ explicit shared_ptr(shared_ptr &&other)
+ : m_pn()
+ { this->swap(other); }
+ #endif
+
    /// @cond
    template<class Y>
    shared_ptr(shared_ptr<Y, VoidAllocator, Deleter> const & r, detail::static_cast_tag)
@@ -172,6 +196,22 @@
       return *this;
    }
 
+ //!Move-assignment. Equivalent to shared_ptr(other).swap(*this).
+ //!Never throws
+ #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
+ shared_ptr & operator=(detail::moved_object<shared_ptr> other) // never throws
+ {
+ this_type(other).swap(*this);
+ return *this;
+ }
+ #else
+ shared_ptr & operator=(shared_ptr &&other) // never throws
+ {
+ this_type(other).swap(*this);
+ return *this;
+ }
+ #endif
+
    //!This is equivalent to:
    //!this_type().swap(*this);
    void reset()
@@ -192,6 +232,12 @@
       this_type(p, a, d).swap(*this);
    }
 
+ template<class Y>
+ void reset(shared_ptr<Y, VoidAllocator, Deleter> const & r, const pointer &p)
+ {
+ this_type(r, p).swap(*this);
+ }
+
    //!Returns a reference to the
    //!pointed type
    reference operator* () const // never throws
@@ -333,6 +379,18 @@
    get_deleter(shared_ptr<T, VoidAllocator, Deleter> const & p)
 { return static_cast<Deleter *>(p._internal_get_deleter(typeid(Deleter))); }
 */
+
+/// @cond
+
+//!This class has move constructor
+template <class T, class VA, class D>
+struct is_movable<boost::interprocess::shared_ptr<T, VA, D> >
+{
+ enum { value = true };
+};
+
+/// @endcond
+
 } // namespace interprocess
 
 /// @cond

Modified: branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/unique_ptr.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -138,11 +138,11 @@
    //!
    //!Effects: Constructs a unique_ptr which owns the pointer which u owns
    //!(if any). If the deleter is not a reference type, it is move constructed
- //!from u’s deleter, otherwise the reference is copy constructed from u’s deleter.
+ //!from u's deleter, otherwise the reference is copy constructed from u's deleter.
    //!
    //!After the construction, u no longer owns a pointer.
    //![ Note: The deleter constructor can be implemented with
- //!std::forward<D>. —end note ]
+ //!std::detail::forward_impl<D>. -end note ]
    //!
    //!Postconditions: get() == value u.get() had before the construction.
    //!get_deleter() returns a reference to the internally stored deleter which
@@ -152,11 +152,11 @@
    //!Throws: nothing.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    unique_ptr(detail::moved_object<unique_ptr> u)
- : ptr_(u.get().release(), move(u.get().get_deleter()))
+ : ptr_(u.get().release(), detail::move_impl(u.get().get_deleter()))
    {}
    #else
    unique_ptr(unique_ptr &&u)
- : ptr_(u.release(), forward<D>(u.get_deleter()))
+ : ptr_(u.release(), detail::forward_impl<D>(u.get_deleter()))
    {}
    #endif
 
@@ -168,8 +168,8 @@
    //!
    //!Effects: Constructs a unique_ptr which owns the pointer which u owns
    //!(if any). If the deleter is not a reference
- //!type, it is move constructed from u’s deleter, otherwise the reference
- //!is copy constructed from u’s deleter.
+ //!type, it is move constructed from u's deleter, otherwise the reference
+ //!is copy constructed from u's deleter.
    //!
    //!After the construction, u no longer owns a pointer.
    //!
@@ -181,7 +181,7 @@
    //!Throws: nothing.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    template <class U, class E>
- unique_ptr(const detail::moved_object<unique_ptr<U, E> >& u,
+ unique_ptr(detail::moved_object<unique_ptr<U, E> > u,
       typename detail::enable_if_c<
             detail::is_convertible<typename unique_ptr<U, E>::pointer, pointer>::value &&
             detail::is_convertible<E, D>::value &&
@@ -192,12 +192,12 @@
             ,
             nat
>::type = nat())
- : ptr_(const_cast<unique_ptr<U,E>&>(u.get()).release(), move(u.get().get_deleter()))
+ : ptr_(const_cast<unique_ptr<U,E>&>(u.get()).release(), detail::move_impl(u.get().get_deleter()))
    {}
    #else
    template <class U, class E>
    unique_ptr(unique_ptr<U, E> && u,
- typename boost::enable_if_c<
+ typename detail::enable_if_c<
             detail::is_convertible<typename unique_ptr<U, E>::pointer, pointer>::value &&
             detail::is_convertible<E, D>::value &&
             (
@@ -207,7 +207,7 @@
             ,
             nat
>::type = nat())
- : ptr_(const_cast<unique_ptr<U,E>&>(u).release(), forward<D>(u.get_deleter()))
+ : ptr_(const_cast<unique_ptr<U,E>&>(u).release(), detail::forward_impl<D>(u.get_deleter()))
    {}
    #endif
 
@@ -221,7 +221,7 @@
 
    //!Requires: Assignment of the deleter D from an rvalue D must not throw an exception.
    //!
- //!Effects: reset(u.release()) followed by a move assignment from u’s deleter to
+ //!Effects: reset(u.release()) followed by a move assignment from u's deleter to
    //!this deleter.
    //!
    //!Postconditions: This unique_ptr now owns the pointer which u owned, and u no
@@ -231,17 +231,17 @@
    //!
    //!Throws: nothing.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- unique_ptr& operator=(const detail::moved_object<unique_ptr>& u)
+ unique_ptr& operator=(detail::moved_object<unique_ptr> u)
    {
       reset(u.get().release());
- ptr_.second() = move(u.get().get_deleter());
+ ptr_.second() = detail::move_impl(u.get().get_deleter());
       return *this;
    }
    #else
- unique_ptr(unique_ptr && u)
+ unique_ptr& operator=(unique_ptr && u)
    {
       reset(u.release());
- ptr_.second() = move(u.get_deleter());
+ ptr_.second() = detail::move_impl(u.get_deleter());
       return *this;
    }
    #endif
@@ -250,7 +250,7 @@
    //!throw an exception. U* must be implicitly convertible to T*.
    //!
    //!Effects: reset(u.release()) followed by a move assignment from
- //!u’s deleter to this deleter. If either D or E is
+ //!u's deleter to this deleter. If either D or E is
    //!a reference type, then the referenced lvalue deleter participates
    //!in the move assignment.
    //!
@@ -262,17 +262,17 @@
    //!Throws: nothing.
    template <class U, class E>
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- unique_ptr& operator=(const detail::moved_object<unique_ptr<U, E> >& mu)
+ unique_ptr& operator=(detail::moved_object<unique_ptr<U, E> > mu)
    {
       reset(mu.get().release());
- ptr_.second() = move(mu.get().get_deleter());
+ ptr_.second() = detail::move_impl(mu.get().get_deleter());
       return *this;
    }
    #else
- unique_ptr(unique_ptr<U, E> && u)
+ unique_ptr& operator=(unique_ptr<U, E> && u)
    {
       reset(u.release());
- ptr_.second() = move(u.get_deleter());
+ ptr_.second() = detail::move_impl(u.get_deleter());
       return *this;
    }
    #endif
@@ -356,8 +356,8 @@
 
    //!Requires: The deleter D is Swappable and will not throw an exception under swap.
    //!
- //!Effects: The stored pointers of this and u are exchanged. The stored deleters are swap’d (unqualified).
- //!
+ //!Effects: The stored pointers of this and u are exchanged.
+ //! The stored deleters are swapped (unqualified).
    //!Throws: nothing.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    void swap(unique_ptr& u)
@@ -597,9 +597,13 @@
 //!with boost::interproces::deleter from a pointer
 //!of type T that has been allocated in the passed managed segment
 template<class T, class ManagedMemory>
+#ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
 inline typename detail::return_type
    <typename managed_unique_ptr<T, ManagedMemory>::type
>::type
+#else
+typename managed_unique_ptr<T, ManagedMemory>::type
+#endif
    make_managed_unique_ptr(T *constructed_object, ManagedMemory &managed_memory)
 {
    typename managed_unique_ptr<T, ManagedMemory>::type to_return

Modified: branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp (original)
+++ branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -200,7 +200,10 @@
    
    template<class Y>
    void _internal_assign(const detail::shared_count<Y, A, D> & pn2)
- { m_pn = pn2; }
+ {
+
+ m_pn = pn2;
+ }
 
    private:
 

Modified: branches/release/boost/interprocess/sync/emulation/interprocess_condition.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/emulation/interprocess_condition.hpp (original)
+++ branches/release/boost/interprocess/sync/emulation/interprocess_condition.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -9,7 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
-
+#include <boost/interprocess/detail/move.hpp>
 namespace boost {
 namespace interprocess {
 
@@ -86,11 +86,23 @@
       if(now >= abs_time) return false;
    }
 
+ typedef boost::interprocess::scoped_lock<interprocess_mutex> InternalLock;
    //The enter interprocess_mutex guarantees that while executing a notification,
    //no other thread can execute the do_timed_wait method.
    {
       //---------------------------------------------------------------
- boost::interprocess::scoped_lock<interprocess_mutex> lock(m_enter_mut);
+ InternalLock lock;
+ if(tout_enabled){
+ InternalLock dummy(m_enter_mut, abs_time);
+ lock = detail::move_impl(dummy);
+ }
+ else{
+ InternalLock dummy(m_enter_mut);
+ lock = detail::move_impl(dummy);
+ }
+
+ if(!lock)
+ return false;
       //---------------------------------------------------------------
       //We increment the waiting thread count protected so that it will be
       //always constant when another thread enters the notification logic.
@@ -146,7 +158,18 @@
          //Notification occurred, we will lock the checking interprocess_mutex so that
          //if a notify_one notification occurs, only one thread can exit
         //---------------------------------------------------------------
- boost::interprocess::scoped_lock<interprocess_mutex> lock(m_check_mut);
+ InternalLock lock;
+ if(tout_enabled){
+ InternalLock dummy(m_check_mut, abs_time);
+ lock = detail::move_impl(dummy);
+ }
+ else{
+ InternalLock dummy(m_check_mut);
+ lock = detail::move_impl(dummy);
+ }
+
+ if(!lock)
+ return false;
          //---------------------------------------------------------------
          boost::uint32_t result = detail::atomic_cas32
                         ((boost::uint32_t*)&m_command, SLEEP, NOTIFY_ONE);

Modified: branches/release/boost/interprocess/sync/file_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/file_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/file_lock.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -20,6 +20,7 @@
 #include <boost/interprocess/exceptions.hpp>
 #include <cassert>
 #include <boost/interprocess/detail/os_file_functions.hpp>
+#include <boost/interprocess/detail/os_thread_functions.hpp>
 #include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 
 //!\file
@@ -31,6 +32,8 @@
 //!A file lock, is a mutual exclusion utility similar to a mutex using a
 //!file. A file lock has sharable and exclusive locking capabilities and
 //!can be used with scoped_lock and sharable_lock classes.
+//!A file lock can't guarantee synchronization between threads of the same
+//!process so just use file locks to synchronize threads from different processes.
 class file_lock
 {
    /// @cond
@@ -108,62 +111,6 @@
 
    bool timed_acquire_file_lock
       (file_handle_t hnd, bool &acquired, const boost::posix_time::ptime &abs_time)
- {
- //Obtain current count and target time
- boost::posix_time::ptime now = microsec_clock::universal_time();
- using namespace boost::detail;
-
- if(now >= abs_time) return false;
-
- do{
- if(!try_acquire_file_lock(hnd, acquired))
- return false;
-
- if(acquired)
- return true;
- else{
- now = microsec_clock::universal_time();
-
- if(now >= abs_time){
- acquired = false;
- return true;
- }
- // relinquish current time slice
- winapi::sched_yield();
- }
- }while (true);
- }
-
- bool timed_acquire_file_lock_sharable
- (file_handle_t hnd, bool &acquired, const boost::posix_time::ptime &abs_time)
- {
- //Obtain current count and target time
- boost::posix_time::ptime now = microsec_clock::universal_time();
- using namespace boost::detail;
-
- if(now >= abs_time) return false;
-
- do{
- if(!try_acquire_file_lock_sharable(hnd, acquired))
- return false;
-
- if(acquired)
- return true;
- else{
- now = microsec_clock::universal_time();
-
- if(now >= abs_time){
- acquired = false;
- return true;
- }
- // relinquish current time slice
- winapi::sched_yield();
- }
- }while (true);
- }
-
- bool timed_acquire_file_lock
- (file_handle_t hnd, bool &acquired, const boost::posix_time::ptime &abs_time)
    {
       //Obtain current count and target time
       boost::posix_time::ptime now = microsec_clock::universal_time();
@@ -172,7 +119,7 @@
       if(now >= abs_time) return false;
 
       do{
- if(!try_acquire_file_lock(hnd, acquired))
+ if(!detail::try_acquire_file_lock(hnd, acquired))
             return false;
 
          if(acquired)
@@ -185,7 +132,7 @@
                return true;
             }
             // relinquish current time slice
- sleep(0);
+ detail::thread_yield();
          }
       }while (true);
    }
@@ -200,7 +147,7 @@
       if(now >= abs_time) return false;
 
       do{
- if(!try_acquire_file_lock_sharable(hnd, acquired))
+ if(!detail::try_acquire_file_lock_sharable(hnd, acquired))
             return false;
 
          if(acquired)
@@ -213,7 +160,7 @@
                return true;
             }
             // relinquish current time slice
- ::sleep(0);
+ detail::thread_yield();
          }
       }while (true);
    }
@@ -259,7 +206,7 @@
 inline bool file_lock::timed_lock(const boost::posix_time::ptime &abs_time)
 {
    bool result;
- if(!detail::timed_acquire_file_lock(m_file_hnd, result, abs_time)){
+ if(!this->timed_acquire_file_lock(m_file_hnd, result, abs_time)){
       error_info err(system_error_code());
       throw interprocess_exception(err);
    }
@@ -295,7 +242,7 @@
 inline bool file_lock::timed_lock_sharable(const boost::posix_time::ptime &abs_time)
 {
    bool result;
- if(!detail::timed_acquire_file_lock_sharable(m_file_hnd, result, abs_time)){
+ if(!this->timed_acquire_file_lock_sharable(m_file_hnd, result, abs_time)){
       error_info err(system_error_code());
       throw interprocess_exception(err);
    }

Modified: branches/release/boost/interprocess/sync/interprocess_condition.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_condition.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_condition.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -50,6 +50,8 @@
 
 class named_condition;
 
+//!This class is a condition variable that can be placed in shared memory or
+//!memory mapped files.
 class interprocess_condition
 {
    /// @cond

Modified: branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/interprocess_upgradable_mutex.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -266,6 +266,8 @@
    /// @endcond
 };
 
+/// @cond
+
 template <int Dummy>
 const unsigned interprocess_upgradable_mutex::base_constants_t<Dummy>::max_readers;
 
@@ -633,8 +635,9 @@
    return true;
 }
 
-} //namespace interprocess {
+/// @endcond
 
+} //namespace interprocess {
 } //namespace boost {
 
 

Modified: branches/release/boost/interprocess/sync/named_condition.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_condition.hpp (original)
+++ branches/release/boost/interprocess/sync/named_condition.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -40,6 +40,9 @@
 namespace detail{ class interprocess_tester; }
 /// @endcond
 
+//! A global condition variable that can be created by name.
+//! This condition variable is designed to work with named_mutex and
+//! can't be placed in shared memory or memory mapped files.
 class named_condition
 {
    /// @cond
@@ -146,21 +149,30 @@
    template <class Lock>
    void do_wait(Lock& lock)
    {
+ //lock internal before unlocking external to avoid race with a notifier
+ scoped_lock<interprocess_mutex> internal_lock(*this->mutex());
       lock_inverter<Lock> inverted_lock(lock);
- //unlock internal first to avoid deadlock with near simultaneous waits
       scoped_lock<lock_inverter<Lock> > external_unlock(inverted_lock);
- scoped_lock<interprocess_mutex> internal_lock(*this->mutex());
- this->condition()->wait(internal_lock);
+
+ //unlock internal first to avoid deadlock with near simultaneous waits
+ scoped_lock<interprocess_mutex> internal_unlock;
+ internal_lock.swap(internal_unlock);
+ this->condition()->wait(internal_unlock);
    }
 
    template <class Lock>
    bool do_timed_wait(Lock& lock, const boost::posix_time::ptime &abs_time)
    {
- //unlock internal first to avoid deadlock with near simultaneous waits
- lock_inverter<Lock> inverted_lock(lock);
- scoped_lock<lock_inverter<Lock> > external_unlock(inverted_lock);
- scoped_lock<interprocess_mutex> internal_lock(*this->mutex());
- return this->condition()->timed_wait(internal_lock, abs_time);
+ //lock internal before unlocking external to avoid race with a notifier
+ scoped_lock<interprocess_mutex> internal_lock(*this->mutex(), abs_time);
+ if(!internal_lock) return false;
+ lock_inverter<Lock> inverted_lock(lock);
+ scoped_lock<lock_inverter<Lock> > external_unlock(inverted_lock);
+
+ //unlock internal first to avoid deadlock with near simultaneous waits
+ scoped_lock<interprocess_mutex> internal_unlock;
+ internal_lock.swap(internal_unlock);
+ return this->condition()->timed_wait(internal_unlock, abs_time);
    }
    #endif
 
@@ -174,6 +186,8 @@
    /// @endcond
 };
 
+/// @cond
+
 inline named_condition::~named_condition()
 {}
 
@@ -320,6 +334,8 @@
 inline bool named_condition::remove(const char *name)
 { return shared_memory_object::remove(name); }
 
+/// @endcond
+
 } //namespace interprocess
 } //namespace boost
 

Modified: branches/release/boost/interprocess/sync/named_recursive_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_recursive_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/named_recursive_mutex.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -108,6 +108,8 @@
    /// @endcond
 };
 
+/// @cond
+
 inline named_recursive_mutex::~named_recursive_mutex()
 {}
 
@@ -159,6 +161,8 @@
 inline bool named_recursive_mutex::remove(const char *name)
 { return shared_memory_object::remove(name); }
 
+/// @endcond
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp (original)
+++ branches/release/boost/interprocess/sync/named_upgradable_mutex.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -233,6 +233,8 @@
    /// @endcond
 };
 
+/// @cond
+
 inline named_upgradable_mutex::~named_upgradable_mutex()
 {}
 
@@ -339,8 +341,9 @@
 inline bool named_upgradable_mutex::remove(const char *name)
 { return shared_memory_object::remove(name); }
 
-} //namespace interprocess {
+/// @endcond
 
+} //namespace interprocess {
 } //namespace boost {
 
 #include <boost/interprocess/detail/config_end.hpp>

Modified: branches/release/boost/interprocess/sync/scoped_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/scoped_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/scoped_lock.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -122,15 +122,16 @@
    //! to thisscoped_lock with no blocking. If the scop scoped_lock does not
    //! own the mutex, then neither will this scoped_lock. Only a moved
    //! scoped_lock's will match this signature. An non-moved scoped_lock
- //! can be moved with the expression: "move(lock);". This
+ //! can be moved with the expression: "detail::move_impl(lock);". This
    //! constructor does not alter the state of the mutex, only potentially
    //! who owns it.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit scoped_lock(detail::moved_object<scoped_lock<Mutex> > scop)
+ scoped_lock(detail::moved_object<scoped_lock<Mutex> > scop)
       : mp_mutex(0), m_locked(scop.get().owns())
    { mp_mutex = scop.get().release(); }
    #else
- explicit scoped_lock(scoped_lock<Mutex> &&scop)
+
+ scoped_lock(scoped_lock &&scop)
       : mp_mutex(0), m_locked(scop.owns())
    { mp_mutex = scop.release(); }
    #endif
@@ -144,11 +145,11 @@
    //! unlocking upgr. If upgr is unlocked, then this scoped_lock will be
    //! unlocked as well. Only a moved upgradable_lock's will match this
    //! signature. An non-moved upgradable_lock can be moved with
- //! the expression: "move(lock);" This constructor may block if
+ //! the expression: "detail::move_impl(lock);" This constructor may block if
    //! other threads hold a sharable_lock on this mutex (sharable_lock's can
    //! share ownership with an upgradable_lock).
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit scoped_lock(detail::moved_object<upgradable_lock<Mutex> > upgr)
+ scoped_lock(detail::moved_object<upgradable_lock<Mutex> > upgr)
       : mp_mutex(0), m_locked(false)
    {
       upgradable_lock<mutex_type> &u_lock = upgr.get();
@@ -159,7 +160,7 @@
       mp_mutex = u_lock.release();
    }
    #else
- explicit scoped_lock(upgradable_lock<Mutex> &&upgr)
+ scoped_lock(upgradable_lock<Mutex> &&upgr)
       : mp_mutex(0), m_locked(false)
    {
       upgradable_lock<mutex_type> &u_lock = upgr;
@@ -326,7 +327,7 @@
    //! mutex after the assignment (and scop will not), but the mutex's lock
    //! count will be decremented by one.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- scoped_lock &operator=(detail::moved_object<scoped_lock<Mutex> > scop)
+ scoped_lock &operator=(detail::moved_object<scoped_lock> scop)
    {
       if(this->owns())
          this->unlock();
@@ -335,7 +336,7 @@
       return *this;
    }
    #else
- scoped_lock &operator=(scoped_lock<Mutex> &&scop)
+ scoped_lock &operator=(scoped_lock &&scop)
    {
       if(this->owns())
          this->unlock();

Modified: branches/release/boost/interprocess/sync/sharable_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/sharable_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/sharable_lock.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -127,14 +127,14 @@
    //! sharable_lock with no blocking. If the upgr sharable_lock does not own the mutex, then
    //! neither will this sharable_lock. Only a moved sharable_lock's will match this
    //! signature. An non-moved sharable_lock can be moved with the expression:
- //! "move(lock);". This constructor does not alter the state of the mutex,
+ //! "detail::move_impl(lock);". This constructor does not alter the state of the mutex,
    //! only potentially who owns it.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit sharable_lock(detail::moved_object<sharable_lock<mutex_type> > upgr)
+ sharable_lock(detail::moved_object<sharable_lock<mutex_type> > upgr)
       : mp_mutex(0), m_locked(upgr.get().owns())
    { mp_mutex = upgr.get().release(); }
    #else
- explicit sharable_lock(sharable_lock<mutex_type> &&upgr)
+ sharable_lock(sharable_lock<mutex_type> &&upgr)
       : mp_mutex(0), m_locked(upgr.owns())
    { mp_mutex = upgr.release(); }
    #endif
@@ -147,9 +147,9 @@
    //!Notes: If upgr is locked, this constructor will lock this sharable_lock while
    //! unlocking upgr. Only a moved sharable_lock's will match this
    //! signature. An non-moved upgradable_lock can be moved with the expression:
- //! "move(lock);".*/
+ //! "detail::move_impl(lock);".*/
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit sharable_lock(detail::moved_object<upgradable_lock<mutex_type> > upgr)
+ sharable_lock(detail::moved_object<upgradable_lock<mutex_type> > upgr)
       : mp_mutex(0), m_locked(false)
    {
       upgradable_lock<mutex_type> &u_lock = upgr.get();
@@ -160,7 +160,7 @@
       mp_mutex = u_lock.release();
    }
    #else
- explicit sharable_lock(upgradable_lock<mutex_type> &&upgr)
+ sharable_lock(upgradable_lock<mutex_type> &&upgr)
       : mp_mutex(0), m_locked(false)
    {
       upgradable_lock<mutex_type> &u_lock = upgr;
@@ -181,9 +181,9 @@
    //! to a sharable-ownership of this sharable_lock.
    //! Only a moved scoped_lock's will match this
    //! signature. An non-moved scoped_lock can be moved with the expression:
- //! "move(lock);".*/
+ //! "detail::move_impl(lock);".*/
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit sharable_lock(detail::moved_object<scoped_lock<mutex_type> > scop)
+ sharable_lock(detail::moved_object<scoped_lock<mutex_type> > scop)
       : mp_mutex(0), m_locked(false)
    {
       scoped_lock<mutex_type> &e_lock = scop.get();
@@ -194,7 +194,7 @@
       mp_mutex = e_lock.release();
    }
    #else
- explicit sharable_lock(scoped_lock<mutex_type> &&scop)
+ sharable_lock(scoped_lock<mutex_type> &&scop)
       : mp_mutex(0), m_locked(false)
    {
       scoped_lock<mutex_type> &e_lock = scop;

Modified: branches/release/boost/interprocess/sync/upgradable_lock.hpp
==============================================================================
--- branches/release/boost/interprocess/sync/upgradable_lock.hpp (original)
+++ branches/release/boost/interprocess/sync/upgradable_lock.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -121,14 +121,14 @@
    //! while unlocking upgr. If upgr is unlocked, then this upgradable_lock will
    //! be unlocked as well. Only a moved upgradable_lock's will match this
    //! signature. An non-moved upgradable_lock can be moved with the
- //! expression: "move(lock);". This constructor does not alter the
+ //! expression: "detail::move_impl(lock);". This constructor does not alter the
    //! state of the mutex, only potentially who owns it.
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit upgradable_lock(detail::moved_object<upgradable_lock<mutex_type> > upgr)
+ upgradable_lock(detail::moved_object<upgradable_lock<mutex_type> > upgr)
       : mp_mutex(0), m_locked(upgr.get().owns())
    { mp_mutex = upgr.get().release(); }
    #else
- explicit upgradable_lock(upgradable_lock<mutex_type> &&upgr)
+ upgradable_lock(upgradable_lock<mutex_type> &&upgr)
       : mp_mutex(0), m_locked(upgr.owns())
    { mp_mutex = upgr.release(); }
    #endif
@@ -141,9 +141,9 @@
    //! to an upgradable-ownership of this upgradable_lock.
    //! Only a moved sharable_lock's will match this
    //! signature. An non-moved sharable_lock can be moved with the
- //! expression: "move(lock);".
+ //! expression: "detail::move_impl(lock);".
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
- explicit upgradable_lock(detail::moved_object<scoped_lock<mutex_type> > scop)
+ upgradable_lock(detail::moved_object<scoped_lock<mutex_type> > scop)
       : mp_mutex(0), m_locked(false)
    {
       scoped_lock<mutex_type> &u_lock = scop.get();
@@ -154,7 +154,7 @@
       mp_mutex = u_lock.release();
    }
    #else
- explicit upgradable_lock(scoped_lock<mutex_type> &&scop)
+ upgradable_lock(scoped_lock<mutex_type> &&scop)
       : mp_mutex(0), m_locked(false)
    {
       scoped_lock<mutex_type> &u_lock = scop;

Modified: branches/release/boost/interprocess/windows_shared_memory.hpp
==============================================================================
--- branches/release/boost/interprocess/windows_shared_memory.hpp (original)
+++ branches/release/boost/interprocess/windows_shared_memory.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -83,7 +83,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    windows_shared_memory
- (detail::moved_object<windows_shared_memory> &moved)
+ (detail::moved_object<windows_shared_memory> moved)
    { this->swap(moved.get()); }
    #else
    windows_shared_memory(windows_shared_memory &&moved)
@@ -95,7 +95,7 @@
    //!Does not throw
    #ifndef BOOST_INTERPROCESS_RVALUE_REFERENCE
    windows_shared_memory &operator=
- (detail::moved_object<windows_shared_memory> &moved)
+ (detail::moved_object<windows_shared_memory> moved)
    {
       windows_shared_memory tmp(moved);
       this->swap(tmp);
@@ -104,7 +104,7 @@
    #else
    windows_shared_memory &operator=(windows_shared_memory &&moved)
    {
- windows_shared_memory tmp(move(moved));
+ windows_shared_memory tmp(detail::move_impl(moved));
       this->swap(tmp);
       return *this;
    }
@@ -143,6 +143,8 @@
    /// @endcond
 };
 
+/// @cond
+
 inline windows_shared_memory::windows_shared_memory()
    : m_handle(0)
 {}
@@ -169,7 +171,7 @@
 inline bool windows_shared_memory::priv_open_or_create
    (detail::create_enum_t type, const char *filename, mode_t mode, std::size_t size)
 {
- m_name = filename;
+ m_name = filename ? filename : "";
 
    unsigned long file_map_access = 0;
    unsigned long map_access = 0;
@@ -235,6 +237,16 @@
    }
 }
 
+//!Trait class to detect if a type is
+//!movable
+template<>
+struct is_movable<windows_shared_memory>
+{
+ static const bool value = true;
+};
+
+///@endcond
+
 } //namespace interprocess {
 } //namespace boost {
 

Modified: branches/release/boost/intrusive/avl_set.hpp
==============================================================================
--- branches/release/boost/intrusive/avl_set.hpp (original)
+++ branches/release/boost/intrusive/avl_set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -240,7 +240,7 @@
    //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
    //! of avl_set.
    //!
- //! <b>Effects</b>: Returns a const reference to the avl_set associated to the end iterator
+ //! <b>Effects</b>: Returns a const reference to the set associated to the end iterator
    //!
    //! <b>Throws</b>: Nothing.
    //!
@@ -252,6 +252,34 @@
          , &avl_set_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static avl_set_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<avl_set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &avl_set_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const avl_set_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<avl_set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &avl_set_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the avl_set.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1085,6 +1113,12 @@
 
    static const avl_set &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const avl_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static avl_set &container_from_iterator(iterator end_iterator)
+ { return static_cast<avl_set &>(Base::container_from_iterator(end_iterator)); }
+
+ static const avl_set &container_from_iterator(const_iterator end_iterator)
+ { return static_cast<const avl_set &>(Base::container_from_iterator(end_iterator)); }
 };
 
 #endif
@@ -1317,6 +1351,34 @@
          , &avl_multiset_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static avl_multiset_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<avl_multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &avl_multiset_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const avl_multiset_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<avl_multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &avl_multiset_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the avl_multiset.
    //!
    //! <b>Complexity</b>: Constant.
@@ -2057,6 +2119,12 @@
 
    static const avl_multiset &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static avl_multiset &container_from_iterator(iterator end_iterator)
+ { return static_cast<avl_multiset &>(Base::container_from_iterator(end_iterator)); }
+
+ static const avl_multiset &container_from_iterator(const_iterator end_iterator)
+ { return static_cast<const avl_multiset &>(Base::container_from_iterator(end_iterator)); }
 };
 
 #endif

Modified: branches/release/boost/intrusive/avltree.hpp
==============================================================================
--- branches/release/boost/intrusive/avltree.hpp (original)
+++ branches/release/boost/intrusive/avltree.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -387,6 +387,28 @@
    static const avltree_impl &container_from_end_iterator(const_iterator end_iterator)
    { return priv_container_from_end_iterator(end_iterator); }
 
+ //! <b>Precondition</b>: it must be a valid iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static avltree_impl &container_from_iterator(iterator it)
+ { return priv_container_from_iterator(it); }
+
+ //! <b>Precondition</b>: it must be a valid end const_iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const avltree_impl &container_from_iterator(const_iterator it)
+ { return priv_container_from_iterator(it); }
+
    //! <b>Effects</b>: Returns the value_compare object used by the tree.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1233,6 +1255,9 @@
       avltree_impl *avl = detail::parent_from_member<avltree_impl, data_t>(d, &avltree_impl::data_);
       return *avl;
    }
+
+ static avltree_impl &priv_container_from_iterator(const const_iterator &it)
+ { return priv_container_from_end_iterator(it.end_iterator_from_it()); }
 };
 
 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
@@ -1426,6 +1451,12 @@
 
    static const avltree &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const avltree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static avltree &container_from_iterator(iterator it)
+ { return static_cast<avltree &>(Base::container_from_iterator(it)); }
+
+ static const avltree &container_from_iterator(const_iterator it)
+ { return static_cast<const avltree &>(Base::container_from_iterator(it)); }
 };
 
 #endif

Modified: branches/release/boost/intrusive/avltree_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/avltree_algorithms.hpp (original)
+++ branches/release/boost/intrusive/avltree_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -20,7 +20,6 @@
 #include <boost/intrusive/intrusive_fwd.hpp>
 
 #include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
 #include <boost/intrusive/detail/tree_algorithms.hpp>
 
@@ -69,6 +68,7 @@
 class avltree_algorithms
 {
    public:
+ typedef typename NodeTraits::node node;
    typedef NodeTraits node_traits;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
@@ -76,8 +76,6 @@
 
    /// @cond
    private:
-
- typedef typename NodeTraits::node node;
    typedef detail::tree_algorithms<NodeTraits> tree_algorithms;
 
    template<class F>
@@ -641,6 +639,16 @@
       rebalance_after_insertion(header, new_value);
    }
 
+ //! <b>Requires</b>: "n" must be a node inserted in a tree.
+ //!
+ //! <b>Effects</b>: Returns a pointer to the header node of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_header(node_ptr n)
+ { return tree_algorithms::get_header(n); }
+
    /// @cond
    private:
 

Modified: branches/release/boost/intrusive/circular_list_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/circular_list_algorithms.hpp (original)
+++ branches/release/boost/intrusive/circular_list_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -50,6 +50,7 @@
 class circular_list_algorithms
 {
    public:
+ typedef typename NodeTraits::node node;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
    typedef NodeTraits node_traits;
@@ -62,8 +63,8 @@
    //! <b>Throws</b>: Nothing.
    static void init(node_ptr this_node)
    {
- NodeTraits::set_next(this_node, 0);
- NodeTraits::set_previous(this_node, 0);
+ NodeTraits::set_next(this_node, node_ptr(0));
+ NodeTraits::set_previous(this_node, node_ptr(0));
    }
 
    //! <b>Effects</b>: Returns true is "this_node" is in a non-used state

Modified: branches/release/boost/intrusive/circular_slist_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/circular_slist_algorithms.hpp (original)
+++ branches/release/boost/intrusive/circular_slist_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -54,6 +54,7 @@
    typedef detail::common_slist_algorithms<NodeTraits> base_t;
    /// @endcond
    public:
+ typedef typename NodeTraits::node node;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
    typedef NodeTraits node_traits;
@@ -305,12 +306,12 @@
    static node_ptr move_backwards(node_ptr p, std::size_t n)
    {
       //Null shift, nothing to do
- if(!n) return 0;
+ if(!n) return node_ptr(0);
       node_ptr first = NodeTraits::get_next(p);
 
       //count() == 1 or 2, nothing to do
       if(NodeTraits::get_next(first) == p)
- return 0;
+ return node_ptr(0);
 
       bool end_found = false;
       node_ptr new_last(0);
@@ -326,7 +327,7 @@
             //Shortcut the shift with the modulo of the size of the list
             n %= i;
             if(!n)
- return 0;
+ return node_ptr(0);
             i = 0;
             //Unlink p and continue the new first node search
             first = NodeTraits::get_next(p);
@@ -357,11 +358,11 @@
    static node_ptr move_forward(node_ptr p, std::size_t n)
    {
       //Null shift, nothing to do
- if(!n) return 0;
+ if(!n) return node_ptr(0);
       node_ptr first = node_traits::get_next(p);
 
       //count() == 1 or 2, nothing to do
- if(node_traits::get_next(first) == p) return 0;
+ if(node_traits::get_next(first) == p) return node_ptr(0);
 
       //Iterate until p is found to know where the current last node is.
       //If the shift count is less than the size of the list, we can also obtain
@@ -380,7 +381,7 @@
          //Shortcut the shift with the modulo of the size of the list
          std::size_t new_before_last_pos = (distance - (n % distance))% distance;
          //If the shift is a multiple of the size there is nothing to do
- if(!new_before_last_pos) return 0;
+ if(!new_before_last_pos) return node_ptr(0);
          
          for( new_last = p
             ; new_before_last_pos--

Modified: branches/release/boost/intrusive/detail/avltree_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/avltree_node.hpp (original)
+++ branches/release/boost/intrusive/detail/avltree_node.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -17,7 +17,7 @@
 #include <iterator>
 #include <boost/intrusive/detail/pointer_to_other.hpp>
 #include <boost/intrusive/avltree_algorithms.hpp>
-#include <boost/intrusive/pointer_plus_2_bits.hpp>
+#include <boost/intrusive/pointer_plus_bits.hpp>
 #include <boost/intrusive/detail/mpl.hpp>
 
 namespace boost {
@@ -111,7 +111,7 @@
       <VoidPointer, const node>::type const_node_ptr;
    typedef typename node::balance balance;
 
- typedef pointer_plus_2_bits<node_ptr> ptr_bit;
+ typedef pointer_plus_bits<node_ptr, 2> ptr_bit;
 
    static node_ptr get_parent(const_node_ptr n)
    { return ptr_bit::get_pointer(n->parent_); }
@@ -148,7 +148,7 @@
 };
 
 //Dispatches the implementation based on the boolean
-template<class VoidPointer, bool compact>
+template<class VoidPointer, bool Compact>
 struct avltree_node_traits_dispatch
    : public default_avltree_node_traits_impl<VoidPointer>
 {};
@@ -164,10 +164,10 @@
    : public avltree_node_traits_dispatch
          < VoidPointer
          , OptimizeSize &&
- has_pointer_plus_2_bits
+ max_pointer_plus_bits
             < VoidPointer
             , detail::alignment_of<compact_avltree_node<VoidPointer> >::value
- >::value
+ >::value >= 2u
>
 {};
 

Modified: branches/release/boost/intrusive/detail/common_slist_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/common_slist_algorithms.hpp (original)
+++ branches/release/boost/intrusive/detail/common_slist_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -26,6 +26,7 @@
 class common_slist_algorithms
 {
    public:
+ typedef typename NodeTraits::node node;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
    typedef NodeTraits node_traits;
@@ -47,13 +48,13 @@
    { NodeTraits::set_next(this_node, this_node); }
 
    static void init(node_ptr this_node)
- { NodeTraits::set_next(this_node, 0); }
+ { NodeTraits::set_next(this_node, node_ptr(0)); }
 
    static bool unique(const_node_ptr this_node)
    {
       node_ptr next = NodeTraits::get_next(this_node);
       return !next || next == this_node;
- }
+ }
 
    static bool inited(const_node_ptr this_node)
    { return !NodeTraits::get_next(this_node); }

Modified: branches/release/boost/intrusive/detail/ebo_functor_holder.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/ebo_functor_holder.hpp (original)
+++ branches/release/boost/intrusive/detail/ebo_functor_holder.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Joaquín M López Muñoz 2006-2007
+// (C) Copyright Joaquin M Lopez Munoz 2006-2007
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -23,8 +23,15 @@
 class ebo_functor_holder_impl
 {
    public:
- ebo_functor_holder_impl(){}
- ebo_functor_holder_impl(const T& t):t(t){}
+ ebo_functor_holder_impl()
+ {}
+ ebo_functor_holder_impl(const T& t)
+ : t(t)
+ {}
+ template<class Arg1, class Arg2>
+ ebo_functor_holder_impl(const Arg1& arg1, const Arg2& arg2)
+ : t(arg1, arg2)
+ {}
 
    T& get(){return t;}
    const T& get()const{return t;}
@@ -38,8 +45,15 @@
    : public T
 {
    public:
- ebo_functor_holder_impl(){}
- ebo_functor_holder_impl(const T& t):T(t){}
+ ebo_functor_holder_impl()
+ {}
+ ebo_functor_holder_impl(const T& t)
+ : T(t)
+ {}
+ template<class Arg1, class Arg2>
+ ebo_functor_holder_impl(const Arg1& arg1, const Arg2& arg2)
+ : T(arg1, arg2)
+ {}
 
    T& get(){return *this;}
    const T& get()const{return *this;}
@@ -54,7 +68,14 @@
 
    public:
    ebo_functor_holder(){}
- ebo_functor_holder(const T& t):super(t){}
+ ebo_functor_holder(const T& t)
+ : super(t)
+ {}
+
+ template<class Arg1, class Arg2>
+ ebo_functor_holder(const Arg1& arg1, const Arg2& arg2)
+ : super(arg1, arg2)
+ {}
 
    ebo_functor_holder& operator=(const ebo_functor_holder& x)
    {

Modified: branches/release/boost/intrusive/detail/generic_hook.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/generic_hook.hpp (original)
+++ branches/release/boost/intrusive/detail/generic_hook.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -18,6 +18,7 @@
 #include <boost/intrusive/detail/pointer_to_other.hpp>
 #include <boost/intrusive/link_mode.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
 #include <boost/static_assert.hpp>
 
 namespace boost {
@@ -35,6 +36,7 @@
 , SplaySetBaseHook
 , AvlSetBaseHook
 , BsSetBaseHook
+, AnyBaseHook
 };
 
 struct no_default_definer{};
@@ -70,6 +72,10 @@
 struct default_definer<Hook, BsSetBaseHook>
 { typedef Hook default_bs_set_hook; };
 
+template <class Hook>
+struct default_definer<Hook, AnyBaseHook>
+{ typedef Hook default_any_hook; };
+
 template <class Hook, unsigned int BaseHookType>
 struct make_default_definer
 {
@@ -90,11 +96,11 @@
    typedef typename detail::if_c
       <!detail::is_same<Tag, member_tag>::value
       , detail::node_holder
- < typename GetNodeAlgorithms::type::node_traits::node
+ < typename GetNodeAlgorithms::type::node
          , Tag
          , LinkMode
          , HookType>
- , typename GetNodeAlgorithms::type::node_traits::node
+ , typename GetNodeAlgorithms::type::node
>::type type;
 };
 
@@ -122,38 +128,38 @@
    , public make_node_holder<GetNodeAlgorithms, Tag, LinkMode, HookType>::type
    /// @endcond
 {
- public:
    /// @cond
+ typedef typename GetNodeAlgorithms::type node_algorithms;
+ typedef typename node_algorithms::node node;
+ typedef typename node_algorithms::node_ptr node_ptr;
+ typedef typename node_algorithms::const_node_ptr const_node_ptr;
+
+ public:
    struct boost_intrusive_tags
    {
       static const int hook_type = HookType;
       static const link_mode_type link_mode = LinkMode;
- typedef Tag tag;
- typedef typename GetNodeAlgorithms::type node_algorithms;
- typedef typename node_algorithms::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef Tag tag;
+ typedef typename GetNodeAlgorithms::type::node_traits node_traits;
       static const bool is_base_hook = !detail::is_same<Tag, member_tag>::value;
- enum { safemode_or_autounlink =
- (int)link_mode == (int)auto_unlink ||
- (int)link_mode == (int)safe_link };
+ static const bool safemode_or_autounlink =
+ (int)link_mode == (int)auto_unlink || (int)link_mode == (int)safe_link;
    };
+
+ public:
    /// @endcond
 
    generic_hook()
    {
       if(boost_intrusive_tags::safemode_or_autounlink){
- boost_intrusive_tags::node_algorithms::init
- (static_cast<typename boost_intrusive_tags::node*>(this));
+ node_algorithms::init(static_cast<node*>(this));
       }
    }
 
    generic_hook(const generic_hook& )
    {
       if(boost_intrusive_tags::safemode_or_autounlink){
- boost_intrusive_tags::node_algorithms::init
- (static_cast<typename boost_intrusive_tags::node*>(this));
+ node_algorithms::init(static_cast<node*>(this));
       }
    }
 
@@ -168,26 +174,23 @@
 
    void swap_nodes(generic_hook &other)
    {
- boost_intrusive_tags::node_algorithms::swap_nodes
- ( static_cast<typename boost_intrusive_tags::node*>(this)
- , static_cast<typename boost_intrusive_tags::node*>(&other));
+ node_algorithms::swap_nodes
+ ( static_cast<node*>(this), static_cast<node*>(&other));
    }
 
    bool is_linked() const
    {
       //is_linked() can be only used in safe-mode or auto-unlink
       BOOST_STATIC_ASSERT(( boost_intrusive_tags::safemode_or_autounlink ));
- return !boost_intrusive_tags::node_algorithms::unique
- (static_cast<const typename boost_intrusive_tags::node*>(this));
+ return !node_algorithms::unique
+ (static_cast<const node*>(this));
    }
 
    void unlink()
    {
       BOOST_STATIC_ASSERT(( (int)boost_intrusive_tags::link_mode == (int)auto_unlink ));
- boost_intrusive_tags::node_algorithms::unlink
- (static_cast<typename boost_intrusive_tags::node*>(this));
- boost_intrusive_tags::node_algorithms::init
- (static_cast<typename boost_intrusive_tags::node*>(this));
+ node_algorithms::unlink(static_cast<node*>(this));
+ node_algorithms::init(static_cast<node*>(this));
    }
 };
 

Modified: branches/release/boost/intrusive/detail/hashtable_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/hashtable_node.hpp (original)
+++ branches/release/boost/intrusive/detail/hashtable_node.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -50,6 +50,7 @@
 template <class Slist>
 struct bucket_impl : public Slist
 {
+ typedef Slist slist_type;
    bucket_impl()
    {}
 
@@ -69,28 +70,6 @@
       //Slist::clear();
       return *this;
    }
-
- static typename Slist::difference_type get_bucket_num
- ( typename Slist::const_iterator it
- , const bucket_impl<Slist> &first_bucket
- , const bucket_impl<Slist> &last_bucket)
- {
- typename Slist::const_iterator
- first(first_bucket.cend()), last(last_bucket.cend());
-
- //The end node is embedded in the singly linked list:
- //iterate until we reach it.
- while(!(first.pointed_node() <= it.pointed_node() &&
- it.pointed_node() <= last.pointed_node())){
- ++it;
- }
- //Now get the bucket_impl from the iterator
- const bucket_impl &b = static_cast<const bucket_impl&>
- (Slist::container_from_end_iterator(it));
-
- //Now just calculate the index b has in the bucket array
- return &b - &first_bucket;
- }
 };
 
 template<class Slist>
@@ -125,13 +104,16 @@
             <typename Container::value_type, IsConst>::type
>
 {
- typedef typename Container::real_value_traits real_value_traits;
- typedef typename Container::siterator siterator;
- typedef typename Container::const_siterator const_siterator;
- typedef typename Container::bucket_type bucket_type;
+ typedef typename Container::real_value_traits real_value_traits;
+ typedef typename Container::siterator siterator;
+ typedef typename Container::const_siterator const_siterator;
+ typedef typename Container::bucket_type bucket_type;
    typedef typename boost::pointer_to_other
- < typename Container::pointer, const Container>::type const_cont_ptr;
- typedef typename Container::size_type size_type;
+ < typename Container::pointer, const Container>::type const_cont_ptr;
+ typedef typename Container::size_type size_type;
+
+ static typename Container::node_ptr downcast_bucket(typename bucket_type::node_ptr p)
+ { return typename Container::node_ptr(&static_cast<typename Container::node&>(*p)); }
 
    public:
    typedef typename detail::add_const_if_c
@@ -172,7 +154,7 @@
    { return *this->operator ->(); }
 
    value_type* operator->() const
- { return detail::get_pointer(this->get_real_value_traits()->to_value_ptr(slist_it_.pointed_node())); }
+ { return detail::get_pointer(this->get_real_value_traits()->to_value_ptr(downcast_bucket(slist_it_.pointed_node()))); }
 
    const Container *get_container() const
    { return detail::get_pointer(cont_); }
@@ -186,17 +168,19 @@
       const Container *cont = detail::get_pointer(cont_);
       bucket_type* buckets = detail::get_pointer(cont->bucket_pointer());
       size_type buckets_len = cont->bucket_count();
- const_siterator first(buckets[0].cend());
- const_siterator last (buckets[buckets_len].cend());
 
       ++slist_it_;
- if(first.pointed_node() <= slist_it_.pointed_node() &&
- slist_it_.pointed_node()<= last.pointed_node() ){
- size_type n_bucket = (size_type)
- bucket_type::get_bucket_num(slist_it_, buckets[0], buckets[buckets_len]);
+ if(buckets[0].cend().pointed_node() <= slist_it_.pointed_node() &&
+ slist_it_.pointed_node()<= buckets[buckets_len].cend().pointed_node() ){
+ //Now get the bucket_impl from the iterator
+ const bucket_type &b = static_cast<const bucket_type&>
+ (bucket_type::slist_type::container_from_end_iterator(slist_it_));
+
+ //Now just calculate the index b has in the bucket array
+ size_type n_bucket = static_cast<size_type>(&b - &buckets[0]);
          do{
             if (++n_bucket == buckets_len){
- slist_it_ = buckets->end();
+ slist_it_ = (&buckets[0] + buckets_len)->end();
                break;
             }
             slist_it_ = buckets[n_bucket].begin();

Modified: branches/release/boost/intrusive/detail/list_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/list_node.hpp (original)
+++ branches/release/boost/intrusive/detail/list_node.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -18,7 +18,6 @@
 #include <iterator>
 #include <boost/intrusive/detail/assert.hpp>
 #include <boost/intrusive/detail/pointer_to_other.hpp>
-#include <boost/intrusive/circular_list_algorithms.hpp>
 
 namespace boost {
 namespace intrusive {
@@ -32,7 +31,8 @@
 {
    typedef typename boost::pointer_to_other
       <VoidPointer, list_node>::type node_ptr;
- node_ptr prev_, next_;
+ node_ptr next_;
+ node_ptr prev_;
 };
 
 template<class VoidPointer>
@@ -85,7 +85,7 @@
    typedef value_type * pointer;
 
    list_iterator()
- : members_ (0, 0)
+ : members_ (node_ptr(0), 0)
    {}
 
    explicit list_iterator(node_ptr node, const Container *cont_ptr)

Modified: branches/release/boost/intrusive/detail/mpl.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/mpl.hpp (original)
+++ branches/release/boost/intrusive/detail/mpl.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -13,6 +13,8 @@
 #ifndef BOOST_INTRUSIVE_DETAIL_MPL_HPP
 #define BOOST_INTRUSIVE_DETAIL_MPL_HPP
 
+#include <cstddef>
+
 namespace boost {
 namespace intrusive {
 namespace detail {
@@ -290,6 +292,24 @@
    static const bool value = sizeof(empty_helper_t1<Class>) == sizeof(empty_helper_t2);
 };
 
+template<std::size_t S>
+struct ls_zeros
+{
+ static const std::size_t value = (S & std::size_t(1)) ? 0 : (1 + ls_zeros<(S>>1u)>::value);
+};
+
+template<>
+struct ls_zeros<0>
+{
+ static const std::size_t value = 0;
+};
+
+template<>
+struct ls_zeros<1>
+{
+ static const std::size_t value = 0;
+};
+
 } //namespace detail
 } //namespace intrusive
 } //namespace boost

Deleted: branches/release/boost/intrusive/detail/no_exceptions_support.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/no_exceptions_support.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
+++ (empty file)
@@ -1,28 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007
-//
-// 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/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_NO_EXCEPTION_SUPPORT_HPP
-
-#if !(defined BOOST_INTRUSIVE_DISABLE_EXCEPTION_HANDLING)
-# include <boost/detail/no_exceptions_support.hpp>
-# define BOOST_INTRUSIVE_TRY BOOST_TRY
-# define BOOST_INTRUSIVE_CATCH(x) BOOST_CATCH(x)
-# define BOOST_INTRUSIVE_RETHROW BOOST_RETHROW
-# define BOOST_INTRUSIVE_CATCH_END BOOST_CATCH_END
-#else
-# define BOOST_INTRUSIVE_TRY { if (true)
-# define BOOST_INTRUSIVE_CATCH(x) else if (false)
-# define BOOST_INTRUSIVE_RETHROW
-# define BOOST_INTRUSIVE_CATCH_END }
-#endif
-
-#endif //#ifndef BOOST_INTRUSIVE_NO_EXCEPTION_SUPPORT_HPP

Modified: branches/release/boost/intrusive/detail/parent_from_member.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/parent_from_member.hpp (original)
+++ branches/release/boost/intrusive/detail/parent_from_member.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -13,25 +13,30 @@
 #define BOOST_INTRUSIVE_PARENT_FROM_MEMBER_HPP
 
 #include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/static_assert.hpp>
 #include <cstddef>
 
+#if defined(BOOST_MSVC) || (defined (BOOST_WINDOWS) && defined(BOOST_INTEL))
+#define BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER
+#include <boost/cstdint.hpp>
+#endif
+
 namespace boost {
 namespace intrusive {
 namespace detail {
 
 template<class Parent, class Member>
-inline std::size_t offset_from_pointer_to_member(const Member Parent::* ptr_to_member)
+inline std::ptrdiff_t offset_from_pointer_to_member(const Member Parent::* ptr_to_member)
 {
- //BOOST_STATIC_ASSERT(( sizeof(std::ptrdiff_t) == sizeof(ptr_to_member) ));
    //The implementation of a pointer to member is compiler dependent.
- #if defined(BOOST_MSVC) || (defined (BOOST_WINDOWS) && defined(BOOST_INTEL))
+ #if defined(BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER)
+ //msvc compliant compilers use their the first 32 bits as offset (even in 64 bit mode)
+ return *(const boost::int32_t*)(void*)&ptr_to_member;
    //This works with gcc, msvc, ac++, ibmcpp
- return *(const std::ptrdiff_t*)(void*)&ptr_to_member;
- #elif defined(__GNUC__) || defined(__HP_aCC) || defined(BOOST_INTEL) || defined (__IBMCPP__) || defined (__DECCXX)
+ #elif defined(__GNUC__) || defined(__HP_aCC) || defined(BOOST_INTEL) || \
+ defined(__IBMCPP__) || defined(__DECCXX)
    const Parent * const parent = 0;
    const char *const member = reinterpret_cast<const char*>(&(parent->*ptr_to_member));
- return std::size_t(member - reinterpret_cast<const char*>(parent));
+ return std::ptrdiff_t(member - reinterpret_cast<const char*>(parent));
    #else
    //This is the traditional C-front approach: __MWERKS__, __DMC__, __SUNPRO_CC
    return (*(const std::ptrdiff_t*)(void*)&ptr_to_member) - 1;
@@ -56,6 +61,10 @@
 } //namespace intrusive {
 } //namespace boost {
 
+#ifdef BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER
+#undef BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER
+#endif
+
 #include <boost/intrusive/detail/config_end.hpp>
 
 #endif //#ifndef BOOST_INTRUSIVE_PARENT_FROM_MEMBER_HPP

Modified: branches/release/boost/intrusive/detail/rbtree_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/rbtree_node.hpp (original)
+++ branches/release/boost/intrusive/detail/rbtree_node.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -18,7 +18,7 @@
 #include <iterator>
 #include <boost/intrusive/detail/pointer_to_other.hpp>
 #include <boost/intrusive/rbtree_algorithms.hpp>
-#include <boost/intrusive/pointer_plus_bit.hpp>
+#include <boost/intrusive/pointer_plus_bits.hpp>
 #include <boost/intrusive/detail/mpl.hpp>
 
 namespace boost {
@@ -110,7 +110,7 @@
    typedef typename boost::pointer_to_other
       <VoidPointer, const node>::type const_node_ptr;
 
- typedef pointer_plus_bit<node_ptr> ptr_bit;
+ typedef pointer_plus_bits<node_ptr, 1> ptr_bit;
 
    typedef typename node::color color;
 
@@ -133,10 +133,10 @@
    { n->right_ = r; }
 
    static color get_color(const_node_ptr n)
- { return (color)ptr_bit::get_bit(n->parent_); }
+ { return (color)ptr_bit::get_bits(n->parent_); }
 
    static void set_color(node_ptr n, color c)
- { ptr_bit::set_bit(n->parent_, c != 0); }
+ { ptr_bit::set_bits(n->parent_, c != 0); }
 
    static color black()
    { return node::black_t; }
@@ -146,7 +146,7 @@
 };
 
 //Dispatches the implementation based on the boolean
-template<class VoidPointer, bool compact>
+template<class VoidPointer, bool Compact>
 struct rbtree_node_traits_dispatch
    : public default_rbtree_node_traits_impl<VoidPointer>
 {};
@@ -161,11 +161,11 @@
 struct rbtree_node_traits
    : public rbtree_node_traits_dispatch
          < VoidPointer
- , OptimizeSize &&
- has_pointer_plus_bit
+ , OptimizeSize &&
+ (max_pointer_plus_bits
             < VoidPointer
             , detail::alignment_of<compact_rbtree_node<VoidPointer> >::value
- >::value
+ >::value >= 1)
>
 {};
 

Modified: branches/release/boost/intrusive/detail/slist_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/slist_node.hpp (original)
+++ branches/release/boost/intrusive/detail/slist_node.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -18,7 +18,6 @@
 #include <iterator>
 #include <boost/intrusive/detail/assert.hpp>
 #include <boost/intrusive/detail/pointer_to_other.hpp>
-#include <boost/intrusive/circular_slist_algorithms.hpp>
 
 namespace boost {
 namespace intrusive {
@@ -78,7 +77,7 @@
    typedef value_type * pointer;
 
    slist_iterator()
- : members_ (0, 0)
+ : members_ (node_ptr(0), 0)
    {}
 
    explicit slist_iterator(node_ptr node, const Container *cont_ptr)

Modified: branches/release/boost/intrusive/detail/tree_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/tree_algorithms.hpp (original)
+++ branches/release/boost/intrusive/detail/tree_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -17,7 +17,6 @@
 #include <boost/intrusive/detail/assert.hpp>
 #include <boost/intrusive/intrusive_fwd.hpp>
 #include <cstddef>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
 
 namespace boost {
@@ -95,12 +94,8 @@
 template<class NodeTraits>
 class tree_algorithms
 {
- /// @cond
- private:
- typedef typename NodeTraits::node node;
- /// @endcond
-
    public:
+ typedef typename NodeTraits::node node;
    typedef NodeTraits node_traits;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
@@ -123,6 +118,26 @@
 
    /// @cond
    private:
+ template<class Disposer>
+ struct dispose_subtree_disposer
+ {
+ dispose_subtree_disposer(Disposer &disp, node_ptr subtree)
+ : disposer_(&disp), subtree_(subtree)
+ {}
+
+ void release()
+ { disposer_ = 0; }
+
+ ~dispose_subtree_disposer()
+ {
+ if(disposer_){
+ dispose_subtree(subtree_, *disposer_);
+ }
+ }
+ Disposer *disposer_;
+ node_ptr subtree_;
+ };
+
    static node_ptr uncast(const_node_ptr ptr)
    {
       return node_ptr(const_cast<node*>(::boost::intrusive::detail::get_pointer(ptr)));
@@ -505,9 +520,21 @@
    //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
    static void init(node_ptr node)
    {
- NodeTraits::set_parent(node, 0);
- NodeTraits::set_left(node, 0);
- NodeTraits::set_right(node, 0);
+ NodeTraits::set_parent(node, node_ptr(0));
+ NodeTraits::set_left(node, node_ptr(0));
+ NodeTraits::set_right(node, node_ptr(0));
+ };
+
+ //! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool inited(const_node_ptr node)
+ {
+ return !NodeTraits::get_parent(node) &&
+ !NodeTraits::get_left(node) &&
+ !NodeTraits::get_right(node) ;
    };
 
    //! <b>Requires</b>: node must not be part of any tree.
@@ -522,7 +549,7 @@
    //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
    static void init_header(node_ptr header)
    {
- NodeTraits::set_parent(header, 0);
+ NodeTraits::set_parent(header, node_ptr(0));
       NodeTraits::set_left(header, header);
       NodeTraits::set_right(header, header);
    }
@@ -565,7 +592,7 @@
    {
       node_ptr leftmost = NodeTraits::get_left(header);
       if (leftmost == header)
- return 0;
+ return node_ptr(0);
       node_ptr leftmost_parent(NodeTraits::get_parent(leftmost));
       node_ptr leftmost_right (NodeTraits::get_right(leftmost));
       bool is_root = leftmost_parent == header;
@@ -580,12 +607,12 @@
             NodeTraits::set_left(NodeTraits::get_parent(header), leftmost_right);
       }
       else if (is_root){
- NodeTraits::set_parent(header, 0);
+ NodeTraits::set_parent(header, node_ptr(0));
          NodeTraits::set_left(header, header);
          NodeTraits::set_right(header, header);
       }
       else{
- NodeTraits::set_left(leftmost_parent, 0);
+ NodeTraits::set_left(leftmost_parent, node_ptr(0));
          NodeTraits::set_left(header, leftmost_parent);
       }
       return leftmost;
@@ -1143,58 +1170,54 @@
          node_ptr rightmost = target_sub_root;
 
          //First set the subroot
- NodeTraits::set_left(target_sub_root, 0);
- NodeTraits::set_right(target_sub_root, 0);
+ NodeTraits::set_left(target_sub_root, node_ptr(0));
+ NodeTraits::set_right(target_sub_root, node_ptr(0));
          NodeTraits::set_parent(target_sub_root, target_parent);
 
- try {
- while(true) {
- //First clone left nodes
- if( NodeTraits::get_left(current) &&
- !NodeTraits::get_left(insertion_point)) {
- current = NodeTraits::get_left(current);
- node_ptr temp = insertion_point;
- //Clone and mark as leaf
- insertion_point = cloner(current);
- NodeTraits::set_left (insertion_point, 0);
- NodeTraits::set_right (insertion_point, 0);
- //Insert left
- NodeTraits::set_parent(insertion_point, temp);
- NodeTraits::set_left (temp, insertion_point);
- //Update leftmost
- if(rightmost == target_sub_root)
- leftmost = insertion_point;
- }
- //Then clone right nodes
- else if( NodeTraits::get_right(current) &&
- !NodeTraits::get_right(insertion_point)){
- current = NodeTraits::get_right(current);
- node_ptr temp = insertion_point;
- //Clone and mark as leaf
- insertion_point = cloner(current);
- NodeTraits::set_left (insertion_point, 0);
- NodeTraits::set_right (insertion_point, 0);
- //Insert right
- NodeTraits::set_parent(insertion_point, temp);
- NodeTraits::set_right (temp, insertion_point);
- //Update rightmost
- rightmost = insertion_point;
- }
- //If not, go up
- else if(current == source_root){
- break;
- }
- else{
- //Branch completed, go up searching more nodes to clone
- current = NodeTraits::get_parent(current);
- insertion_point = NodeTraits::get_parent(insertion_point);
- }
+ dispose_subtree_disposer<Disposer> rollback(disposer, target_sub_root);
+ while(true) {
+ //First clone left nodes
+ if( NodeTraits::get_left(current) &&
+ !NodeTraits::get_left(insertion_point)) {
+ current = NodeTraits::get_left(current);
+ node_ptr temp = insertion_point;
+ //Clone and mark as leaf
+ insertion_point = cloner(current);
+ NodeTraits::set_left (insertion_point, node_ptr(0));
+ NodeTraits::set_right (insertion_point, node_ptr(0));
+ //Insert left
+ NodeTraits::set_parent(insertion_point, temp);
+ NodeTraits::set_left (temp, insertion_point);
+ //Update leftmost
+ if(rightmost == target_sub_root)
+ leftmost = insertion_point;
+ }
+ //Then clone right nodes
+ else if( NodeTraits::get_right(current) &&
+ !NodeTraits::get_right(insertion_point)){
+ current = NodeTraits::get_right(current);
+ node_ptr temp = insertion_point;
+ //Clone and mark as leaf
+ insertion_point = cloner(current);
+ NodeTraits::set_left (insertion_point, node_ptr(0));
+ NodeTraits::set_right (insertion_point, node_ptr(0));
+ //Insert right
+ NodeTraits::set_parent(insertion_point, temp);
+ NodeTraits::set_right (temp, insertion_point);
+ //Update rightmost
+ rightmost = insertion_point;
+ }
+ //If not, go up
+ else if(current == source_root){
+ break;
+ }
+ else{
+ //Branch completed, go up searching more nodes to clone
+ current = NodeTraits::get_parent(current);
+ insertion_point = NodeTraits::get_parent(insertion_point);
             }
          }
- catch(...) {
- dispose_subtree(target_sub_root, disposer);
- throw;
- }
+ rollback.release();
          leftmost_out = leftmost;
          rightmost_out = rightmost;
       }
@@ -1321,8 +1344,8 @@
              NodeTraits::set_right(header, z);
       }
       NodeTraits::set_parent(z, par);
- NodeTraits::set_right(z, 0);
- NodeTraits::set_left(z, 0);
+ NodeTraits::set_right(z, node_ptr(0));
+ NodeTraits::set_left(z, node_ptr(0));
    }
 
    static void erase(node_ptr header, node_ptr z)
@@ -1384,7 +1407,7 @@
    {
       std::size_t len;
       len = 0;
- if(!old_root) return 0;
+ if(!old_root) return node_ptr(0);
 
       //To avoid irregularities in the algorithm (old_root can be a
       //left or right child or even the root of the tree) just put the
@@ -1392,8 +1415,8 @@
       //information to restore the original relationship after
       //the algorithm is applied.
       node_ptr super_root = NodeTraits::get_parent(old_root);
- assert(super_root);
-
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(super_root);
+
       //Get info
       node_ptr super_root_right_backup = NodeTraits::get_right(super_root);
       bool super_root_is_header = is_header(super_root);
@@ -1464,7 +1487,7 @@
       //information to restore the original relationship after
       //the algorithm is applied.
       node_ptr super_root = NodeTraits::get_parent(old_root);
- assert(super_root);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(super_root);
 
       //Get info
       node_ptr super_root_right_backup = NodeTraits::get_right(super_root);
@@ -1511,6 +1534,28 @@
       return new_root;
    }
 
+ //! <b>Requires</b>: "n" must be a node inserted in a tree.
+ //!
+ //! <b>Effects</b>: Returns a pointer to the header node of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_root(node_ptr node)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(node)));
+ node_ptr x = NodeTraits::get_parent(node);
+ if(x){
+ while(!is_header(x)){
+ x = NodeTraits::get_parent(x);
+ }
+ return x;
+ }
+ else{
+ return node;
+ }
+ }
+
    private:
    static void erase_impl(node_ptr header, node_ptr z, data_for_rebalance &info)
    {
@@ -1569,7 +1614,6 @@
       info.x_parent = x_parent;
       info.y = y;
    }
-
 };
 
 } //namespace detail {

Modified: branches/release/boost/intrusive/detail/tree_node.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/tree_node.hpp (original)
+++ branches/release/boost/intrusive/detail/tree_node.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -168,6 +168,11 @@
          return 0;
    }
 
+ tree_iterator end_iterator_from_it() const
+ {
+ return tree_iterator(node_algorithms::get_header(this->pointed_node()), this->get_container());
+ }
+
    private:
    struct members
       : public detail::select_constptr

Modified: branches/release/boost/intrusive/detail/utilities.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/utilities.hpp (original)
+++ branches/release/boost/intrusive/detail/utilities.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -25,6 +25,7 @@
 #include <climits>
 #include <iterator>
 #include <boost/cstdint.hpp>
+#include <boost/static_assert.hpp>
 
 namespace boost {
 namespace intrusive {
@@ -56,6 +57,24 @@
 };
 
 template <class T>
+struct internal_any_hook_bool
+{
+ template<bool Add>
+ struct two_or_three {one _[2 + Add];};
+ template <class U> static one test(...);
+ template <class U> static two_or_three<U::is_any_hook>
+ test (detail::bool_<U::is_any_hook>* = 0);
+ static const std::size_t value = sizeof(test<T>(0));
+};
+
+template <class T>
+struct internal_any_hook_bool_is_true
+{
+ static const bool value = internal_any_hook_bool<T>::value > sizeof(one)*2;
+};
+
+
+template <class T>
 struct external_value_traits_bool
 {
    template<bool Add>
@@ -235,16 +254,9 @@
    node_cloner(F f, const Container *cont)
       : base_t(f), cont_(cont)
    {}
-
+
    node_ptr operator()(node_ptr p)
- {
- node_ptr n = cont_->get_real_value_traits().to_node_ptr
- (*base_t::get()(*cont_->get_real_value_traits().to_value_ptr(p)));
- //Cloned node must be in default mode if the linking mode requires it
- if(safemode_or_autounlink)
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n));
- return n;
- }
+ { return this->operator()(*p); }
 
    node_ptr operator()(const node &to_clone)
    {
@@ -396,16 +408,20 @@
 struct link_dispatch
 {};
 
-template<class Container>
-void destructor_impl(Container &cont, detail::link_dispatch<safe_link>)
-{ (void)cont; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!cont.is_linked()); }
-
-template<class Container>
-void destructor_impl(Container &cont, detail::link_dispatch<auto_unlink>)
-{ cont.unlink(); }
+template<class Hook>
+void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
+{ //If this assertion raises, you might have destroyed an object
+ //while it was still inserted in a container that is alive.
+ //If so, remove the object from the container before destroying it.
+ (void)hook; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!hook.is_linked());
+}
+
+template<class Hook>
+void destructor_impl(Hook &hook, detail::link_dispatch<auto_unlink>)
+{ hook.unlink(); }
 
-template<class Container>
-void destructor_impl(Container &, detail::link_dispatch<normal_link>)
+template<class Hook>
+void destructor_impl(Hook &, detail::link_dispatch<normal_link>)
 {}
 
 template<class T, class NodeTraits, link_mode_type LinkMode, class Tag, int HookType>
@@ -548,6 +564,62 @@
    return (value >> (pow - x)) + 1;
 }
 
+template<class Container, class Disposer>
+class exception_disposer
+{
+ Container *cont_;
+ Disposer &disp_;
+
+ exception_disposer(const exception_disposer&);
+ exception_disposer &operator=(const exception_disposer&);
+
+ public:
+ exception_disposer(Container &cont, Disposer &disp)
+ : cont_(&cont), disp_(disp)
+ {}
+
+ void release()
+ { cont_ = 0; }
+
+ ~exception_disposer()
+ {
+ if(cont_){
+ cont_->clear_and_dispose(disp_);
+ }
+ }
+};
+
+template<class Container, class Disposer>
+class exception_array_disposer
+{
+ Container *cont_;
+ Disposer &disp_;
+ typename Container::size_type &constructed_;
+
+ exception_array_disposer(const exception_array_disposer&);
+ exception_array_disposer &operator=(const exception_array_disposer&);
+
+ public:
+ typedef typename Container::size_type size_type;
+ exception_array_disposer
+ (Container &cont, Disposer &disp, size_type &constructed)
+ : cont_(&cont), disp_(disp), constructed_(constructed)
+ {}
+
+ void release()
+ { cont_ = 0; }
+
+ ~exception_array_disposer()
+ {
+ size_type n = constructed_;
+ if(cont_){
+ while(n--){
+ cont_[n].clear_and_dispose(disp_);
+ }
+ }
+ }
+};
+
 } //namespace detail
 } //namespace intrusive
 } //namespace boost

Modified: branches/release/boost/intrusive/hashtable.hpp
==============================================================================
--- branches/release/boost/intrusive/hashtable.hpp (original)
+++ branches/release/boost/intrusive/hashtable.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -14,15 +14,15 @@
 
 #include <boost/intrusive/detail/config_begin.hpp>
 //std C++
-#include <functional>
-#include <utility>
-#include <algorithm>
-#include <cstddef>
+#include <functional> //std::equal_to
+#include <utility> //std::pair
+#include <algorithm> //std::swap, std::lower_bound, std::upper_bound
+#include <cstddef> //std::size_t
+#include <iterator> //std::iterator_traits
 //boost
 #include <boost/intrusive/detail/assert.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/functional/hash.hpp>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 //General intrusive utilities
 #include <boost/intrusive/intrusive_fwd.hpp>
 #include <boost/intrusive/detail/pointer_to_other.hpp>
@@ -34,13 +34,107 @@
 #include <boost/intrusive/trivial_value_traits.hpp>
 #include <boost/intrusive/unordered_set_hook.hpp>
 #include <boost/intrusive/slist.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
 
 namespace boost {
 namespace intrusive {
 
 /// @cond
 
-namespace detail{
+namespace detail {
+
+template <class NodeTraits>
+struct hash_reduced_slist_node_traits
+{
+ template <class U> static detail::one test(...);
+ template <class U> static detail::two test(typename U::reduced_slist_node_traits* = 0);
+ static const bool value = sizeof(test<NodeTraits>(0)) == sizeof(detail::two);
+};
+
+template <class NodeTraits>
+struct apply_reduced_slist_node_traits
+{
+ typedef typename NodeTraits::reduced_slist_node_traits type;
+};
+
+template <class NodeTraits>
+struct reduced_slist_node_traits
+{
+ typedef typename detail::eval_if_c
+ < hash_reduced_slist_node_traits<NodeTraits>::value
+ , apply_reduced_slist_node_traits<NodeTraits>
+ , detail::identity<NodeTraits>
+ >::type type;
+};
+
+template<class NodeTraits>
+struct get_slist_impl
+{
+ typedef trivial_value_traits<NodeTraits, normal_link> trivial_traits;
+
+ //Reducing symbol length
+ struct type : make_slist
+ < typename NodeTraits::node
+ , boost::intrusive::value_traits<trivial_traits>
+ , boost::intrusive::constant_time_size<false>
+ , boost::intrusive::size_type<std::size_t>
+ >::type
+ {};
+};
+
+template<class SupposedValueTraits>
+struct real_from_supposed_value_traits
+{
+ typedef typename detail::eval_if_c
+ < detail::external_value_traits_is_true
+ <SupposedValueTraits>::value
+ , detail::eval_value_traits
+ <SupposedValueTraits>
+ , detail::identity
+ <SupposedValueTraits>
+ >::type type;
+};
+
+template<class SupposedValueTraits>
+struct get_slist_impl_from_supposed_value_traits
+{
+ typedef typename
+ real_from_supposed_value_traits
+ < SupposedValueTraits>::type real_value_traits;
+ typedef typename detail::get_node_traits
+ <real_value_traits>::type node_traits;
+ typedef typename get_slist_impl
+ <typename reduced_slist_node_traits
+ <node_traits>::type
+ >::type type;
+};
+
+
+template<class SupposedValueTraits>
+struct unordered_bucket_impl
+{
+ /// @cond
+ typedef typename
+ get_slist_impl_from_supposed_value_traits
+ <SupposedValueTraits>::type slist_impl;
+ typedef detail::bucket_impl<slist_impl> implementation_defined;
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+template<class SupposedValueTraits>
+struct unordered_bucket_ptr_impl
+{
+ /// @cond
+ typedef typename detail::get_node_traits
+ <SupposedValueTraits>::type::node_ptr node_ptr;
+ typedef typename unordered_bucket_impl
+ <SupposedValueTraits>::type bucket_type;
+ typedef typename boost::pointer_to_other
+ <node_ptr, bucket_type>::type implementation_defined;
+ /// @endcond
+ typedef implementation_defined type;
+};
 
 template <class T>
 struct store_hash_bool
@@ -59,6 +153,23 @@
    static const bool value = store_hash_bool<T>::value > sizeof(one)*2;
 };
 
+template <class T>
+struct optimize_multikey_bool
+{
+ template<bool Add>
+ struct two_or_three {one _[2 + Add];};
+ template <class U> static one test(...);
+ template <class U> static two_or_three<U::optimize_multikey>
+ test (detail::bool_<U::optimize_multikey>* = 0);
+ static const std::size_t value = sizeof(test<T>(0));
+};
+
+template <class T>
+struct optimize_multikey_is_true
+{
+ static const bool value = optimize_multikey_bool<T>::value > sizeof(one)*2;
+};
+
 template<class Config>
 struct bucket_plus_size
    : public detail::size_holder
@@ -92,7 +203,7 @@
    bucket_plus_size<Config> bucket_plus_size_;
 };
 
-template<class Config>
+template<class Config, bool>
 struct bucket_hash_equal_t : public detail::ebo_functor_holder<typename Config::equal>
 {
    typedef typename Config::equal equal;
@@ -105,22 +216,42 @@
    bucket_hash_t<Config> bucket_hash;
 };
 
+template<class Config> //cache_begin == true version
+struct bucket_hash_equal_t<Config, true>
+ : public detail::ebo_functor_holder<typename Config::equal>
+{
+ typedef typename Config::equal equal;
+ typedef typename Config::hash hasher;
+ typedef typename Config::bucket_traits bucket_traits;
+ typedef typename unordered_bucket_ptr_impl
+ <typename Config::value_traits>::type bucket_ptr;
+
+ bucket_hash_equal_t(const bucket_traits &b_traits, const hasher & h, const equal &e)
+ : detail::ebo_functor_holder<typename Config::equal>(e), bucket_hash(b_traits, h)
+ {}
+ bucket_hash_t<Config> bucket_hash;
+ bucket_ptr cached_begin_;
+};
+
 template<class Config>
-struct data_t : public Config::value_traits
+struct hashtable_data_t : public Config::value_traits
 {
    typedef typename Config::value_traits value_traits;
    typedef typename Config::equal equal;
    typedef typename Config::hash hasher;
    typedef typename Config::bucket_traits bucket_traits;
 
- data_t( const bucket_traits &b_traits, const hasher & h
- , const equal &e, const value_traits &val_traits)
+ hashtable_data_t( const bucket_traits &b_traits, const hasher & h
+ , const equal &e, const value_traits &val_traits)
       : Config::value_traits(val_traits), bucket_hash_equal_(b_traits, h, e)
    {}
- bucket_hash_equal_t<Config> bucket_hash_equal_;
+ bucket_hash_equal_t<Config, Config::cache_begin> bucket_hash_equal_;
 };
 
-} //namespace detail {
+struct insert_commit_data_impl
+{
+ std::size_t hash;
+};
 
 template <class T>
 struct internal_default_uset_hook
@@ -130,6 +261,49 @@
    static const bool value = sizeof(test<T>(0)) == sizeof(detail::two);
 };
 
+} //namespace detail {
+
+//!This metafunction will obtain the type of a bucket
+//!from the value_traits or hook option to be used with
+//!a hash container.
+template<class ValueTraitsOrHookOption>
+struct unordered_bucket
+ : public detail::unordered_bucket_impl
+ <typename ValueTraitsOrHookOption::
+ template pack<none>::value_traits
+ >
+{};
+
+//!This metafunction will obtain the type of a bucket pointer
+//!from the value_traits or hook option to be used with
+//!a hash container.
+template<class ValueTraitsOrHookOption>
+struct unordered_bucket_ptr
+ : public detail::unordered_bucket_ptr_impl
+ <typename ValueTraitsOrHookOption::
+ template pack<none>::value_traits
+ >
+{};
+
+//!This metafunction will obtain the type of the default bucket traits
+//!(when the user does not specify the bucket_traits<> option) from the
+//!value_traits or hook option to be used with
+//!a hash container.
+template<class ValueTraitsOrHookOption>
+struct unordered_default_bucket_traits
+{
+ /// @cond
+ typedef typename ValueTraitsOrHookOption::
+ template pack<none>::value_traits supposed_value_traits;
+ typedef typename detail::
+ get_slist_impl_from_supposed_value_traits
+ <supposed_value_traits>::type slist_impl;
+ typedef detail::bucket_traits_impl
+ <slist_impl> implementation_defined;
+ /// @endcond
+ typedef implementation_defined type;
+};
+
 template <class T>
 struct get_default_uset_hook
 {
@@ -137,12 +311,15 @@
 };
 
 template < class ValueTraits
+ , bool UniqueKeys
          , class Hash
          , class Equal
          , class SizeType
          , bool ConstantTimeSize
          , class BucketTraits
          , bool Power2Buckets
+ , bool CacheBegin
+ , bool CompareHash
>
 struct usetopt
 {
@@ -153,6 +330,9 @@
    typedef BucketTraits bucket_traits;
    static const bool constant_time_size = ConstantTimeSize;
    static const bool power_2_buckets = Power2Buckets;
+ static const bool unique_keys = UniqueKeys;
+ static const bool cache_begin = CacheBegin;
+ static const bool compare_hash = CompareHash;
 };
 
 struct default_bucket_traits;
@@ -163,7 +343,7 @@
       < none
       , base_hook
          < typename detail::eval_if_c
- < internal_default_uset_hook<T>::value
+ < detail::internal_default_uset_hook<T>::value
                , get_default_uset_hook<T>
                , detail::identity<none>
>::type
@@ -174,80 +354,18 @@
       , hash<boost::hash<T> >
       , bucket_traits<default_bucket_traits>
       , power_2_buckets<false>
+ , cache_begin<false>
+ , compare_hash<false>
>::type
 {};
 
-template<class NodeTraits>
-struct get_slist_impl
-{
- typedef trivial_value_traits<NodeTraits, normal_link> trivial_traits;
-
- //Reducing symbol length
- struct type : make_slist
- < typename NodeTraits::node
- , boost::intrusive::value_traits<trivial_traits>
- , boost::intrusive::constant_time_size<false>
- , boost::intrusive::size_type<std::size_t>
- >::type
- {};
-};
-
 /// @endcond
 
-template<class ValueTraitsOrHookOption>
-struct unordered_bucket
-{
- /// @cond
- typedef typename ValueTraitsOrHookOption::
- template pack<none>::value_traits supposed_value_traits;
-
- typedef typename detail::eval_if_c
- < detail::external_value_traits_is_true
- <supposed_value_traits>::value
- , detail::eval_value_traits
- <supposed_value_traits>
- , detail::identity
- <supposed_value_traits>
- >::type real_value_traits;
-
- typedef typename detail::get_node_traits
- <real_value_traits>::type node_traits;
- typedef typename get_slist_impl
- <node_traits>::type slist_impl;
- typedef detail::bucket_impl<slist_impl> implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-template<class ValueTraitsOrHookOption>
-struct unordered_bucket_ptr
-{
- /// @cond
- typedef typename ValueTraitsOrHookOption::
- template pack<none>::value_traits supposed_value_traits;
- typedef typename detail::eval_if_c
- < detail::external_value_traits_is_true
- <supposed_value_traits>::value
- , detail::eval_value_traits
- <supposed_value_traits>
- , detail::identity
- <supposed_value_traits>
- >::type real_value_traits;
- typedef typename detail::get_node_traits
- <supposed_value_traits>::type::node_ptr node_ptr;
- typedef typename unordered_bucket
- <ValueTraitsOrHookOption>::type bucket_type;
- typedef typename boost::pointer_to_other
- <node_ptr, bucket_type>::type implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
 //! The class template hashtable is an intrusive hash table container, that
 //! is used to construct intrusive unordered_set and unordered_multiset containers. The
 //! no-throw guarantee holds only, if the Equal object and Hasher don't throw.
 //!
-//! hashtable is a pseudo-intrusive container: each object to be stored in the
+//! hashtable is a semi-intrusive container: each object to be stored in the
 //! container must contain a proper hook, but the container also needs
 //! additional auxiliary memory to work: hashtable needs a pointer to an array
 //! of type `bucket_type` to be passed in the constructor. This bucket array must
@@ -261,7 +379,8 @@
 //!
 //! The container supports the following options:
 //! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<> .
+//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
+//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>.
 //!
 //! hashtable only provides forward iterators but it provides 4 iterator types:
 //! iterator and const_iterator to navigate through the whole container and
@@ -284,13 +403,12 @@
 template<class Config>
 #endif
 class hashtable_impl
- : private detail::data_t<Config>
+ : private detail::hashtable_data_t<Config>
 {
    public:
    typedef typename Config::value_traits value_traits;
 
    /// @cond
-
    static const bool external_value_traits =
       detail::external_value_traits_is_true<value_traits>::value;
    typedef typename detail::eval_if_c
@@ -306,8 +424,10 @@
       , detail::eval_bucket_traits<bucket_traits>
       , detail::identity<bucket_traits>
>::type real_bucket_traits;
- typedef typename get_slist_impl
- <typename real_value_traits::node_traits>::type slist_impl;
+ typedef typename detail::get_slist_impl
+ <typename detail::reduced_slist_node_traits
+ <typename real_value_traits::node_traits>::type
+ >::type slist_impl;
    /// @endcond
 
    typedef typename real_value_traits::pointer pointer;
@@ -327,7 +447,7 @@
    typedef typename slist_impl::const_iterator const_siterator;
    typedef detail::hashtable_iterator<hashtable_impl, false> iterator;
    typedef detail::hashtable_iterator<hashtable_impl, true> const_iterator;
- typedef typename real_value_traits::node_traits node_traits;
+ typedef typename real_value_traits::node_traits node_traits;
    typedef typename node_traits::node node;
    typedef typename boost::pointer_to_other
       <pointer, node>::type node_ptr;
@@ -338,19 +458,71 @@
    static const bool constant_time_size = Config::constant_time_size;
    static const bool stateful_value_traits = detail::store_cont_ptr_on_it<hashtable_impl>::value;
    static const bool store_hash = detail::store_hash_is_true<node_traits>::value;
+ static const bool unique_keys = Config::unique_keys;
+ static const bool optimize_multikey
+ = detail::optimize_multikey_is_true<node_traits>::value && !unique_keys;
+ static const bool power_2_buckets = Config::power_2_buckets;
+ static const bool cache_begin = Config::cache_begin;
+ static const bool compare_hash = Config::compare_hash;
 
    /// @cond
    private:
+ //Configuration error: compare_hash<> can't be specified without store_hash<>
+ //See documentation for more explanations
+ BOOST_STATIC_ASSERT((!compare_hash || store_hash));
+
+ typedef typename slist_impl::node_ptr slist_node_ptr;
+ typedef typename boost::pointer_to_other
+ <slist_node_ptr, void>::type void_pointer;
+ //We'll define group traits, but these won't be instantiated if
+ //optimize_multikey is not true
+ typedef unordered_group_adapter<node_traits> group_traits;
+ typedef circular_slist_algorithms<group_traits> group_algorithms;
    typedef detail::bool_<store_hash> store_hash_t;
+ typedef detail::bool_<optimize_multikey> optimize_multikey_t;
+ typedef detail::bool_<cache_begin> cache_begin_t;
+ typedef detail::bool_<power_2_buckets> power_2_buckets_t;
    typedef detail::size_holder<constant_time_size, size_type> size_traits;
- typedef detail::data_t<Config> base_type;
- typedef detail::transform_iterator
- < typename slist_impl::iterator
- , detail::node_to_value<hashtable_impl, false> > local_iterator_impl;
- typedef detail::transform_iterator
- < typename slist_impl::iterator
- , detail::node_to_value<hashtable_impl, true> > const_local_iterator_impl;
+ typedef detail::hashtable_data_t<Config> base_type;
+
+ template<bool IsConst>
+ struct downcast_node_to_value
+ : public detail::node_to_value<hashtable_impl, IsConst>
+ {
+ typedef detail::node_to_value<hashtable_impl, IsConst> base_t;
+ typedef typename base_t::result_type result_type;
+ typedef typename detail::add_const_if_c
+ <typename slist_impl::node, IsConst>::type &first_argument_type;
+ typedef typename detail::add_const_if_c
+ <node, IsConst>::type &intermediate_argument_type;
+
+ downcast_node_to_value(const hashtable_impl *cont)
+ : base_t(cont)
+ {}
+
+ result_type operator()(first_argument_type arg) const
+ { return this->base_t::operator()(static_cast<intermediate_argument_type>(arg)); }
+ };
+
+ template<class F>
+ struct node_cast_adaptor
+ : private detail::ebo_functor_holder<F>
+ {
+ typedef detail::ebo_functor_holder<F> base_t;
+
+ template<class ConvertibleToF>
+ node_cast_adaptor(const ConvertibleToF &c2f, const hashtable_impl *cont)
+ : base_t(base_t(c2f, cont))
+ {}
+
+ typename base_t::node_ptr operator()(const typename slist_impl::node &to_clone)
+ { return base_t::operator()(static_cast<const node &>(to_clone)); }
+
+ void operator()(typename slist_impl::node_ptr to_clone)
+ { base_t::operator()(node_ptr(&static_cast<node &>(*to_clone))); }
+ };
 
+ private:
    //noncopyable
    hashtable_impl (const hashtable_impl&);
    hashtable_impl operator =(const hashtable_impl&);
@@ -362,103 +534,23 @@
    //Constant-time size is incompatible with auto-unlink hooks!
    BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink)));
 
- static const bool power_2_buckets = Config::power_2_buckets;
-
- std::size_t from_hash_to_bucket(std::size_t hash_value) const
- { return from_hash_to_bucket(hash_value, detail::bool_<power_2_buckets>()); }
-
- std::size_t from_hash_to_bucket(std::size_t hash_value, detail::bool_<false>) const
- { return hash_value % this->get_real_bucket_traits().bucket_count(); }
-
- std::size_t from_hash_to_bucket(std::size_t hash_value, detail::bool_<true>) const
- { return hash_value & (this->get_real_bucket_traits().bucket_count() - 1); }
-
- const key_equal &priv_equal() const
- { return static_cast<const key_equal&>(this->bucket_hash_equal_.get()); }
-
- key_equal &priv_equal()
- { return static_cast<key_equal&>(this->bucket_hash_equal_.get()); }
-
- const real_bucket_traits &get_real_bucket_traits(detail::bool_<false>) const
- { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_; }
-
- const real_bucket_traits &get_real_bucket_traits(detail::bool_<true>) const
- { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_.get_bucket_traits(*this); }
-
- real_bucket_traits &get_real_bucket_traits(detail::bool_<false>)
- { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_; }
-
- real_bucket_traits &get_real_bucket_traits(detail::bool_<true>)
- { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_.get_bucket_traits(*this); }
-
- const real_bucket_traits &get_real_bucket_traits() const
- { return this->get_real_bucket_traits(detail::bool_<external_bucket_traits>()); }
-
- real_bucket_traits &get_real_bucket_traits()
- { return this->get_real_bucket_traits(detail::bool_<external_bucket_traits>()); }
-
- const hasher &priv_hasher() const
- { return static_cast<const hasher&>(this->bucket_hash_equal_.bucket_hash.get()); }
-
- hasher &priv_hasher()
- { return static_cast<hasher&>(this->bucket_hash_equal_.bucket_hash.get()); }
-
- bucket_ptr priv_buckets() const
- { return this->get_real_bucket_traits().bucket_begin(); }
-
- size_type priv_buckets_len() const
- { return this->get_real_bucket_traits().bucket_count(); }
-
- static node_ptr uncast(const_node_ptr ptr)
- {
- return node_ptr(const_cast<node*>(detail::get_pointer(ptr)));
- }
-
- node &from_value_to_node(value_type &v)
- { return *this->get_real_value_traits().to_node_ptr(v); }
-
- const node &from_value_to_node(const value_type &v) const
- { return *this->get_real_value_traits().to_node_ptr(v); }
-
- size_traits &priv_size_traits()
- { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_; }
-
- const size_traits &priv_size_traits() const
- { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_; }
+ template<class Disposer>
+ node_cast_adaptor<detail::node_disposer<Disposer, hashtable_impl> >
+ make_node_disposer(const Disposer &disposer) const
+ { return node_cast_adaptor<detail::node_disposer<Disposer, hashtable_impl> >(disposer, this); }
 
- struct insert_commit_data_impl
- {
- size_type hash;
- };
    /// @endcond
 
    public:
+ typedef detail::insert_commit_data_impl insert_commit_data;
 
- class local_iterator
- : public local_iterator_impl
- {
- public:
- local_iterator()
- {}
-
- local_iterator(siterator sit, const hashtable_impl *cont)
- : local_iterator_impl(sit, cont)
- {}
- };
-
- class const_local_iterator
- : public const_local_iterator_impl
- {
- public:
- const_local_iterator()
- {}
-
- const_local_iterator(siterator sit, const hashtable_impl *cont)
- : const_local_iterator_impl(sit, cont)
- {}
- };
+ typedef detail::transform_iterator
+ < typename slist_impl::iterator
+ , downcast_node_to_value<false> > local_iterator;
 
- typedef insert_commit_data_impl insert_commit_data;
+ typedef detail::transform_iterator
+ < typename slist_impl::iterator
+ , downcast_node_to_value<true> > const_local_iterator;
 
    /// @cond
 
@@ -503,7 +595,7 @@
                   , const value_traits &v_traits = value_traits())
       : base_type(b_traits, hash_func, equal_func, v_traits)
    {
- priv_clear_buckets();
+ priv_initialize_buckets();
       this->priv_size_traits().set_size(size_type(0));
       BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_buckets_len() != 0);
       //Check power of two bucket array if the option is activated
@@ -562,7 +654,7 @@
    //!
    //! <b>Throws</b>: Nothing.
    iterator end()
- { return iterator(invalid_local_it(this->get_real_bucket_traits()), 0); }
+ { return iterator(priv_invalid_local_it(), 0); }
 
    //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
    //!
@@ -578,7 +670,7 @@
    //!
    //! <b>Throws</b>: Nothing.
    const_iterator cend() const
- { return const_iterator(invalid_local_it(this->get_real_bucket_traits()), 0); }
+ { return const_iterator(priv_invalid_local_it(), 0); }
 
    //! <b>Effects</b>: Returns the hasher object used by the unordered_set.
    //!
@@ -598,8 +690,8 @@
 
    //! <b>Effects</b>: Returns true is the container is empty.
    //!
- //! <b>Complexity</b>: if constant_time_size is false, average constant time
- //! (worst case, with empty() == true): O(this->bucket_count()).
+ //! <b>Complexity</b>: if constant-time size and cache_last options are disabled,
+ //! average constant time (worst case, with empty() == true: O(this->bucket_count()).
    //! Otherwise constant.
    //!
    //! <b>Throws</b>: Nothing.
@@ -608,6 +700,9 @@
       if(constant_time_size){
          return !this->size();
       }
+ else if(cache_begin){
+ return this->begin() == this->end();
+ }
       else{
          size_type buckets_len = this->priv_buckets_len();
          const bucket_type *b = detail::get_pointer(this->priv_buckets());
@@ -658,7 +753,8 @@
       swap(this->priv_equal(), other.priv_equal());
       swap(this->priv_hasher(), other.priv_hasher());
       //These can't throw
- swap(this->get_real_bucket_traits(), other.get_real_bucket_traits());
+ swap(this->priv_real_bucket_traits(), other.priv_real_bucket_traits());
+ priv_swap_cache(cache_begin_t(), other);
       if(constant_time_size){
          size_type backup = this->priv_size_traits().get_size();
          this->priv_size_traits().set_size(other.priv_size_traits().get_size());
@@ -698,75 +794,75 @@
             const bucket_ptr src_buckets = src.priv_buckets();
             const bucket_ptr dst_buckets = this->priv_buckets();
             size_type constructed;
- BOOST_INTRUSIVE_TRY{
- for( constructed = 0
- ; constructed < dst_bucket_count
+ typedef node_cast_adaptor<detail::node_disposer<Disposer, hashtable_impl> > NodeDisposer;
+ typedef node_cast_adaptor<detail::node_cloner<Cloner, hashtable_impl> > NodeCloner;
+ NodeDisposer node_disp(disposer, this);
+
+ detail::exception_array_disposer<bucket_type, NodeDisposer>
+ rollback(dst_buckets[0], node_disp, constructed);
+ for( constructed = 0
+ ; constructed < dst_bucket_count
+ ; ++constructed){
+ dst_buckets[constructed].clone_from
+ ( src_buckets[constructed]
+ , NodeCloner(cloner, this), node_disp);
+ }
+ if(src_bucket_count != dst_bucket_count){
+ //Now insert the remaining ones using the modulo trick
+ for(//"constructed" comes from the previous loop
+ ; constructed < src_bucket_count
                   ; ++constructed){
- dst_buckets[constructed].clone_from
- ( src_buckets[constructed]
- , detail::node_cloner<Cloner, hashtable_impl>(cloner, this)
- , detail::node_disposer<Disposer, hashtable_impl>(disposer, this)
- );
- }
- if(src_bucket_count != dst_bucket_count){
- //Now insert the remaining ones using the modulo trick
- for(//"constructed" comes from the previous loop
- ; constructed < src_bucket_count
- ; ++constructed){
- bucket_type &dst_b = (power_2_buckets)
- ? dst_buckets[constructed & (dst_bucket_count-1)]
- : dst_buckets[constructed % dst_bucket_count];
- bucket_type &src_b = src_buckets[constructed];
- for( siterator b(src_b.begin()), e(src_b.end())
- ; b != e
- ; ++b){
- dst_b.push_front(*detail::node_cloner<Cloner, hashtable_impl>
- (cloner, this)(b.pointed_node()));
- }
+ bucket_type &dst_b =
+ dst_buckets[priv_hash_to_bucket(constructed, dst_bucket_count)];
+ bucket_type &src_b = src_buckets[constructed];
+ for( siterator b(src_b.begin()), e(src_b.end())
+ ; b != e
+ ; ++b){
+ dst_b.push_front(*(NodeCloner(cloner, this)(*b.pointed_node())));
                   }
                }
             }
- BOOST_INTRUSIVE_CATCH(...){
- while(constructed--){
- dst_buckets[constructed].clear_and_dispose
- (detail::node_disposer<Disposer, hashtable_impl>(disposer, this));
- }
- BOOST_INTRUSIVE_RETHROW;
- }
- BOOST_INTRUSIVE_CATCH_END
+ rollback.release();
             this->priv_size_traits().set_size(src.priv_size_traits().get_size());
+ priv_insertion_update_cache(0u);
+ priv_erasure_update_cache();
          }
          else{
             //Unlike previous cloning algorithm, this can throw
             //if cloner, the hasher or comparison functor throw
             const_iterator b(src.begin()), e(src.end());
- BOOST_INTRUSIVE_TRY{
- for(; b != e; ++b){
- this->insert_equal(*cloner(*b));
- }
- }
- BOOST_INTRUSIVE_CATCH(...){
- this->clear_and_dispose(disposer);
- BOOST_INTRUSIVE_RETHROW;
+ detail::exception_disposer<hashtable_impl, Disposer>
+ rollback(*this, disposer);
+ for(; b != e; ++b){
+ this->insert_equal(*cloner(*b));
             }
- BOOST_INTRUSIVE_CATCH_END
+ rollback.release();
          }
       }
    }
 
    iterator insert_equal(reference value)
    {
- size_type bucket_num, hash_value;
+ size_type bucket_num;
+ std::size_t hash_value;
+ siterator prev;
       siterator it = this->priv_find
- (value, this->priv_hasher(), this->priv_equal(), bucket_num, hash_value);
+ (value, this->priv_hasher(), this->priv_equal(), bucket_num, hash_value, prev);
       bucket_type &b = this->priv_buckets()[bucket_num];
- if(it == invalid_local_it(this->get_real_bucket_traits())){
- it = b.before_begin();
- }
- node_ptr n = node_ptr(&from_value_to_node(value));
+ bool found_equal = it != priv_invalid_local_it();
+ node_ptr n = node_ptr(&priv_value_to_node(value));
       this->priv_store_hash(n, hash_value, store_hash_t());
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n));
+ if(!found_equal){
+ it = b.before_begin();
+ }
+ if(optimize_multikey){
+ node_ptr first_in_group = found_equal ?
+ dcast_bucket_ptr(it.pointed_node()) : node_ptr(0);
+ this->priv_insert_in_group(first_in_group, n, optimize_multikey_t());
+ }
+ priv_insertion_update_cache(bucket_num);
       this->priv_size_traits().increment();
       return iterator(b.insert_after(it, *n), this);
    }
@@ -867,9 +963,10 @@
       , insert_commit_data &commit_data)
    {
       size_type bucket_num;
+ siterator prev;
       siterator prev_pos =
- this->priv_find(key, hash_func, equal_func, bucket_num, commit_data.hash);
- bool success = prev_pos == invalid_local_it(this->get_real_bucket_traits());
+ this->priv_find(key, hash_func, equal_func, bucket_num, commit_data.hash, prev);
+ bool success = prev_pos == priv_invalid_local_it();
       if(success){
          prev_pos = this->priv_buckets()[bucket_num].before_begin();
       }
@@ -897,14 +994,16 @@
    //! After a successful rehashing insert_commit_data remains valid.
    iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
    {
- size_type bucket_num = from_hash_to_bucket(commit_data.hash);
+ size_type bucket_num = priv_hash_to_bucket(commit_data.hash);
       bucket_type &b = this->priv_buckets()[bucket_num];
       this->priv_size_traits().increment();
- node_ptr n = node_ptr(&from_value_to_node(value));
+ node_ptr n = node_ptr(&priv_value_to_node(value));
       this->priv_store_hash(n, commit_data.hash, store_hash_t());
       if(safemode_or_autounlink)
          BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(n));
- return iterator( b.insert_after(b.before_begin(), *n), this);
+ priv_insertion_update_cache(bucket_num);
+ this->priv_insert_in_group(node_ptr(0), n, optimize_multikey_t());
+ return iterator(b.insert_after(b.before_begin(), *n), this);
    }
 
    //! <b>Effects</b>: Erases the element pointed to by i.
@@ -983,12 +1082,9 @@
    template<class Disposer>
    void erase_and_dispose(const_iterator i, Disposer disposer)
    {
- siterator to_erase(i.slist_it());
- bucket_ptr f(priv_buckets()), l(f + priv_buckets_len());
- bucket_type &b = this->priv_buckets()[bucket_type::get_bucket_num(to_erase, *f, *l)];
- b.erase_after_and_dispose
- (b.previous(to_erase), detail::node_disposer<Disposer, hashtable_impl>(disposer, this));
+ priv_erase(i, disposer, optimize_multikey_t());
       this->priv_size_traits().decrement();
+ priv_erasure_update_cache();
    }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -1009,67 +1105,27 @@
       if(b == e) return;
 
       //Get the bucket number and local iterator for both iterators
- bucket_ptr f(priv_buckets()), l(f + priv_buckets_len());
- size_type first_bucket_num = bucket_type::get_bucket_num(b.slist_it(), *f, *l);
+ siterator first_local_it(b.slist_it());
+ size_type first_bucket_num = this->priv_get_bucket_num(first_local_it);
 
       siterator before_first_local_it
- = priv_buckets()[first_bucket_num].previous(b.slist_it());
+ = priv_get_previous(priv_buckets()[first_bucket_num], first_local_it);
       size_type last_bucket_num;
       siterator last_local_it;
 
       //For the end iterator, we will assign the end iterator
       //of the last bucket
- if(e == end()){
+ if(e == this->end()){
          last_bucket_num = this->bucket_count() - 1;
          last_local_it = priv_buckets()[last_bucket_num].end();
       }
       else{
          last_local_it = e.slist_it();
- last_bucket_num = bucket_type::get_bucket_num(last_local_it, *f, *l);
+ last_bucket_num = this->priv_get_bucket_num(last_local_it);
       }
-
- const bucket_ptr buckets = priv_buckets();
- //First erase the nodes of the first bucket
- {
- bucket_type &first_b = buckets[first_bucket_num];
- siterator nxt(before_first_local_it); ++nxt;
- siterator end = first_b.end();
- while(nxt != end){
- nxt = first_b.erase_after_and_dispose
- ( before_first_local_it
- , detail::node_disposer<Disposer, hashtable_impl>(disposer, this));
- this->priv_size_traits().decrement();
- }
- }
-
- //Now fully clear the intermediate buckets
- for(size_type i = first_bucket_num+1; i < last_bucket_num; ++i){
- bucket_type &b = buckets[i];
- if(b.empty())
- continue;
- siterator b_begin(b.before_begin());
- siterator nxt(b_begin); ++nxt;
- siterator end = b.end();
- while(nxt != end){
- nxt = b.erase_after_and_dispose
- (b_begin, detail::node_disposer<Disposer, hashtable_impl>(disposer, this));
- this->priv_size_traits().decrement();
- }
- }
-
- //Now erase nodes from the last bucket
- {
- bucket_type &last_b = buckets[last_bucket_num];
- siterator b_begin(last_b.before_begin());
- siterator nxt(b_begin); ++nxt;
- while(nxt != last_local_it){
- nxt = last_b.erase_after_and_dispose
- (b_begin, detail::node_disposer<Disposer, hashtable_impl>
- (disposer, this));
- this->priv_size_traits().decrement();
- }
- }
- }
+ priv_erase_range(before_first_local_it, first_bucket_num, last_local_it, last_bucket_num, disposer);
+ priv_erasure_update_cache(first_bucket_num, last_bucket_num);
+ }
 
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
    //!
@@ -1109,40 +1165,42 @@
    size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func
                               ,KeyValueEqual equal_func, Disposer disposer)
    {
+ size_type bucket_num;
+ std::size_t h;
+ siterator prev;
+ siterator it =
+ this->priv_find(key, hash_func, equal_func, bucket_num, h, prev);
+ bool success = it != priv_invalid_local_it();
       size_type count(0);
-
- if(constant_time_size && this->empty()){
+ if(!success){
          return 0;
       }
-
- bucket_type &b = this->priv_buckets()[from_hash_to_bucket(hash_func(key))];
- siterator it = b.begin();
- siterator prev = b.before_begin();
-
- bool found = false;
- //Find equal value
- while(it != b.end()){
- const value_type &v =
- *this->get_real_value_traits().to_value_ptr(it.pointed_node());
- if(equal_func(key, v)){
- found = true;
- break;
- }
- ++prev;
- ++it;
+ else if(optimize_multikey){
+ siterator last = bucket_type::s_iterator_to
+ (*node_traits::get_next(priv_get_last_in_group
+ (dcast_bucket_ptr(it.pointed_node()))));
+ this->priv_erase_range_impl(bucket_num, prev, last, disposer, count);
       }
-
- if(!found)
- return 0;
-
- //If found erase all equal values
- for(siterator end = b.end(); it != end &&
- equal_func(key, *this->get_real_value_traits().to_value_ptr(it.pointed_node()))
- ; ++count){
- it = b.erase_after_and_dispose
- (prev, detail::node_disposer<Disposer, hashtable_impl>(disposer, this));
- this->priv_size_traits().decrement();
+ else{
+ //If found erase all equal values
+ bucket_type &b = this->priv_buckets()[bucket_num];
+ for(siterator end = b.end(); it != end; ++count, ++it){
+ slist_node_ptr n(it.pointed_node());
+ const value_type &v = priv_value_from_slist_node(n);
+ if(compare_hash){
+ std::size_t vh = this->priv_stored_hash(v, store_hash_t());
+ if(h != vh || !equal_func(key, v)){
+ break;
+ }
+ }
+ else if(!equal_func(key, v)){
+ break;
+ }
+ this->priv_size_traits().decrement();
+ }
+ b.erase_after_and_dispose(prev, it, make_node_disposer(disposer));
       }
+ priv_erasure_update_cache();
       return count;
    }
 
@@ -1179,11 +1237,11 @@
          size_type num_buckets = this->bucket_count();
          bucket_ptr b = this->priv_buckets();
          for(; num_buckets--; ++b){
- b->clear_and_dispose
- (detail::node_disposer<Disposer, hashtable_impl>(disposer, this));
+ b->clear_and_dispose(make_node_disposer(disposer));
          }
          this->priv_size_traits().set_size(size_type(0));
       }
+ priv_initialize_cache();
    }
 
    //! <b>Effects</b>: Returns the number of contained elements with the given value
@@ -1246,8 +1304,10 @@
    template<class KeyType, class KeyHasher, class KeyValueEqual>
    iterator find(const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func)
    {
- size_type bucket_n, hash;
- siterator local_it = this->priv_find(key, hash_func, equal_func, bucket_n, hash);
+ size_type bucket_n;
+ std::size_t hash;
+ siterator prev;
+ siterator local_it = this->priv_find(key, hash_func, equal_func, bucket_n, hash, prev);
       return iterator(local_it, this);
    }
 
@@ -1283,8 +1343,10 @@
    const_iterator find
       (const KeyType &key, KeyHasher hash_func, KeyValueEqual equal_func) const
    {
- size_type bucket_n, hash_value;
- siterator sit = this->priv_find(key, hash_func, equal_func, bucket_n, hash_value);
+ size_type bucket_n;
+ std::size_t hash_value;
+ siterator prev;
+ siterator sit = this->priv_find(key, hash_func, equal_func, bucket_n, hash_value, prev);
       return const_iterator(sit, this);
    }
 
@@ -1382,7 +1444,7 @@
    //! <b>Throws</b>: If the internal hash function throws.
    iterator iterator_to(reference value)
    {
- return iterator(bucket_type::s_iterator_to(from_value_to_node(value)), this);
+ return iterator(bucket_type::s_iterator_to(priv_value_to_node(value)), this);
    }
 
    //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
@@ -1396,12 +1458,9 @@
    //! <b>Throws</b>: If the internal hash function throws.
    const_iterator iterator_to(const_reference value) const
    {
- return const_iterator(bucket_type::s_iterator_to(from_value_to_node(const_cast<reference>(value))), this);
+ return const_iterator(bucket_type::s_iterator_to(priv_value_to_node(const_cast<reference>(value))), this);
    }
 
-
-
-
    //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
    //! appropriate type. Otherwise the behavior is undefined.
    //!
@@ -1417,7 +1476,7 @@
    static local_iterator s_local_iterator_to(reference value)
    {
       BOOST_STATIC_ASSERT((!stateful_value_traits));
- siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->from_value_to_node(value));
+ siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->priv_value_to_node(value));
       return local_iterator(sit, (hashtable_impl*)0);
    }
 
@@ -1436,7 +1495,7 @@
    static const_local_iterator s_local_iterator_to(const_reference value)
    {
       BOOST_STATIC_ASSERT((!stateful_value_traits));
- siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->from_value_to_node(const_cast<value_type&>(value)));
+ siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->priv_value_to_node(const_cast<value_type&>(value)));
       return const_local_iterator(sit, (hashtable_impl*)0);
    }
 
@@ -1451,7 +1510,7 @@
    //! <b>Throws</b>: Nothing.
    local_iterator local_iterator_to(reference value)
    {
- siterator sit = bucket_type::s_iterator_to(this->from_value_to_node(value));
+ siterator sit = bucket_type::s_iterator_to(this->priv_value_to_node(value));
       return local_iterator(sit, this);
    }
 
@@ -1467,7 +1526,7 @@
    const_local_iterator local_iterator_to(const_reference value) const
    {
       siterator sit = bucket_type::s_iterator_to
- (const_cast<node &>(this->from_value_to_node(value)));
+ (const_cast<node &>(this->priv_value_to_node(value)));
       return const_local_iterator(sit, this);
    }
 
@@ -1515,7 +1574,7 @@
    //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
    template<class KeyType, class KeyHasher>
    size_type bucket(const KeyType& k, const KeyHasher &hash_func) const
- { return from_hash_to_bucket(hash_func(k)); }
+ { return priv_hash_to_bucket(hash_func(k)); }
 
    //! <b>Effects</b>: Returns the bucket array pointer passed in the constructor
    //! or the last rehash function.
@@ -1630,75 +1689,87 @@
       size_type new_buckets_len = new_bucket_traits.bucket_count();
       bucket_ptr old_buckets = this->priv_buckets();
       size_type old_buckets_len = this->priv_buckets_len();
+
       //Check power of two bucket array if the option is activated
       BOOST_INTRUSIVE_INVARIANT_ASSERT
       (!power_2_buckets || (0 == (new_buckets_len & (new_buckets_len-1u))));
 
- BOOST_INTRUSIVE_TRY{
- size_type n = 0;
- const bool same_buffer = old_buckets == new_buckets;
- //If the new bucket length is a common factor
- //of the old one we can avoid hash calculations.
- const bool fast_shrink = (old_buckets_len > new_buckets_len) &&
- (power_2_buckets ||(old_buckets_len % new_buckets_len) == 0);
- //If we are shrinking the same bucket array and it's
- //is a fast shrink, just rehash the last nodes
- if(same_buffer && fast_shrink){
- n = new_buckets_len;
- }
-
- //Iterate through nodes
- for(; n < old_buckets_len; ++n){
- bucket_type &old_bucket = old_buckets[n];
-
- if(!fast_shrink){
- siterator before_i(old_bucket.before_begin());
- siterator end(old_bucket.end());
- siterator i(old_bucket.begin());
- for(;i != end; ++i){
- const value_type &v = *this->get_real_value_traits().to_value_ptr(i.pointed_node());
- const std::size_t hash_value = this->priv_hash_when_rehashing(v, store_hash_t());
- const size_type new_n = (power_2_buckets)
- ? (hash_value & (new_buckets_len-1)) : (hash_value % new_buckets_len);
- //If this is a buffer expansion don't move if it's not necessary
- if(same_buffer && new_n == n){
- ++before_i;
- }
- else{
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket, before_i);
- i = before_i;
- }
+ size_type n = priv_get_cache_bucket_num();
+ const bool same_buffer = old_buckets == new_buckets;
+ //If the new bucket length is a common factor
+ //of the old one we can avoid hash calculations.
+ const bool fast_shrink = (old_buckets_len > new_buckets_len) &&
+ (power_2_buckets ||(old_buckets_len % new_buckets_len) == 0);
+ //If we are shrinking the same bucket array and it's
+ //is a fast shrink, just rehash the last nodes
+ size_type new_first_bucket_num = new_buckets_len;
+ if(same_buffer && fast_shrink && (n < new_buckets_len)){
+ n = new_buckets_len;
+ new_first_bucket_num = priv_get_cache_bucket_num();
+ }
+
+ //Anti-exception stuff: they destroy the elements if something goes wrong
+ typedef detail::init_disposer<node_algorithms> NodeDisposer;
+ NodeDisposer node_disp;
+ detail::exception_array_disposer<bucket_type, NodeDisposer>
+ rollback1(new_buckets[0], node_disp, new_buckets_len);
+ detail::exception_array_disposer<bucket_type, NodeDisposer>
+ rollback2(old_buckets[0], node_disp, old_buckets_len);
+
+ //Put size in a safe value for rollback exception
+ size_type size_backup = this->priv_size_traits().get_size();
+ this->priv_size_traits().set_size(0);
+ //Put cache to safe position
+ priv_initialize_cache();
+ priv_insertion_update_cache(size_type(0u));
+
+ //Iterate through nodes
+ for(; n < old_buckets_len; ++n){
+ bucket_type &old_bucket = old_buckets[n];
+
+ if(!fast_shrink){
+ siterator before_i(old_bucket.before_begin());
+ siterator end(old_bucket.end());
+ siterator i(old_bucket.begin());
+ for(;i != end; ++i){
+ const value_type &v = priv_value_from_slist_node(i.pointed_node());
+ const std::size_t hash_value = this->priv_stored_hash(v, store_hash_t());
+ const size_type new_n = priv_hash_to_bucket(hash_value, new_buckets_len);
+ if(cache_begin && new_n < new_first_bucket_num)
+ new_first_bucket_num = new_n;
+ siterator last = bucket_type::s_iterator_to
+ (*priv_get_last_in_group(dcast_bucket_ptr(i.pointed_node())));
+ if(same_buffer && new_n == n){
+ before_i = last;
                }
- }
- else{
- const size_type new_n = (power_2_buckets)
- ? (n & (new_buckets_len-1))
- : (n % new_buckets_len);
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket);
+ else{
+ bucket_type &new_b = new_buckets[new_n];
+ new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
+ }
+ i = before_i;
             }
          }
-
- this->get_real_bucket_traits()= new_bucket_traits;
- }
- BOOST_INTRUSIVE_CATCH(...){
- for(size_type n = 0; n < new_buckets_len; ++n){
- if(safemode_or_autounlink){
- new_buckets[n].clear_and_dispose
- (detail::init_disposer<node_algorithms>());
- old_buckets[n].clear_and_dispose
- (detail::init_disposer<node_algorithms>());
- }
- else{
- new_buckets[n].clear();
- old_buckets[n].clear();
+ else{
+ const size_type new_n = priv_hash_to_bucket(n, new_buckets_len);
+ if(cache_begin && new_n < new_first_bucket_num)
+ new_first_bucket_num = new_n;
+ bucket_type &new_b = new_buckets[new_n];
+ if(!old_bucket.empty()){
+ new_b.splice_after( new_b.before_begin()
+ , old_bucket
+ , old_bucket.before_begin()
+ , priv_get_last(old_bucket));
             }
          }
- this->priv_size_traits().set_size(size_type(0));
- BOOST_INTRUSIVE_RETHROW;
       }
- BOOST_INTRUSIVE_CATCH_END
+
+ this->priv_size_traits().set_size(size_backup);
+ this->priv_real_bucket_traits() = new_bucket_traits;
+ priv_initialize_cache();
+ priv_insertion_update_cache(new_first_bucket_num);
+ //priv_erasure_update_cache();
+ rollback1.release();
+ rollback2.release();
    }
 
    //! <b>Effects</b>: Returns the nearest new bucket count optimized for
@@ -1714,8 +1785,7 @@
    {
       const std::size_t *primes = &detail::prime_list_holder<0>::prime_list[0];
       const std::size_t *primes_end = primes + detail::prime_list_holder<0>::prime_list_size;
- size_type const* bound =
- std::lower_bound(primes, primes_end, n);
+ size_type const* bound = std::lower_bound(primes, primes_end, n);
       if(bound == primes_end)
             bound--;
       return size_type(*bound);
@@ -1734,8 +1804,7 @@
    {
       const std::size_t *primes = &detail::prime_list_holder<0>::prime_list[0];
       const std::size_t *primes_end = primes + detail::prime_list_holder<0>::prime_list_size;
- size_type const* bound =
- std::upper_bound(primes, primes_end, n);
+ size_type const* bound = std::upper_bound(primes, primes_end, n);
       if(bound != primes_end)
             bound--;
       return size_type(*bound);
@@ -1743,72 +1812,672 @@
 
    /// @cond
    private:
+ std::size_t priv_hash_to_bucket(std::size_t hash_value) const
+ { return priv_hash_to_bucket(hash_value, power_2_buckets_t()); }
+
+ std::size_t priv_hash_to_bucket(std::size_t hash_value, detail::bool_<false>) const
+ { return hash_value % this->priv_real_bucket_traits().bucket_count(); }
+
+ std::size_t priv_hash_to_bucket(std::size_t hash_value, detail::bool_<true>) const
+ { return hash_value & (this->priv_real_bucket_traits().bucket_count() - 1); }
+
+ std::size_t priv_hash_to_bucket(std::size_t hash_value, std::size_t bucket_len) const
+ { return priv_hash_to_bucket(hash_value, bucket_len, power_2_buckets_t()); }
+
+ std::size_t priv_hash_to_bucket(std::size_t hash_value, std::size_t bucket_len, detail::bool_<false>) const
+ { return hash_value % bucket_len; }
+
+ std::size_t priv_hash_to_bucket(std::size_t hash_value, std::size_t bucket_len, detail::bool_<true>) const
+ { return hash_value & (bucket_len - 1); }
+
+ const key_equal &priv_equal() const
+ { return static_cast<const key_equal&>(this->bucket_hash_equal_.get()); }
+
+ key_equal &priv_equal()
+ { return static_cast<key_equal&>(this->bucket_hash_equal_.get()); }
+
+ value_type &priv_value_from_slist_node(slist_node_ptr n)
+ { return *this->get_real_value_traits().to_value_ptr(dcast_bucket_ptr(n)); }
+
+ const value_type &priv_value_from_slist_node(slist_node_ptr n) const
+ { return *this->get_real_value_traits().to_value_ptr(dcast_bucket_ptr(n)); }
+
+ const real_bucket_traits &priv_real_bucket_traits(detail::bool_<false>) const
+ { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_; }
+
+ const real_bucket_traits &priv_real_bucket_traits(detail::bool_<true>) const
+ { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_.get_bucket_traits(*this); }
+
+ real_bucket_traits &priv_real_bucket_traits(detail::bool_<false>)
+ { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_; }
+
+ real_bucket_traits &priv_real_bucket_traits(detail::bool_<true>)
+ { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_.bucket_traits_.get_bucket_traits(*this); }
+
+ const real_bucket_traits &priv_real_bucket_traits() const
+ { return this->priv_real_bucket_traits(detail::bool_<external_bucket_traits>()); }
+
+ real_bucket_traits &priv_real_bucket_traits()
+ { return this->priv_real_bucket_traits(detail::bool_<external_bucket_traits>()); }
+
+ const hasher &priv_hasher() const
+ { return static_cast<const hasher&>(this->bucket_hash_equal_.bucket_hash.get()); }
+
+ hasher &priv_hasher()
+ { return static_cast<hasher&>(this->bucket_hash_equal_.bucket_hash.get()); }
+
+ bucket_ptr priv_buckets() const
+ { return this->priv_real_bucket_traits().bucket_begin(); }
+
+ size_type priv_buckets_len() const
+ { return this->priv_real_bucket_traits().bucket_count(); }
+
+ static node_ptr uncast(const_node_ptr ptr)
+ { return node_ptr(const_cast<node*>(detail::get_pointer(ptr))); }
+
+ node &priv_value_to_node(value_type &v)
+ { return *this->get_real_value_traits().to_node_ptr(v); }
+
+ const node &priv_value_to_node(const value_type &v) const
+ { return *this->get_real_value_traits().to_node_ptr(v); }
+
+ size_traits &priv_size_traits()
+ { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_; }
+
+ const size_traits &priv_size_traits() const
+ { return this->bucket_hash_equal_.bucket_hash.bucket_plus_size_; }
+
+ template<class Disposer>
+ void priv_erase_range_impl
+ (size_type bucket_num, siterator before_first_it, siterator end, Disposer disposer, size_type &num_erased)
+ {
+ const bucket_ptr buckets = priv_buckets();
+ bucket_type &b = buckets[bucket_num];
+
+ if(before_first_it == b.before_begin() && end == b.end()){
+ priv_erase_range_impl(bucket_num, 1, disposer, num_erased);
+ }
+ else{
+ num_erased = 0;
+ siterator to_erase(before_first_it);
+ ++to_erase;
+ slist_node_ptr end_ptr = end.pointed_node();
+ while(to_erase != end){
+ priv_erase_from_group(end_ptr, dcast_bucket_ptr(to_erase.pointed_node()), optimize_multikey_t());
+ to_erase = b.erase_after_and_dispose(before_first_it, make_node_disposer(disposer));
+ ++num_erased;
+ }
+ this->priv_size_traits().set_size(this->priv_size_traits().get_size()-num_erased);
+ }
+ }
+
+ template<class Disposer>
+ void priv_erase_range_impl
+ (size_type first_bucket_num, size_type num_buckets, Disposer disposer, size_type &num_erased)
+ {
+ //Now fully clear the intermediate buckets
+ const bucket_ptr buckets = priv_buckets();
+ num_erased = 0;
+ for(size_type i = first_bucket_num; i < (num_buckets + first_bucket_num); ++i){
+ bucket_type &b = buckets[i];
+ siterator b_begin(b.before_begin());
+ siterator nxt(b_begin);
+ ++nxt;
+ siterator end(b.end());
+ while(nxt != end){
+ priv_init_group(nxt.pointed_node(), optimize_multikey_t());
+ nxt = b.erase_after_and_dispose
+ (b_begin, make_node_disposer(disposer));
+ this->priv_size_traits().decrement();
+ ++num_erased;
+ }
+ }
+ }
+
+ template<class Disposer>
+ void priv_erase_range( siterator before_first_it, size_type first_bucket
+ , siterator last_it, size_type last_bucket
+ , Disposer disposer)
+ {
+ size_type num_erased;
+ if (first_bucket == last_bucket){
+ priv_erase_range_impl(first_bucket, before_first_it, last_it, disposer, num_erased);
+ }
+ else {
+ bucket_type *b = (&this->priv_buckets()[0]);
+ priv_erase_range_impl(first_bucket, before_first_it, b[first_bucket].end(), disposer, num_erased);
+ if(size_type n = (last_bucket - first_bucket - 1))
+ priv_erase_range_impl(first_bucket + 1, n, disposer, num_erased);
+ priv_erase_range_impl(last_bucket, b[last_bucket].before_begin(), last_it, disposer, num_erased);
+ }
+ }
+
+ static node_ptr dcast_bucket_ptr(typename slist_impl::node_ptr p)
+ { return node_ptr(&static_cast<node&>(*p)); }
 
- std::size_t priv_hash_when_rehashing(const value_type &v, detail::true_)
+ std::size_t priv_stored_hash(const value_type &v, detail::true_) const
    { return node_traits::get_hash(this->get_real_value_traits().to_node_ptr(v)); }
 
- std::size_t priv_hash_when_rehashing(const value_type &v, detail::false_)
+ std::size_t priv_stored_hash(const value_type &v, detail::false_) const
    { return priv_hasher()(v); }
 
- void priv_store_hash(node_ptr p, std::size_t h, detail::true_)
+ std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) const
+ { return node_traits::get_hash(dcast_bucket_ptr(n)); }
+
+ std::size_t priv_stored_hash(slist_node_ptr, detail::false_) const
+ {
+ //This code should never be reached!
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(0);
+ return 0;
+ }
+
+ static void priv_store_hash(node_ptr p, std::size_t h, detail::true_)
    { return node_traits::set_hash(p, h); }
 
- void priv_store_hash(node_ptr, std::size_t, detail::false_)
+ static void priv_store_hash(node_ptr, std::size_t, detail::false_)
+ {}
+
+ static void priv_clear_group_nodes(bucket_type &b, detail::true_)
+ {
+ siterator it(b.begin()), itend(b.end());
+ while(it != itend){
+ node_ptr to_erase(dcast_bucket_ptr(it.pointed_node()));
+ ++it;
+ group_algorithms::init(to_erase);
+ }
+ }
+
+ static void priv_clear_group_nodes(bucket_type &, detail::false_)
+ {}
+
+ std::size_t priv_get_bucket_num(siterator it)
+ { return priv_get_bucket_num_hash_dispatch(it, store_hash_t()); }
+
+ std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::true_)
+ {
+ return this->priv_hash_to_bucket
+ (this->priv_stored_hash(it.pointed_node(), store_hash_t()));
+ }
+
+ std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::false_)
+ { return priv_get_bucket_num_no_hash_store(it, optimize_multikey_t()); }
+
+ std::size_t priv_get_bucket_num_no_hash_store( siterator it, detail::true_)
+ {
+ bucket_ptr f(priv_buckets()), l(f + priv_buckets_len() - 1);
+ slist_node_ptr bb = priv_get_bucket_before_begin
+ ( f->end().pointed_node()
+ , l->end().pointed_node()
+ , dcast_bucket_ptr(it.pointed_node()));
+ //Now get the bucket_impl from the iterator
+ const bucket_type &b = static_cast<const bucket_type&>
+ (bucket_type::slist_type::container_from_end_iterator(bucket_type::s_iterator_to(*bb)));
+ //Now just calculate the index b has in the bucket array
+ return static_cast<size_type>(&b - &*f);
+ }
+
+ std::size_t priv_get_bucket_num_no_hash_store( siterator it, detail::false_)
+ {
+ bucket_ptr f(priv_buckets()), l(f + priv_buckets_len() - 1);
+ slist_node_ptr first_ptr(f->cend().pointed_node())
+ , last_ptr(l->cend().pointed_node());
+
+ //The end node is embedded in the singly linked list:
+ //iterate until we reach it.
+ while(!(first_ptr <= it.pointed_node() && it.pointed_node() <= last_ptr)){
+ ++it;
+ }
+ //Now get the bucket_impl from the iterator
+ const bucket_type &b = static_cast<const bucket_type&>
+ (bucket_type::container_from_end_iterator(it));
+
+ //Now just calculate the index b has in the bucket array
+ return static_cast<std::size_t>(&b - &*f);
+ }
+
+ void priv_erase_from_group(slist_node_ptr end_ptr, node_ptr to_erase_ptr, detail::true_)
+ {
+ node_ptr nxt_ptr(node_traits::get_next(to_erase_ptr));
+ node_ptr prev_in_group_ptr(group_traits::get_next(to_erase_ptr));
+ bool last_in_group = (end_ptr == nxt_ptr) ||
+ (group_traits::get_next(nxt_ptr) != to_erase_ptr);
+ bool first_in_group = node_traits::get_next(prev_in_group_ptr) != to_erase_ptr;
+
+ if(first_in_group && last_in_group){
+ group_algorithms::init(to_erase_ptr);
+ }
+ else if(first_in_group){
+ group_algorithms::unlink_after(nxt_ptr);
+ }
+ else if(last_in_group){
+ node_ptr first_in_group = //possible_first_in_group ? possible_first_in_group :
+ priv_get_first_in_group_of_last_in_group(to_erase_ptr);
+ group_algorithms::unlink_after(first_in_group);
+ //possible_first_in_group = 0;
+ }
+ else{
+ group_algorithms::unlink_after(nxt_ptr);
+ }
+ }
+
+ void priv_erase_from_group(slist_node_ptr, node_ptr, detail::false_)
    {}
+
+ void priv_init_group(slist_node_ptr n, detail::true_)
+ { group_algorithms::init(dcast_bucket_ptr(n)); }
+
+ void priv_init_group(slist_node_ptr, detail::false_)
+ {}
+
+ void priv_insert_in_group(node_ptr first_in_group, node_ptr n, detail::true_)
+ {
+ if(first_in_group){
+ if(group_algorithms::unique(first_in_group))
+ group_algorithms::link_after(first_in_group, n);
+ else{
+ group_algorithms::link_after(node_traits::get_next(first_in_group), n);
+ }
+ }
+ else{
+ group_algorithms::init_header(n);
+ }
+ }
+
+ static slist_node_ptr priv_get_bucket_before_begin
+ (slist_node_ptr bucket_beg, slist_node_ptr bucket_end, node_ptr p)
+ {
+ //First find the last node of p's group.
+ //This requires checking the first node of the next group or
+ //the bucket node.
+ node_ptr prev_node = p;
+ node_ptr nxt(node_traits::get_next(p));
+ while(!(bucket_beg <= nxt && nxt <= bucket_end) &&
+ (group_traits::get_next(nxt) == prev_node)){
+ prev_node = nxt;
+ nxt = node_traits::get_next(nxt);
+ }
+
+ //If we've reached the bucket node just return it.
+ if(bucket_beg <= nxt && nxt <= bucket_end){
+ return nxt;
+ }
+
+ //Otherwise, iterate using group links until the bucket node
+ node_ptr first_node_of_group = nxt;
+ node_ptr last_node_group = group_traits::get_next(first_node_of_group);
+ slist_node_ptr possible_end = node_traits::get_next(last_node_group);
+
+ while(!(bucket_beg <= possible_end && possible_end <= bucket_end)){
+ first_node_of_group = dcast_bucket_ptr(possible_end);
+ last_node_group = group_traits::get_next(first_node_of_group);
+ possible_end = node_traits::get_next(last_node_group);
+ }
+ return possible_end;
+ }
+
+ static node_ptr priv_get_prev_to_first_in_group(slist_node_ptr bucket_node, node_ptr first_in_group)
+ {
+ //Just iterate using group links and obtain the node
+ //before "first_in_group)"
+ node_ptr prev_node = dcast_bucket_ptr(bucket_node);
+ node_ptr nxt(node_traits::get_next(prev_node));
+ while(nxt != first_in_group){
+ prev_node = group_traits::get_next(nxt);
+ nxt = node_traits::get_next(prev_node);
+ }
+ return prev_node;
+ }
+
+ static node_ptr priv_get_first_in_group_of_last_in_group(node_ptr last_in_group)
+ {
+ //Just iterate using group links and obtain the node
+ //before "last_in_group"
+ node_ptr possible_first = group_traits::get_next(last_in_group);
+ node_ptr possible_first_prev = group_traits::get_next(possible_first);
+ // The deleted node is at the end of the group, so the
+ // node in the group pointing to it is at the beginning
+ // of the group. Find that to change its pointer.
+ while(possible_first_prev != last_in_group){
+ possible_first = possible_first_prev;
+ possible_first_prev = group_traits::get_next(possible_first);
+ }
+ return possible_first;
+ }
+
+ void priv_insert_in_group(node_ptr, node_ptr, detail::false_)
+ {}
+
+ static node_ptr priv_get_last_in_group(node_ptr first_in_group)
+ { return priv_get_last_in_group(first_in_group, optimize_multikey_t()); }
+
+ static node_ptr priv_get_last_in_group(node_ptr first_in_group, detail::true_)
+ { return group_traits::get_next(first_in_group); }
+
+ static node_ptr priv_get_last_in_group(node_ptr n, detail::false_)
+ { return n; }
+
+ siterator priv_get_previous
+ (bucket_type &b, siterator i)
+ { return priv_get_previous(b, i, optimize_multikey_t()); }
+
+ siterator priv_get_previous
+ (bucket_type &b, siterator i, detail::true_)
+ {
+ node_ptr elem(dcast_bucket_ptr(i.pointed_node()));
+ node_ptr prev_in_group(group_traits::get_next(elem));
+ bool first_in_group = node_traits::get_next(prev_in_group) != elem;
+
+ typename bucket_type::node &n = first_in_group
+ ? *priv_get_prev_to_first_in_group(b.end().pointed_node(), elem)
+ : *group_traits::get_next(elem)
+ ;
+ return bucket_type::s_iterator_to(n);
+ }
+
+ siterator priv_get_previous
+ (bucket_type &b, siterator i, detail::false_)
+ { return b.previous(i); }
+
+ static siterator priv_get_last(bucket_type &b)
+ { return priv_get_last(b, optimize_multikey_t()); }
+
+ static siterator priv_get_last(bucket_type &b, detail::true_)
+ {
+ //First find the last node of p's group.
+ //This requires checking the first node of the next group or
+ //the bucket node.
+ slist_node_ptr end_ptr(b.end().pointed_node());
+ node_ptr possible_end(node_traits::get_next( dcast_bucket_ptr(end_ptr)));
+ node_ptr last_node_group(possible_end);
+
+ while(end_ptr != possible_end){
+ last_node_group = group_traits::get_next(dcast_bucket_ptr(possible_end));
+ possible_end = node_traits::get_next(last_node_group);
+ }
+ return bucket_type::s_iterator_to(*last_node_group);
+ }
+
+ static siterator priv_get_last(bucket_type &b, detail::false_)
+ { return b.previous(b.end()); }
+
+ siterator priv_get_previous_and_next_in_group
+ (siterator i, node_ptr &nxt_in_group)
+ {
+ siterator prev;
+ node_ptr elem(dcast_bucket_ptr(i.pointed_node()));
+ bucket_ptr f(priv_buckets()), l(f + priv_buckets_len() - 1);
+
+ slist_node_ptr first_end_ptr(f->cend().pointed_node());
+ slist_node_ptr last_end_ptr (l->cend().pointed_node());
+
+ node_ptr nxt(node_traits::get_next(elem));
+ node_ptr prev_in_group(group_traits::get_next(elem));
+ bool last_in_group = (first_end_ptr <= nxt && nxt <= last_end_ptr) ||
+ (group_traits::get_next(nxt) != elem);
+ bool first_in_group = node_traits::get_next(prev_in_group) != elem;
+
+ if(first_in_group){
+ node_ptr start_pos;
+ if(last_in_group){
+ start_pos = elem;
+ nxt_in_group = 0;
+ }
+ else{
+ start_pos = prev_in_group;
+ nxt_in_group = node_traits::get_next(elem);
+ }
+ slist_node_ptr bucket_node;
+ if(store_hash){
+ bucket_node = this->priv_buckets()
+ [this->priv_hash_to_bucket
+ (this->priv_stored_hash(elem, store_hash_t()))
+ ].before_begin().pointed_node();
+ }
+ else{
+ bucket_node = priv_get_bucket_before_begin
+ (first_end_ptr, last_end_ptr, start_pos);
+ }
+ prev = bucket_type::s_iterator_to
+ (*priv_get_prev_to_first_in_group(bucket_node, elem));
+ }
+ else{
+ if(last_in_group){
+ nxt_in_group = priv_get_first_in_group_of_last_in_group(elem);
+ }
+ else{
+ nxt_in_group = node_traits::get_next(elem);
+ }
+ prev = bucket_type::s_iterator_to(*group_traits::get_next(elem));
+ }
+ return prev;
+ }
+
+ template<class Disposer>
+ void priv_erase(const_iterator i, Disposer disposer, detail::true_)
+ {
+ siterator elem(i.slist_it());
+ node_ptr nxt_in_group;
+ siterator prev = priv_get_previous_and_next_in_group(elem, nxt_in_group);
+ bucket_type::s_erase_after_and_dispose(prev, make_node_disposer(disposer));
+ if(nxt_in_group)
+ group_algorithms::unlink_after(nxt_in_group);
+ if(safemode_or_autounlink)
+ group_algorithms::init(dcast_bucket_ptr(elem.pointed_node()));
+ }
+
+ template <class Disposer>
+ void priv_erase(const_iterator i, Disposer disposer, detail::false_)
+ {
+ siterator to_erase(i.slist_it());
+ bucket_type &b = this->priv_buckets()[this->priv_get_bucket_num(to_erase)];
+ siterator prev(priv_get_previous(b, to_erase));
+ b.erase_after_and_dispose(prev, make_node_disposer(disposer));
+ }
+
+ bucket_ptr priv_invalid_bucket() const
+ {
+ const real_bucket_traits &rbt = this->priv_real_bucket_traits();
+ return rbt.bucket_begin() + rbt.bucket_count();
+ }
    
- static siterator invalid_local_it(const real_bucket_traits &b)
- { return b.bucket_begin()->end(); }
+ siterator priv_invalid_local_it() const
+ { return priv_invalid_bucket()->end(); }
 
    siterator priv_begin(size_type &bucket_num) const
+ { return priv_begin(bucket_num, cache_begin_t()); }
+
+ siterator priv_begin(size_type &bucket_num, detail::bool_<false>) const
    {
+ size_type n = 0;
       size_type buckets_len = this->priv_buckets_len();
- for (bucket_num = 0; bucket_num < buckets_len; ++bucket_num){
- bucket_type &b = this->priv_buckets()[bucket_num];
- if(!b.empty())
+ for (n = 0; n < buckets_len; ++n){
+ bucket_type &b = this->priv_buckets()[n];
+ if(!b.empty()){
+ bucket_num = n;
             return b.begin();
+ }
       }
- return invalid_local_it(this->get_real_bucket_traits());
+ bucket_num = n;
+ return priv_invalid_local_it();
    }
 
+ siterator priv_begin(size_type &bucket_num, detail::bool_<true>) const
+ {
+ bucket_num = this->bucket_hash_equal_.cached_begin_ - this->priv_buckets();
+ if(this->bucket_hash_equal_.cached_begin_ == priv_invalid_bucket()){
+ return priv_invalid_local_it();
+ }
+ else{
+ return this->bucket_hash_equal_.cached_begin_->begin();
+ }
+ }
+
+ void priv_initialize_cache()
+ { priv_initialize_cache(cache_begin_t()); }
+
+ void priv_initialize_cache(detail::bool_<true>)
+ { this->bucket_hash_equal_.cached_begin_ = priv_invalid_bucket(); }
+
+ void priv_initialize_cache(detail::bool_<false>)
+ {}
+
+ void priv_insertion_update_cache(size_type insertion_bucket)
+ { priv_insertion_update_cache(insertion_bucket, cache_begin_t()); }
+
+ void priv_insertion_update_cache(size_type insertion_bucket, detail::bool_<true>)
+ {
+ bucket_ptr p = priv_buckets() + insertion_bucket;
+ if(p < this->bucket_hash_equal_.cached_begin_){
+ this->bucket_hash_equal_.cached_begin_ = p;
+ }
+ }
+
+ void priv_insertion_update_cache(size_type, detail::bool_<false>)
+ {}
+
+ void priv_erasure_update_cache(size_type first_bucket, size_type last_bucket)
+ { priv_erasure_update_cache(first_bucket, last_bucket, cache_begin_t()); }
+
+ void priv_erasure_update_cache(size_type first_bucket_num, size_type last_bucket_num, detail::bool_<true>)
+ {
+ //If the last bucket is the end, the cache must be updated
+ //to the last position if all
+ if(priv_get_cache_bucket_num() == first_bucket_num &&
+ priv_buckets()[first_bucket_num].empty() ){
+ priv_set_cache(priv_buckets() + last_bucket_num);
+ priv_erasure_update_cache();
+ }
+ }
+
+ void priv_erasure_update_cache(size_type, size_type, detail::bool_<false>)
+ {}
+
+ void priv_erasure_update_cache()
+ { priv_erasure_update_cache(cache_begin_t()); }
+
+ void priv_erasure_update_cache(detail::bool_<true>)
+ {
+ if(constant_time_size && !size()){
+ priv_initialize_cache();
+ }
+ else{
+ size_type current_n = this->bucket_hash_equal_.cached_begin_ - priv_buckets();
+ for( const size_type num_buckets = this->priv_buckets_len()
+ ; current_n < num_buckets
+ ; ++current_n, ++this->bucket_hash_equal_.cached_begin_){
+ if(!this->bucket_hash_equal_.cached_begin_->empty()){
+ return;
+ }
+ }
+ priv_initialize_cache();
+ }
+ }
+
+ void priv_erasure_update_cache(detail::bool_<false>)
+ {}
+
+ void priv_swap_cache(detail::bool_<true>, hashtable_impl &other)
+ {
+ std::swap( this->bucket_hash_equal_.cached_begin_
+ , other.bucket_hash_equal_.cached_begin_);
+ }
+
+ void priv_swap_cache(detail::bool_<false>, hashtable_impl &)
+ {}
+
+ bucket_ptr priv_get_cache()
+ { return priv_get_cache(cache_begin_t()); }
+
+ bucket_ptr priv_get_cache(detail::bool_<true>)
+ { return this->bucket_hash_equal_.cached_begin_; }
+
+ bucket_ptr priv_get_cache(detail::bool_<false>)
+ { return this->priv_buckets(); }
+
+ void priv_set_cache(bucket_ptr p)
+ { priv_set_cache(p, cache_begin_t()); }
+
+ void priv_set_cache(bucket_ptr p, detail::bool_<true>)
+ { this->bucket_hash_equal_.cached_begin_ = p; }
+
+ void priv_set_cache(bucket_ptr, detail::bool_<false>)
+ {}
+
+ size_type priv_get_cache_bucket_num()
+ { return priv_get_cache_bucket_num(cache_begin_t()); }
+
+ size_type priv_get_cache_bucket_num(detail::bool_<true>)
+ { return this->bucket_hash_equal_.cached_begin_ - this->priv_buckets(); }
+
+ size_type priv_get_cache_bucket_num(detail::bool_<false>)
+ { return 0u; }
+
    void priv_clear_buckets()
- { priv_clear_buckets(this->priv_buckets(), this->priv_buckets_len()); }
+ {
+ this->priv_clear_buckets
+ ( priv_get_cache()
+ , this->priv_buckets_len() - (priv_get_cache() - priv_buckets()));
+ }
+
+ void priv_initialize_buckets()
+ {
+ this->priv_clear_buckets
+ ( priv_buckets(), this->priv_buckets_len());
+ }
 
- static void priv_clear_buckets(bucket_ptr buckets_ptr, size_type buckets_len)
+ void priv_clear_buckets(bucket_ptr buckets_ptr, size_type buckets_len)
    {
       for(; buckets_len--; ++buckets_ptr){
          if(safemode_or_autounlink){
+ priv_clear_group_nodes(*buckets_ptr, optimize_multikey_t());
             buckets_ptr->clear_and_dispose(detail::init_disposer<node_algorithms>());
          }
          else{
             buckets_ptr->clear();
          }
       }
+ priv_initialize_cache();
    }
 
    template<class KeyType, class KeyHasher, class KeyValueEqual>
    siterator priv_find
       ( const KeyType &key, KeyHasher hash_func
- , KeyValueEqual equal_func, size_type &bucket_number, size_type &h) const
+ , KeyValueEqual equal_func, size_type &bucket_number, std::size_t &h, siterator &previt) const
    {
- bucket_number = from_hash_to_bucket((h = hash_func(key)));
+ bucket_number = priv_hash_to_bucket((h = hash_func(key)));
 
       if(constant_time_size && this->empty()){
- return invalid_local_it(this->get_real_bucket_traits());
+ return priv_invalid_local_it();
       }
       
       bucket_type &b = this->priv_buckets()[bucket_number];
- siterator it = b.begin();
+ previt = b.before_begin();
+ siterator it = previt;
+ ++it;
 
       while(it != b.end()){
- const value_type &v =
- *this->get_real_value_traits().to_value_ptr(it.pointed_node());
- if(equal_func(key, v)){
+ const value_type &v = priv_value_from_slist_node(it.pointed_node());
+ if(compare_hash){
+ std::size_t vh = this->priv_stored_hash(v, store_hash_t());
+ if(h == vh && equal_func(key, v)){
+ return it;
+ }
+ }
+ else if(equal_func(key, v)){
             return it;
          }
+ if(optimize_multikey){
+ previt = bucket_type::s_iterator_to
+ (*priv_get_last_in_group(dcast_bucket_ptr(it.pointed_node())));
+ it = previt;
+ }
+ else{
+ previt = it;
+ }
          ++it;
       }
 
- return invalid_local_it(this->get_real_bucket_traits());
+ return priv_invalid_local_it();
    }
 
    template<class KeyType, class KeyHasher, class KeyValueEqual>
@@ -1820,33 +2489,52 @@
       , size_type &bucket_number_second
       , size_type &count) const
    {
- size_type h;
+ std::size_t h;
       count = 0;
+ siterator prev;
       //Let's see if the element is present
       std::pair<siterator, siterator> to_return
- ( priv_find(key, hash_func, equal_func, bucket_number_first, h)
- , invalid_local_it(this->get_real_bucket_traits()));
+ ( priv_find(key, hash_func, equal_func, bucket_number_first, h, prev)
+ , priv_invalid_local_it());
       if(to_return.first == to_return.second){
          bucket_number_second = bucket_number_first;
          return to_return;
       }
- ++count;
       //If it's present, find the first that it's not equal in
       //the same bucket
       bucket_type &b = this->priv_buckets()[bucket_number_first];
       siterator it = to_return.first;
- ++it;
-
- while(it != b.end()){
- const value_type &v =
- *this->get_real_value_traits().to_value_ptr(it.pointed_node());
- if(!equal_func(key, v)){
- to_return.second = it;
+ if(optimize_multikey){
+ to_return.second = bucket_type::s_iterator_to
+ (*node_traits::get_next(priv_get_last_in_group
+ (dcast_bucket_ptr(it.pointed_node()))));
+ count = std::distance(it, to_return.second);
+ if(to_return.second != b.end()){
             bucket_number_second = bucket_number_first;
             return to_return;
          }
- ++it;
+ }
+ else{
          ++count;
+ ++it;
+ while(it != b.end()){
+ const value_type &v = priv_value_from_slist_node(it.pointed_node());
+ if(compare_hash){
+ std::size_t hv = this->priv_stored_hash(v, store_hash_t());
+ if(hv != h || !equal_func(key, v)){
+ to_return.second = it;
+ bucket_number_second = bucket_number_first;
+ return to_return;
+ }
+ }
+ else if(!equal_func(key, v)){
+ to_return.second = it;
+ bucket_number_second = bucket_number_first;
+ return to_return;
+ }
+ ++it;
+ ++count;
+ }
       }
    
       //If we reached the end, find the first, non-empty bucket
@@ -1861,22 +2549,25 @@
       }
 
       //Otherwise, return the end node
- to_return.second = invalid_local_it(this->get_real_bucket_traits());
+ to_return.second = priv_invalid_local_it();
       return to_return;
    }
    /// @endcond
 };
 
 /// @cond
-template<class T, class O1 = none, class O2 = none
- , class O3 = none, class O4 = none
- , class O5 = none, class O6 = none
- , class O7 = none
- >
+template < class T
+ , bool UniqueKeys
+ , class O1 = none, class O2 = none
+ , class O3 = none, class O4 = none
+ , class O5 = none, class O6 = none
+ , class O7 = none, class O8 = none
+ , class O9 = none
+ >
 struct make_hashtable_opt
 {
    typedef typename pack_options
- < uset_defaults<T>, O1, O2, O3, O4, O5, O6, O7>::type packed_options;
+ < uset_defaults<T>, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type packed_options;
 
    //Real value traits must be calculated from options
    typedef typename detail::get_value_traits
@@ -1891,9 +2582,13 @@
>::type real_value_traits;
    typedef typename packed_options::bucket_traits specified_bucket_traits;
    /// @endcond
- //Real bucket traits must be calculated from options and calculated valute_traits
- typedef typename get_slist_impl
- <typename real_value_traits::node_traits>::type slist_impl;
+
+ //Real bucket traits must be calculated from options and calculated value_traits
+ typedef typename detail::get_slist_impl
+ <typename detail::reduced_slist_node_traits
+ <typename real_value_traits::node_traits>::type
+ >::type slist_impl;
+
    typedef typename
       detail::if_c< detail::is_same
                      < specified_bucket_traits
@@ -1905,12 +2600,15 @@
 
    typedef usetopt
       < value_traits
+ , UniqueKeys
       , typename packed_options::hash
       , typename packed_options::equal
       , typename packed_options::size_type
       , packed_options::constant_time_size
       , real_bucket_traits
       , packed_options::power_2_buckets
+ , packed_options::cache_begin
+ , packed_options::compare_hash
> type;
 };
 /// @endcond
@@ -1923,7 +2621,8 @@
 template<class T, class O1 = none, class O2 = none
                 , class O3 = none, class O4 = none
                 , class O5 = none, class O6 = none
- , class O7 = none
+ , class O7 = none, class O8 = none
+ , class O9 = none
>
 #endif
 struct make_hashtable
@@ -1931,7 +2630,7 @@
    /// @cond
    typedef hashtable_impl
       < typename make_hashtable_opt
- <T, O1, O2, O3, O4, O5, O6, O7>::type
+ <T, false, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type
> implementation_defined;
 
    /// @endcond
@@ -1939,12 +2638,12 @@
 };
 
 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7>
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9>
 class hashtable
- : public make_hashtable<T, O1, O2, O3, O4, O5, O6, O7>::type
+ : public make_hashtable<T, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type
 {
    typedef typename make_hashtable
- <T, O1, O2, O3, O4, O5, O6, O7>::type Base;
+ <T, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type Base;
 
    public:
    typedef typename Base::value_traits value_traits;

Modified: branches/release/boost/intrusive/intrusive_fwd.hpp
==============================================================================
--- branches/release/boost/intrusive/intrusive_fwd.hpp (original)
+++ branches/release/boost/intrusive/intrusive_fwd.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -283,8 +283,7 @@
>
 class bs_set_member_hook;
 
-//hash/unordered
-//rbtree/set/multiset
+//hashtable/unordered_set/unordered_multiset
 template
    < class T
    , class O1 = none
@@ -294,6 +293,8 @@
    , class O5 = none
    , class O6 = none
    , class O7 = none
+ , class O8 = none
+ , class O9 = none
>
 class hashtable;
 
@@ -306,6 +307,8 @@
    , class O5 = none
    , class O6 = none
    , class O7 = none
+ , class O8 = none
+ , class O9 = none
>
 class unordered_set;
 
@@ -318,6 +321,8 @@
    , class O5 = none
    , class O6 = none
    , class O7 = none
+ , class O8 = none
+ , class O9 = none
>
 class unordered_multiset;
 
@@ -337,6 +342,20 @@
>
 class unordered_set_member_hook;
 
+template
+ < class O1 = none
+ , class O2 = none
+ , class O3 = none
+ >
+class any_base_hook;
+
+template
+ < class O1 = none
+ , class O2 = none
+ , class O3 = none
+ >
+class any_member_hook;
+
 } //namespace intrusive {
 } //namespace boost {
 

Modified: branches/release/boost/intrusive/linear_slist_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/linear_slist_algorithms.hpp (original)
+++ branches/release/boost/intrusive/linear_slist_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -53,6 +53,7 @@
    typedef detail::common_slist_algorithms<NodeTraits> base_t;
    /// @endcond
    public:
+ typedef typename NodeTraits::node node;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
    typedef NodeTraits node_traits;
@@ -136,7 +137,7 @@
    //!
    //! <b>Throws</b>: Nothing.
    static void init_header(node_ptr this_node)
- { NodeTraits::set_next(this_node, 0); }
+ { NodeTraits::set_next(this_node, node_ptr(0)); }
 
    //! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
    //!
@@ -195,7 +196,7 @@
    //! <b>Complexity</b>: This function is linear to the contained elements.
    static node_ptr reverse(node_ptr p)
    {
- if(!p) return 0;
+ if(!p) return node_ptr(0);
       node_ptr i = NodeTraits::get_next(p);
       node_ptr first(p);
       while(i){
@@ -218,7 +219,7 @@
    //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
    static std::pair<node_ptr, node_ptr> move_first_n_backwards(node_ptr p, std::size_t n)
    {
- std::pair<node_ptr, node_ptr> ret(0, 0);
+ std::pair<node_ptr, node_ptr> ret(node_ptr(0), node_ptr(0));
       //Null shift, or count() == 0 or 1, nothing to do
       if(!n || !p || !NodeTraits::get_next(p)){
          return ret;
@@ -252,12 +253,12 @@
       //If the p has not been found in the previous loop, find it
       //starting in the new first node and unlink it
       if(!end_found){
- old_last = base_t::get_previous_node(first, 0);
+ old_last = base_t::get_previous_node(first, node_ptr(0));
       }
       
       //Now link p after the new last node
       NodeTraits::set_next(old_last, p);
- NodeTraits::set_next(new_last, 0);
+ NodeTraits::set_next(new_last, node_ptr(0));
       ret.first = first;
       ret.second = new_last;
       return ret;
@@ -273,7 +274,7 @@
    //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
    static std::pair<node_ptr, node_ptr> move_first_n_forward(node_ptr p, std::size_t n)
    {
- std::pair<node_ptr, node_ptr> ret(0, 0);
+ std::pair<node_ptr, node_ptr> ret(node_ptr(0), node_ptr(0));
       //Null shift, or count() == 0 or 1, nothing to do
       if(!n || !p || !NodeTraits::get_next(p))
          return ret;
@@ -311,7 +312,7 @@
       node_ptr new_first(node_traits::get_next(new_last));
       //Now put the old beginning after the old end
       NodeTraits::set_next(old_last, p);
- NodeTraits::set_next(new_last, 0);
+ NodeTraits::set_next(new_last, node_ptr(0));
       ret.first = new_first;
       ret.second = new_last;
       return ret;

Modified: branches/release/boost/intrusive/list.hpp
==============================================================================
--- branches/release/boost/intrusive/list.hpp (original)
+++ branches/release/boost/intrusive/list.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -24,7 +24,7 @@
 #include <boost/intrusive/link_mode.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/intrusive/options.hpp>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
+#include <boost/intrusive/detail/utilities.hpp>
 #include <iterator>
 #include <algorithm>
 #include <functional>
@@ -586,7 +586,7 @@
    iterator erase(iterator i)
    { return this->erase_and_dispose(i, detail::null_disposer()); }
 
- //! <b>Requires</b>: first and last must be valid iterator to elements in *this.
+ //! <b>Requires</b>: b and e must be valid iterators to elements in *this.
    //!
    //! <b>Effects</b>: Erases the element range pointed by b and e
    //! No destructors are called.
@@ -596,8 +596,8 @@
    //!
    //! <b>Throws</b>: Nothing.
    //!
- //! <b>Complexity</b>: Linear to the number of elements erased if it's a safe-mode
- //! or auto-unlink value. Constant time otherwise.
+ //! <b>Complexity</b>: Linear to the number of erased elements if it's a safe-mode
+ //! or auto-unlink value, or constant-time size is enabled. Constant-time otherwise.
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //! erased elements.
@@ -612,6 +612,37 @@
       }
    }
 
+ //! <b>Requires</b>: b and e must be valid iterators to elements in *this.
+ //! n must be std::distance(b, e).
+ //!
+ //! <b>Effects</b>: Erases the element range pointed by b and e
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of erased elements if it's a safe-mode
+ //! or auto-unlink value is enabled. Constant-time otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased elements.
+ iterator erase(iterator b, iterator e, difference_type n)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(b, e) == difference_type(n));
+ if(safemode_or_autounlink || constant_time_size){
+ return this->erase_and_dispose(b, e, detail::null_disposer());
+ }
+ else{
+ if(constant_time_size){
+ this->priv_size_traits().set_size(this->priv_size_traits().get_size() - n);
+ }
+ node_algorithms::unlink(b.pointed_node(), e.pointed_node());
+ return e;
+ }
+ }
+
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
    //!
    //! <b>Effects</b>: Erases the element pointed by i of the list.
@@ -732,17 +763,13 @@
    void clone_from(const list_impl &src, Cloner cloner, Disposer disposer)
    {
       this->clear_and_dispose(disposer);
- BOOST_INTRUSIVE_TRY{
- const_iterator b(src.begin()), e(src.end());
- for(; b != e; ++b){
- this->push_back(*cloner(*b));
- }
- }
- BOOST_INTRUSIVE_CATCH(...){
- this->clear_and_dispose(disposer);
- BOOST_INTRUSIVE_RETHROW;
+ detail::exception_disposer<list_impl, Disposer>
+ rollback(*this, disposer);
+ const_iterator b(src.begin()), e(src.end());
+ for(; b != e; ++b){
+ this->push_back(*cloner(*b));
       }
- BOOST_INTRUSIVE_CATCH_END
+ rollback.release();
    }
 
    //! <b>Requires</b>: value must be an lvalue and p must be a valid iterator of *this.

Modified: branches/release/boost/intrusive/options.hpp
==============================================================================
--- branches/release/boost/intrusive/options.hpp (original)
+++ branches/release/boost/intrusive/options.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -49,15 +49,56 @@
    typedef typename BucketTraits::bucket_traits type;
 };
 
-template<class T, class BaseHook>
-struct get_base_value_traits
+template <class T, class BaseHook>
+struct concrete_hook_base_value_traits
+{
+ typedef typename BaseHook::boost_intrusive_tags tags;
+ typedef detail::base_hook_traits
+ < T
+ , typename tags::node_traits
+ , tags::link_mode
+ , typename tags::tag
+ , tags::hook_type> type;
+};
+
+template <class BaseHook>
+struct concrete_hook_base_node_traits
+{ typedef typename BaseHook::boost_intrusive_tags::node_traits type; };
+
+template <class T, class BaseHook>
+struct any_hook_base_value_traits
 {
+ typedef typename BaseHook::boost_intrusive_tags tags;
    typedef detail::base_hook_traits
       < T
- , typename BaseHook::boost_intrusive_tags::node_traits
- , BaseHook::boost_intrusive_tags::link_mode
- , typename BaseHook::boost_intrusive_tags::tag
- , BaseHook::boost_intrusive_tags::hook_type> type;
+ , typename BaseHook::node_traits
+ , tags::link_mode
+ , typename tags::tag
+ , tags::hook_type> type;
+};
+
+template <class BaseHook>
+struct any_hook_base_node_traits
+{ typedef typename BaseHook::node_traits type; };
+
+template<class T, class BaseHook>
+struct get_base_value_traits
+{
+ typedef typename detail::eval_if_c
+ < internal_any_hook_bool_is_true<BaseHook>::value
+ , any_hook_base_value_traits<T, BaseHook>
+ , concrete_hook_base_value_traits<T, BaseHook>
+ >::type type;
+};
+
+template<class BaseHook>
+struct get_base_node_traits
+{
+ typedef typename detail::eval_if_c
+ < internal_any_hook_bool_is_true<BaseHook>::value
+ , any_hook_base_node_traits<BaseHook>
+ , concrete_hook_base_node_traits<BaseHook>
+ >::type type;
 };
 
 template<class T, class MemberHook>
@@ -66,6 +107,12 @@
    typedef typename MemberHook::member_value_traits type;
 };
 
+template<class MemberHook>
+struct get_member_node_traits
+{
+ typedef typename MemberHook::member_value_traits::node_traits type;
+};
+
 template<class T, class SupposedValueTraits>
 struct get_value_traits
 {
@@ -86,25 +133,12 @@
>::type type;
 };
 
-template<class BaseHook>
-struct get_base_node_traits
-{
- typedef typename BaseHook::boost_intrusive_tags::node_traits type;
-};
-
-template<class MemberHook>
-struct get_member_node_traits
-{
- typedef typename MemberHook::member_value_traits::node_traits type;
-};
-
 template<class ValueTraits>
 struct get_explicit_node_traits
 {
    typedef typename ValueTraits::node_traits type;
 };
 
-
 template<class SupposedValueTraits>
 struct get_node_traits
 {
@@ -125,7 +159,6 @@
>::type type;
 };
 
-
 } //namespace detail{
 
 
@@ -258,7 +291,6 @@
 struct member_hook
 {
 /// @cond
- typedef char Parent::* GenericPtrToMember;
    typedef detail::member_hook_traits
       < Parent
       , MemberHook
@@ -272,6 +304,7 @@
 /// @endcond
 };
 
+
 //!This option setter specifies that the container
 //!must use the specified base hook
 template<typename BaseHook>
@@ -406,6 +439,24 @@
 /// @endcond
 };
 
+//!This option setter specifies if the unordered hook
+//!should offer room to store another link to another node
+//!with the same key.
+//!Storing this link will speed up lookups and insertions on
+//!unordered_multiset containers with a great number of elements
+//!with the same key.
+template<bool Enabled>
+struct optimize_multikey
+{
+/// @cond
+ template<class Base>
+ struct pack : Base
+ {
+ static const bool optimize_multikey = Enabled;
+ };
+/// @endcond
+};
+
 //!This option setter specifies if the bucket array will be always power of two.
 //!This allows using masks instead of the default modulo operation to determine
 //!the bucket number from the hash value, leading to better performance.
@@ -423,6 +474,41 @@
 /// @endcond
 };
 
+//!This option setter specifies if the container will cache a pointer to the first
+//!non-empty bucket so that begin() is always constant-time.
+//!This is specially helpful when we can have containers with a few elements
+//!but with big bucket arrays (that is, hashtables with low load factors).
+template<bool Enabled>
+struct cache_begin
+{
+/// @cond
+ template<class Base>
+ struct pack : Base
+ {
+ static const bool cache_begin = Enabled;
+ };
+/// @endcond
+};
+
+
+//!This option setter specifies if the container will compare the hash value
+//!before comparing objects. This option can't be specified if store_hash<>
+//!is not true.
+//!This is specially helpful when we have containers with a high load factor.
+//!and the comparison function is much more expensive that comparing already
+//!stored hash values.
+template<bool Enabled>
+struct compare_hash
+{
+/// @cond
+ template<class Base>
+ struct pack : Base
+ {
+ static const bool compare_hash = Enabled;
+ };
+/// @endcond
+};
+
 /// @cond
 
 template<class Prev, class Next>
@@ -500,6 +586,7 @@
       , optimize_size<false>
       , store_hash<false>
       , linear<false>
+ , optimize_multikey<false>
>::type
 {};
 

Deleted: branches/release/boost/intrusive/pointer_plus_2_bits.hpp
==============================================================================
--- branches/release/boost/intrusive/pointer_plus_2_bits.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
+++ (empty file)
@@ -1,82 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007
-//
-// 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/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_POINTER_PLUS_2_BIT_HPP
-#define BOOST_INTRUSIVE_POINTER_PLUS_2_BIT_HPP
-
-namespace boost {
-namespace intrusive {
-
-//!This trait class is used to know if a pointer
-//!can embed 2 extra bits of information if
-//!it's going to be used to point to objects
-//!with an alignment of "Alignment" bytes.
-template<class VoidPointer, std::size_t Alignment>
-struct has_pointer_plus_2_bits
-{
- static const bool value = false;
-};
-
-//!This is an specialization for raw pointers.
-//!Raw pointers can embed two extra bits in the lower bits
-//!if the alignment is multiple of 4.
-template<std::size_t N>
-struct has_pointer_plus_2_bits<void*, N>
-{
- static const bool value = (N % 4u == 0);
-};
-
-//!This is class that is supposed to have static methods
-//!to embed 2 extra bits of information in a pointer.
-//!
-//!This is a declaration and there is no default implementation,
-//!because operations to embed bits change with every pointer type.
-//!
-//!An implementation that detects that a pointer type whose
-//!has_pointer_plus_2_bits<>::value is non-zero can make use of these
-//!operations to embed bits in the pointer.
-template<class Pointer>
-struct pointer_plus_2_bits
-{
- static const bool value = false;
-};
-
-//!This is the specialization to embed 2 extra bits of information
-//!in a raw pointer. Extra bits are stored in the lower bits of the pointer.
-template<class T>
-struct pointer_plus_2_bits<T*>
-{
- typedef T* pointer;
-
- static pointer get_pointer(pointer n)
- { return pointer(std::size_t(n) & ~std::size_t(3u)); }
-
- static void set_pointer(pointer &n, pointer p)
- {
- assert(0 == (std::size_t(p) & std::size_t(3u)));
- n = pointer(std::size_t(p) | (std::size_t(n) & std::size_t(3u)));
- }
-
- static std::size_t get_bits(pointer n)
- { return (std::size_t(n) & std::size_t(3u)); }
-
- static void set_bits(pointer &n, std::size_t c)
- {
- assert(c < 4);
- n = pointer(std::size_t(get_pointer(n)) | c);
- }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_POINTER_PLUS_2_BIT_HPP

Deleted: branches/release/boost/intrusive/pointer_plus_bit.hpp
==============================================================================
--- branches/release/boost/intrusive/pointer_plus_bit.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
+++ (empty file)
@@ -1,78 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007
-//
-// 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/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_POINTER_PLUS_BIT_HPP
-#define BOOST_INTRUSIVE_POINTER_PLUS_BIT_HPP
-
-namespace boost {
-namespace intrusive {
-
-//!This trait class is used to know if a pointer
-//!can embed an extra bit of information if
-//!it's going to be used to point to objects
-//!with an alignment of "Alignment" bytes.
-template<class VoidPointer, std::size_t Alignment>
-struct has_pointer_plus_bit
-{
- static const bool value = false;
-};
-
-//!This is an specialization for raw pointers.
-//!Raw pointers can embed an extra bit in the lower bit
-//!if the alignment is multiple of 2.
-template<std::size_t N>
-struct has_pointer_plus_bit<void*, N>
-{
- static const bool value = (N % 2u == 0);
-};
-
-//!This is class that is supposed to have static methods
-//!to embed an extra bit of information in a pointer.
-//!This is a declaration and there is no default implementation,
-//!because operations to embed the bit change with every pointer type.
-//!
-//!An implementation that detects that a pointer type whose
-//!has_pointer_plus_bit<>::value is non-zero can make use of these
-//!operations to embed the bit in the pointer.
-template<class Pointer>
-struct pointer_plus_bit
-{
- static const bool value = false;
-};
-
-//!This is the specialization to embed an extra bit of information
-//!in a raw pointer. The extra bit is stored in the lower bit of the pointer.
-template<class T>
-struct pointer_plus_bit<T*>
-{
- typedef T* pointer;
-
- static pointer get_pointer(pointer n)
- { return pointer(std::size_t(n) & ~std::size_t(1u)); }
-
- static void set_pointer(pointer &n, pointer p)
- {
- assert(0 == (std::size_t(p) & std::size_t(1u)));
- n = pointer(std::size_t(p) | (std::size_t(n) & std::size_t(1u)));
- }
-
- static bool get_bit(pointer n)
- { return (std::size_t(n) & std::size_t(1u)) != 0; }
-
- static void set_bit(pointer &n, bool c)
- { n = pointer(std::size_t(get_pointer(n)) | std::size_t(c)); }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_POINTER_PLUS_BIT_HPP

Modified: branches/release/boost/intrusive/rbtree.hpp
==============================================================================
--- branches/release/boost/intrusive/rbtree.hpp (original)
+++ branches/release/boost/intrusive/rbtree.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -379,7 +379,7 @@
    //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
    //! of rbtree.
    //!
- //! <b>Effects</b>: Returns a const reference to the rbtree associated to the end iterator
+ //! <b>Effects</b>: Returns a const reference to the rbtree associated to the iterator
    //!
    //! <b>Throws</b>: Nothing.
    //!
@@ -387,6 +387,28 @@
    static const rbtree_impl &container_from_end_iterator(const_iterator end_iterator)
    { return priv_container_from_end_iterator(end_iterator); }
 
+ //! <b>Precondition</b>: it must be a valid iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static rbtree_impl &container_from_iterator(iterator it)
+ { return priv_container_from_iterator(it); }
+
+ //! <b>Precondition</b>: it must be a valid end const_iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const rbtree_impl &container_from_iterator(const_iterator it)
+ { return priv_container_from_iterator(it); }
+
    //! <b>Effects</b>: Returns the value_compare object used by the tree.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1176,33 +1198,26 @@
    static void init_node(reference value)
    { node_algorithms::init(value_traits::to_node_ptr(value)); }
 
-/*
- //! <b>Effects</b>: removes x from a tree of the appropriate type. It has no effect,
- //! if x is not in such a tree.
+ //! <b>Effects</b>: removes "value" from the container.
    //!
    //! <b>Throws</b>: Nothing.
    //!
- //! <b>Complexity</b>: Constant time.
+ //! <b>Complexity</b>: Logarithmic time.
    //!
- //! <b>Note</b>: This static function is only usable with the "safe mode"
- //! hook and non-constant time size lists. Otherwise, the user must use
- //! the non-static "erase(reference )" member. If the user calls
- //! this function with a non "safe mode" or constant time size list
- //! a compilation error will be issued.
- template<class T>
- static void remove_node(T& value)
- {
- //This function is only usable for safe mode hooks and non-constant
- //time lists.
- //BOOST_STATIC_ASSERT((!(safemode_or_autounlink && constant_time_size)));
+ //! <b>Note</b>: This static function is only usable with non-constant
+ //! time size containers that have stateless comparison functors.
+ //!
+ //! If the user calls
+ //! this function with a constant time size container or stateful comparison
+ //! functor a compilation error will be issued.
+ static void remove_node(reference value)
+ {
       BOOST_STATIC_ASSERT((!constant_time_size));
- BOOST_STATIC_ASSERT((boost::is_convertible<T, value_type>::value));
       node_ptr to_remove(value_traits::to_node_ptr(value));
- node_algorithms::unlink_and_rebalance(to_remove);
+ node_algorithms::unlink(to_remove);
       if(safemode_or_autounlink)
          node_algorithms::init(to_remove);
    }
-*/
 
    /// @cond
    private:
@@ -1233,6 +1248,9 @@
       rbtree_impl *rb = detail::parent_from_member<rbtree_impl, data_t>(d, &rbtree_impl::data_);
       return *rb;
    }
+
+ static rbtree_impl &priv_container_from_iterator(const const_iterator &it)
+ { return priv_container_from_end_iterator(it.end_iterator_from_it()); }
 };
 
 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
@@ -1426,6 +1444,12 @@
 
    static const rbtree &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const rbtree &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static rbtree &container_from_it(iterator it)
+ { return static_cast<rbtree &>(Base::container_from_iterator(it)); }
+
+ static const rbtree &container_from_it(const_iterator it)
+ { return static_cast<const rbtree &>(Base::container_from_iterator(it)); }
 };
 
 #endif

Modified: branches/release/boost/intrusive/rbtree_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/rbtree_algorithms.hpp (original)
+++ branches/release/boost/intrusive/rbtree_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -54,7 +54,6 @@
 #include <boost/intrusive/intrusive_fwd.hpp>
 
 #include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
 #include <boost/intrusive/detail/tree_algorithms.hpp>
 
@@ -117,6 +116,7 @@
 {
    public:
    typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node node;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
    typedef typename NodeTraits::color color;
@@ -124,7 +124,6 @@
    /// @cond
    private:
 
- typedef typename NodeTraits::node node;
    typedef detail::tree_algorithms<NodeTraits> tree_algorithms;
 
    template<class F>
@@ -695,6 +694,16 @@
       rebalance_after_insertion(header, new_value);
    }
 
+ //! <b>Requires</b>: "n" must be a node inserted in a tree.
+ //!
+ //! <b>Effects</b>: Returns a pointer to the header node of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_header(node_ptr n)
+ { return tree_algorithms::get_header(n); }
+
    /// @cond
    private:
 

Modified: branches/release/boost/intrusive/set.hpp
==============================================================================
--- branches/release/boost/intrusive/set.hpp (original)
+++ branches/release/boost/intrusive/set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -226,7 +226,7 @@
    //! <b>Precondition</b>: end_iterator must be a valid end iterator
    //! of set.
    //!
- //! <b>Effects</b>: Returns a const reference to the set associated to the end iterator
+ //! <b>Effects</b>: Returns a reference to the set associated to the end iterator
    //!
    //! <b>Throws</b>: Nothing.
    //!
@@ -253,6 +253,34 @@
          , &set_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static set_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &set_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const set_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &set_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the set.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1086,6 +1114,12 @@
 
    static const set &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static set &container_from_iterator(iterator it)
+ { return static_cast<set &>(Base::container_from_iterator(it)); }
+
+ static const set &container_from_iterator(const_iterator it)
+ { return static_cast<const set &>(Base::container_from_iterator(it)); }
 };
 
 #endif
@@ -1318,6 +1352,34 @@
          , &multiset_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static multiset_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &multiset_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static const multiset_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &multiset_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the multiset.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1932,6 +1994,21 @@
    void replace_node(iterator replace_this, reference with_this)
    { tree_.replace_node(replace_this, with_this); }
 
+ //! <b>Effects</b>: removes "value" from the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic time.
+ //!
+ //! <b>Note</b>: This static function is only usable with non-constant
+ //! time size containers that have stateless comparison functors.
+ //!
+ //! If the user calls
+ //! this function with a constant time size container or stateful comparison
+ //! functor a compilation error will be issued.
+ static void remove_node(reference value)
+ { tree_type::remove_node(value); }
+
    /// @cond
    friend bool operator==(const multiset_impl &x, const multiset_impl &y)
    { return x.tree_ == y.tree_; }
@@ -2058,6 +2135,12 @@
 
    static const multiset &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static multiset &container_from_iterator(iterator it)
+ { return static_cast<multiset &>(Base::container_from_iterator(it)); }
+
+ static const multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const multiset &>(Base::container_from_iterator(it)); }
 };
 
 #endif

Modified: branches/release/boost/intrusive/sg_set.hpp
==============================================================================
--- branches/release/boost/intrusive/sg_set.hpp (original)
+++ branches/release/boost/intrusive/sg_set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -252,6 +252,34 @@
          , &sg_set_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static sg_set_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<sg_set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &sg_set_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const sg_set_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<sg_set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &sg_set_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the sg_set.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1124,6 +1152,12 @@
 
    static const sg_set &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const sg_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static sg_set &container_from_iterator(iterator it)
+ { return static_cast<sg_set &>(Base::container_from_iterator(it)); }
+
+ static const sg_set &container_from_iterator(const_iterator it)
+ { return static_cast<const sg_set &>(Base::container_from_iterator(it)); }
 };
 
 #endif
@@ -1356,6 +1390,34 @@
          , &sg_multiset_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static sg_multiset_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<sg_multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &sg_multiset_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static const sg_multiset_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<sg_multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &sg_multiset_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the sg_multiset.
    //!
    //! <b>Complexity</b>: Constant.
@@ -2135,6 +2197,12 @@
 
    static const sg_multiset &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static sg_multiset &container_from_iterator(iterator it)
+ { return static_cast<sg_multiset &>(Base::container_from_iterator(it)); }
+
+ static const sg_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const sg_multiset &>(Base::container_from_iterator(it)); }
 };
 
 #endif

Modified: branches/release/boost/intrusive/sgtree.hpp
==============================================================================
--- branches/release/boost/intrusive/sgtree.hpp (original)
+++ branches/release/boost/intrusive/sgtree.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -527,6 +527,28 @@
    static const sgtree_impl &container_from_end_iterator(const_iterator end_iterator)
    { return priv_container_from_end_iterator(end_iterator); }
 
+ //! <b>Precondition</b>: it must be a valid iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static sgtree_impl &container_from_iterator(iterator it)
+ { return priv_container_from_iterator(it); }
+
+ //! <b>Precondition</b>: it must be a valid end const_iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const sgtree_impl &container_from_iterator(const_iterator it)
+ { return priv_container_from_iterator(it); }
+
    //! <b>Effects</b>: Returns the value_compare object used by the tree.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1442,6 +1464,9 @@
       sgtree_impl *scapegoat = detail::parent_from_member<sgtree_impl, data_t>(d, &sgtree_impl::data_);
       return *scapegoat;
    }
+
+ static sgtree_impl &priv_container_from_iterator(const const_iterator &it)
+ { return priv_container_from_end_iterator(it.end_iterator_from_it()); }
 };
 
 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED

Modified: branches/release/boost/intrusive/sgtree_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/sgtree_algorithms.hpp (original)
+++ branches/release/boost/intrusive/sgtree_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -22,7 +22,6 @@
 #include <cstddef>
 #include <boost/intrusive/intrusive_fwd.hpp>
 #include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
 #include <boost/intrusive/detail/tree_algorithms.hpp>
 
@@ -59,6 +58,7 @@
 class sgtree_algorithms
 {
    public:
+ typedef typename NodeTraits::node node;
    typedef NodeTraits node_traits;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
@@ -66,7 +66,6 @@
    /// @cond
    private:
 
- typedef typename NodeTraits::node node;
    typedef detail::tree_algorithms<NodeTraits> tree_algorithms;
 
    static node_ptr uncast(const_node_ptr ptr)
@@ -640,6 +639,16 @@
    static node_ptr rebalance_subtree(node_ptr old_root)
    { return tree_algorithms::rebalance_subtree(old_root); }
 
+ //! <b>Requires</b>: "n" must be a node inserted in a tree.
+ //!
+ //! <b>Effects</b>: Returns a pointer to the header node of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_header(node_ptr n)
+ { return tree_algorithms::get_header(n); }
+
    /// @cond
    private:
 

Modified: branches/release/boost/intrusive/slist.hpp
==============================================================================
--- branches/release/boost/intrusive/slist.hpp (original)
+++ branches/release/boost/intrusive/slist.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -16,7 +16,6 @@
 
 #include <boost/intrusive/detail/config_begin.hpp>
 #include <boost/static_assert.hpp>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 #include <boost/intrusive/detail/assert.hpp>
 #include <boost/intrusive/intrusive_fwd.hpp>
 #include <boost/intrusive/slist_hook.hpp>
@@ -25,6 +24,7 @@
 #include <boost/intrusive/detail/pointer_to_other.hpp>
 #include <boost/intrusive/link_mode.hpp>
 #include <boost/intrusive/options.hpp>
+#include <boost/intrusive/detail/utilities.hpp>
 #include <iterator>
 #include <functional>
 #include <algorithm>
@@ -183,10 +183,12 @@
    BOOST_STATIC_ASSERT(!(cache_last && ((int)real_value_traits::link_mode == (int)auto_unlink)));
 
    node_ptr get_end_node()
- { return node_ptr(linear ? 0 : this->get_root_node()); }
+ { return node_ptr(linear ? node_ptr(0) : this->get_root_node()); }
 
    const_node_ptr get_end_node() const
- { return const_node_ptr(linear ? 0 : this->get_root_node()); }
+ {
+ return const_node_ptr
+ (linear ? const_node_ptr(0) : this->get_root_node()); }
 
    node_ptr get_root_node()
    { return node_ptr(&data_.root_plus_size_.root_); }
@@ -203,13 +205,10 @@
    void set_last_node(node_ptr n)
    { return this->set_last_node(n, detail::bool_<cache_last>()); }
 
- node_ptr get_last_node(detail::bool_<false>)
+ static node_ptr get_last_node(detail::bool_<false>)
    { return node_ptr(0); }
 
- const_node_ptr get_last_node(detail::bool_<false>) const
- { return const_node_ptr(0); }
-
- void set_last_node(node_ptr, detail::bool_<false>)
+ static void set_last_node(node_ptr, detail::bool_<false>)
    {}
 
    node_ptr get_last_node(detail::bool_<true>)
@@ -667,18 +666,14 @@
    void clone_from(const slist_impl &src, Cloner cloner, Disposer disposer)
    {
       this->clear_and_dispose(disposer);
- BOOST_INTRUSIVE_TRY{
- iterator prev(this->before_begin());
- const_iterator b(src.begin()), e(src.end());
- for(; b != e; ++b){
- prev = this->insert_after(prev, *cloner(*b));
- }
+ detail::exception_disposer<slist_impl, Disposer>
+ rollback(*this, disposer);
+ iterator prev(this->before_begin());
+ const_iterator b(src.begin()), e(src.end());
+ for(; b != e; ++b){
+ prev = this->insert_after(prev, *cloner(*b));
       }
- BOOST_INTRUSIVE_CATCH(...){
- this->clear_and_dispose(disposer);
- BOOST_INTRUSIVE_RETHROW;
- }
- BOOST_INTRUSIVE_CATCH_END
+ rollback.release();
    }
 
    //! <b>Requires</b>: value must be an lvalue and prev_p must point to an element
@@ -783,12 +778,64 @@
    //!
    //! <b>Throws</b>: Nothing.
    //!
- //! <b>Complexity</b>: Lineal to the elements (last - before_first + 1).
+ //! <b>Complexity</b>: Linear to the number of erased elements if it's a safe-mode
+ //! , auto-unlink value or constant-time size is activated. Constant time otherwise.
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //! erased element.
    iterator erase_after(iterator before_first, iterator last)
- { return this->erase_after_and_dispose(before_first, last, detail::null_disposer()); }
+ {
+ if(safemode_or_autounlink || constant_time_size){
+ return this->erase_after_and_dispose(before_first, last, detail::null_disposer());
+ }
+ else{
+ node_ptr bfp = before_first.pointed_node();
+ node_ptr lp = last.pointed_node();
+ if(cache_last){
+ if((lp == this->get_end_node())){
+ this->set_last_node(bfp);
+ }
+ }
+ node_algorithms::unlink_after(bfp, lp);
+ return last;
+ }
+ }
+
+ //! <b>Effects</b>: Erases the range (before_first, last) from
+ //! the list. n must be std::distance(before_first, last) - 1.
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: constant-time if link_mode is normal_link.
+ //! Linear to the elements (last - before_first) otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase_after(iterator before_first, iterator last, difference_type n)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(++iterator(before_first), last) == difference_type(n));
+ if(safemode_or_autounlink){
+ return this->erase_after(before_first, last);
+ }
+ else{
+ node_ptr bfp = before_first.pointed_node();
+ node_ptr lp = last.pointed_node();
+ if(cache_last){
+ if((lp == this->get_end_node())){
+ this->set_last_node(bfp);
+ }
+ }
+ node_algorithms::unlink_after(bfp, lp);
+ if(constant_time_size){
+ this->priv_size_traits().set_size(this->priv_size_traits().get_size() - n);
+ }
+ return last;
+ }
+ }
 
    //! <b>Effects</b>: Erases the element pointed by i of the list.
    //! No destructors are called.
@@ -815,14 +862,30 @@
    //!
    //! <b>Throws</b>: Nothing.
    //!
- //! <b>Complexity</b>: Linear to the number of elements erased plus linear
- //! to the elements before first.
+ //! <b>Complexity</b>: Linear to the elements before last.
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
    //! erased elements.
    iterator erase(iterator first, iterator last)
    { return this->erase_after(this->previous(first), last); }
 
+ //! <b>Effects</b>: Erases the range [first, last) from
+ //! the list. n must be std::distance(first, last).
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: linear to the elements before first if link_mode is normal_link
+ //! and constant_time_size is activated. Linear to the elements before last otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase(iterator first, iterator last, difference_type n)
+ { return this->erase_after(this->previous(first), last, n); }
+
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
    //!
    //! <b>Effects</b>: Erases the element after the element pointed by prev of
@@ -849,13 +912,36 @@
       if(cache_last && (to_erase == this->get_last_node())){
          this->set_last_node(prev_n);
       }
- this->priv_size_traits().decrement();
       if(safemode_or_autounlink)
          node_algorithms::init(to_erase);
       disposer(get_real_value_traits().to_value_ptr(to_erase));
+ this->priv_size_traits().decrement();
+ return it;
+ }
+
+ /// @cond
+
+ template<class Disposer>
+ static iterator s_erase_after_and_dispose(iterator prev, Disposer disposer)
+ {
+ BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
+ iterator it(prev);
+ ++it;
+ node_ptr to_erase(it.pointed_node());
+ ++it;
+ node_ptr prev_n(prev.pointed_node());
+ node_algorithms::unlink_after(prev_n);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(real_value_traits::to_value_ptr(to_erase));
       return it;
    }
 
+ static iterator s_erase_after(iterator prev)
+ { return s_erase_after_and_dispose(prev, detail::null_disposer()); }
+
+ /// @endcond
+
    //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
    //!
    //! <b>Effects</b>: Erases the range (before_first, last) from
@@ -867,7 +953,7 @@
    //!
    //! <b>Throws</b>: Nothing.
    //!
- //! <b>Complexity</b>: Lineal to the elements (last - before_first).
+ //! <b>Complexity</b>: Lineal to the elements (last - before_first + 1).
    //!
    //! <b>Note</b>: Invalidates the iterators to the erased element.
    template<class Disposer>
@@ -921,7 +1007,7 @@
    //!
    //! <b>Throws</b>: Nothing.
    //!
- //! <b>Complexity</b>: Linear to the number of elements erased plus linear
+ //! <b>Complexity</b>: Linear to the number of erased elements plus linear
    //! to the elements before first.
    //!
    //! <b>Note</b>: Invalidates the iterators (but not the references) to the
@@ -997,8 +1083,11 @@
          iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active
          node_ptr prev_n(prev.pointed_node());
          node_ptr last_x_n(last_x.pointed_node());
- if(cache_last && node_traits::get_next(prev_n) == this->get_end_node()){
- this->set_last_node(last_x_n);
+ if(cache_last){
+ x.set_last_node(x.get_root_node());
+ if(node_traits::get_next(prev_n) == this->get_end_node()){
+ this->set_last_node(last_x_n);
+ }
          }
          node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
          this->priv_size_traits().set_size(this->priv_size_traits().get_size() + x.priv_size_traits().get_size());
@@ -1026,10 +1115,7 @@
    void splice_after(iterator prev_pos, slist_impl &x, iterator prev_ele)
    {
       iterator elem = prev_ele;
- ++elem;
- if (elem != prev_pos && prev_ele != prev_pos){
- this->splice_after(prev_pos, x, prev_ele, elem, 1);
- }
+ this->splice_after(prev_pos, x, prev_ele, ++elem, 1);
    }
 
    //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
@@ -1567,15 +1653,18 @@
    private:
    void priv_splice_after(node_ptr prev_pos_n, slist_impl &x, node_ptr before_first_n, node_ptr before_last_n)
    {
- if(cache_last){
- if(node_traits::get_next(prev_pos_n) == this->get_end_node()){
- this->set_last_node(before_last_n);
- }
- if(node_traits::get_next(before_last_n) == x.get_end_node()){
- x.set_last_node(before_first_n);
+ if (before_first_n != before_last_n && prev_pos_n != before_first_n && prev_pos_n != before_last_n)
+ {
+ if(cache_last){
+ if(node_traits::get_next(prev_pos_n) == this->get_end_node()){
+ this->set_last_node(before_last_n);
+ }
+ if(node_traits::get_next(before_last_n) == x.get_end_node()){
+ x.set_last_node(before_first_n);
+ }
          }
+ node_algorithms::transfer_after(prev_pos_n, before_first_n, before_last_n);
       }
- node_algorithms::transfer_after(prev_pos_n, before_first_n, before_last_n);
    }
 
    void priv_reverse(detail::bool_<false>)

Modified: branches/release/boost/intrusive/splay_set.hpp
==============================================================================
--- branches/release/boost/intrusive/splay_set.hpp (original)
+++ branches/release/boost/intrusive/splay_set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -252,6 +252,34 @@
          , &splay_set_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static splay_set_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<splay_set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &splay_set_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of set.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the set associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const splay_set_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<splay_set_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &splay_set_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the splay_set.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1161,6 +1189,12 @@
 
    static const splay_set &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const splay_set &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static splay_set &container_from_iterator(iterator it)
+ { return static_cast<splay_set &>(Base::container_from_iterator(it)); }
+
+ static const splay_set &container_from_iterator(const_iterator it)
+ { return static_cast<const splay_set &>(Base::container_from_iterator(it)); }
 };
 
 #endif
@@ -1393,6 +1427,34 @@
          , &splay_multiset_impl::tree_);
    }
 
+ //! <b>Precondition</b>: it must be a valid iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static splay_multiset_impl &container_from_iterator(iterator it)
+ {
+ return *detail::parent_from_member<splay_multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &splay_multiset_impl::tree_);
+ }
+
+ //! <b>Precondition</b>: it must be a valid const_iterator of multiset.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the multiset associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static const splay_multiset_impl &container_from_iterator(const_iterator it)
+ {
+ return *detail::parent_from_member<splay_multiset_impl, tree_type>
+ ( &tree_type::container_from_iterator(it)
+ , &splay_multiset_impl::tree_);
+ }
+
    //! <b>Effects</b>: Returns the key_compare object used by the splay_multiset.
    //!
    //! <b>Complexity</b>: Constant.
@@ -2209,6 +2271,12 @@
 
    static const splay_multiset &container_from_end_iterator(const_iterator end_iterator)
    { return static_cast<const splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static splay_multiset &container_from_iterator(iterator it)
+ { return static_cast<splay_multiset &>(Base::container_from_iterator(it)); }
+
+ static const splay_multiset &container_from_iterator(const_iterator it)
+ { return static_cast<const splay_multiset &>(Base::container_from_iterator(it)); }
 };
 
 #endif

Modified: branches/release/boost/intrusive/splaytree.hpp
==============================================================================
--- branches/release/boost/intrusive/splaytree.hpp (original)
+++ branches/release/boost/intrusive/splaytree.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -387,6 +387,28 @@
    static const splaytree_impl &container_from_end_iterator(const_iterator end_iterator)
    { return priv_container_from_end_iterator(end_iterator); }
 
+ //! <b>Precondition</b>: it must be a valid iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static splaytree_impl &container_from_iterator(iterator it)
+ { return priv_container_from_iterator(it); }
+
+ //! <b>Precondition</b>: it must be a valid end const_iterator
+ //! of rbtree.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the tree associated to the iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ static const splaytree_impl &container_from_iterator(const_iterator it)
+ { return priv_container_from_iterator(it); }
+
    //! <b>Effects</b>: Returns the value_compare object used by the tree.
    //!
    //! <b>Complexity</b>: Constant.
@@ -1312,6 +1334,9 @@
       splaytree_impl *rb = detail::parent_from_member<splaytree_impl, data_t>(d, &splaytree_impl::data_);
       return *rb;
    }
+
+ static splaytree_impl &priv_container_from_iterator(const const_iterator &it)
+ { return priv_container_from_end_iterator(it.end_iterator_from_it()); }
 };
 
 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED

Modified: branches/release/boost/intrusive/splaytree_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/splaytree_algorithms.hpp (original)
+++ branches/release/boost/intrusive/splaytree_algorithms.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -50,13 +50,48 @@
 #include <boost/intrusive/detail/assert.hpp>
 #include <boost/intrusive/intrusive_fwd.hpp>
 #include <cstddef>
-#include <boost/intrusive/detail/no_exceptions_support.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
 #include <boost/intrusive/detail/tree_algorithms.hpp>
 
 namespace boost {
 namespace intrusive {
 
+/// @cond
+namespace detail {
+
+template<class NodeTraits>
+struct splaydown_rollback
+{
+ typedef typename NodeTraits::node_ptr node_ptr;
+ splaydown_rollback( const node_ptr *pcur_subtree, node_ptr header
+ , node_ptr leftmost , node_ptr rightmost)
+ : pcur_subtree_(pcur_subtree) , header_(header)
+ , leftmost_(leftmost) , rightmost_(rightmost)
+ {}
+
+ void release()
+ { pcur_subtree_ = 0; }
+
+ ~splaydown_rollback()
+ {
+ if(pcur_subtree_){
+ //Exception can only be thrown by comp, but
+ //tree invariants still hold. *pcur_subtree is the current root
+ //so link it to the header.
+ NodeTraits::set_parent(*pcur_subtree_, header_);
+ NodeTraits::set_parent(header_, *pcur_subtree_);
+ //Recover leftmost/rightmost pointers
+ NodeTraits::set_left (header_, leftmost_);
+ NodeTraits::set_right(header_, rightmost_);
+ }
+ }
+ const node_ptr *pcur_subtree_;
+ node_ptr header_, leftmost_, rightmost_;
+};
+
+} //namespace detail {
+/// @endcond
+
 //! A splay tree is an implementation of a binary search tree. The tree is
 //! self balancing using the splay algorithm as described in
 //!
@@ -95,11 +130,11 @@
 {
    /// @cond
    private:
- typedef typename NodeTraits::node node;
    typedef detail::tree_algorithms<NodeTraits> tree_algorithms;
    /// @endcond
 
    public:
+ typedef typename NodeTraits::node node;
    typedef NodeTraits node_traits;
    typedef typename NodeTraits::node_ptr node_ptr;
    typedef typename NodeTraits::const_node_ptr const_node_ptr;
@@ -656,7 +691,8 @@
       node_ptr leftmost = NodeTraits::get_left(header);
       node_ptr rightmost = NodeTraits::get_right(header);
 
- try{
+ {
+ detail::splaydown_rollback<NodeTraits> rollback(&t, header, leftmost, rightmost);
          node_ptr null = header;
          node_ptr l = null;
          node_ptr r = null;
@@ -712,18 +748,9 @@
          }
 
          assemble(t, l, r, null);
+ rollback.release();
       }
- catch(...){
- //Exception can only be thrown by comp, but
- //tree invariants still hold. t is the current root
- //so link it to the header.
- NodeTraits::set_parent(t, header);
- NodeTraits::set_parent(header, t);
- //Recover leftmost/rightmost pointers
- NodeTraits::set_left (header, leftmost);
- NodeTraits::set_right(header, rightmost);
- throw;
- }
+
       //t is the current root
       NodeTraits::set_parent(header, t);
       NodeTraits::set_parent(t, header);
@@ -755,6 +782,17 @@
    static node_ptr rebalance_subtree(node_ptr old_root)
    { return tree_algorithms::rebalance_subtree(old_root); }
 
+
+ //! <b>Requires</b>: "n" must be a node inserted in a tree.
+ //!
+ //! <b>Effects</b>: Returns a pointer to the header node of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_header(node_ptr n)
+ { return tree_algorithms::get_header(n); }
+
    private:
 
    /// @cond

Modified: branches/release/boost/intrusive/unordered_set.hpp
==============================================================================
--- branches/release/boost/intrusive/unordered_set.hpp (original)
+++ branches/release/boost/intrusive/unordered_set.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -24,7 +24,7 @@
 //! The class template unordered_set is an intrusive container, that mimics most of
 //! the interface of std::tr1::unordered_set as described in the C++ TR1.
 //!
-//! unordered_set is a pseudo-intrusive container: each object to be stored in the
+//! unordered_set is a semi-intrusive container: each object to be stored in the
 //! container must contain a proper hook, but the container also needs
 //! additional auxiliary memory to work: unordered_set needs a pointer to an array
 //! of type `bucket_type` to be passed in the constructor. This bucket array must
@@ -38,7 +38,8 @@
 //!
 //! The container supports the following options:
 //! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<> .
+//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
+//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>.
 //!
 //! unordered_set only provides forward iterators but it provides 4 iterator types:
 //! iterator and const_iterator to navigate through the whole container and
@@ -167,8 +168,8 @@
 
    //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set.
    //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
+ //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
+ //! constant time with worst case (empty unordered_set) O(this->bucket_count())
    //!
    //! <b>Throws</b>: Nothing.
    iterator begin()
@@ -177,8 +178,8 @@
    //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
    //! of the unordered_set.
    //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
+ //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
+ //! constant time with worst case (empty unordered_set) O(this->bucket_count())
    //!
    //! <b>Throws</b>: Nothing.
    const_iterator begin() const
@@ -187,8 +188,8 @@
    //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
    //! of the unordered_set.
    //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
+ //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
+ //! constant time with worst case (empty unordered_set) O(this->bucket_count())
    //!
    //! <b>Throws</b>: Nothing.
    const_iterator cbegin() const
@@ -236,8 +237,8 @@
 
    //! <b>Effects</b>: Returns true is the container is empty.
    //!
- //! <b>Complexity</b>: if constant-time size option is disabled, average constant time
- //! (worst case, with empty() == true): O(this->bucket_count()).
+ //! <b>Complexity</b>: if constant-time size and cache_last options are disabled,
+ //! average constant time (worst case, with empty() == true: O(this->bucket_count()).
    //! Otherwise constant.
    //!
    //! <b>Throws</b>: Nothing.
@@ -959,7 +960,8 @@
 template<class T, class O1 = none, class O2 = none
                 , class O3 = none, class O4 = none
                 , class O5 = none, class O6 = none
- , class O7 = none
+ , class O7 = none, class O8 = none
+ , class O9 = none
>
 #endif
 struct make_unordered_set
@@ -967,19 +969,19 @@
    /// @cond
    typedef unordered_set_impl
       < typename make_hashtable_opt
- <T, O1, O2, O3, O4, O5, O6, O7>::type
+ <T, true, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type
> implementation_defined;
    /// @endcond
    typedef implementation_defined type;
 };
 
 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7>
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9>
 class unordered_set
- : public make_unordered_set<T, O1, O2, O3, O4, O5, O6, O7>::type
+ : public make_unordered_set<T, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type
 {
    typedef typename make_unordered_set
- <T, O1, O2, O3, O4, O5, O6, O7>::type Base;
+ <T, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type Base;
 
    //Assert if passed value traits are compatible with the type
    BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
@@ -1018,7 +1020,7 @@
 //! The class template unordered_multiset is an intrusive container, that mimics most of
 //! the interface of std::tr1::unordered_multiset as described in the C++ TR1.
 //!
-//! unordered_multiset is a pseudo-intrusive container: each object to be stored in the
+//! unordered_multiset is a semi-intrusive container: each object to be stored in the
 //! container must contain a proper hook, but the container also needs
 //! additional auxiliary memory to work: unordered_multiset needs a pointer to an array
 //! of type `bucket_type` to be passed in the constructor. This bucket array must
@@ -1032,7 +1034,8 @@
 //!
 //! The container supports the following options:
 //! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<> .
+//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
+//! \c bucket_traits<>, power_2_buckets<> and cache_begin<>.
 //!
 //! unordered_multiset only provides forward iterators but it provides 4 iterator types:
 //! iterator and const_iterator to navigate through the whole container and
@@ -1161,8 +1164,8 @@
 
    //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_multiset.
    //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_multiset): O(this->bucket_count())
+ //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
+ //! constant time with worst case (empty unordered_set) O(this->bucket_count())
    //!
    //! <b>Throws</b>: Nothing.
    iterator begin()
@@ -1171,8 +1174,8 @@
    //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
    //! of the unordered_multiset.
    //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_multiset): O(this->bucket_count())
+ //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
+ //! constant time with worst case (empty unordered_set) O(this->bucket_count())
    //!
    //! <b>Throws</b>: Nothing.
    const_iterator begin() const
@@ -1181,8 +1184,8 @@
    //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
    //! of the unordered_multiset.
    //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_multiset): O(this->bucket_count())
+ //! <b>Complexity</b>: Constant time if `cache_begin<>` is true. Amortized
+ //! constant time with worst case (empty unordered_set) O(this->bucket_count())
    //!
    //! <b>Throws</b>: Nothing.
    const_iterator cbegin() const
@@ -1230,8 +1233,8 @@
 
    //! <b>Effects</b>: Returns true is the container is empty.
    //!
- //! <b>Complexity</b>: if constant-time size option is disabled, average constant time
- //! (worst case, with empty() == true): O(this->bucket_count()).
+ //! <b>Complexity</b>: if constant-time size and cache_last options are disabled,
+ //! average constant time (worst case, with empty() == true: O(this->bucket_count()).
    //! Otherwise constant.
    //!
    //! <b>Throws</b>: Nothing.
@@ -1891,7 +1894,8 @@
 template<class T, class O1 = none, class O2 = none
                 , class O3 = none, class O4 = none
                 , class O5 = none, class O6 = none
- , class O7 = none
+ , class O7 = none, class O8 = none
+ , class O9 = none
>
 #endif
 struct make_unordered_multiset
@@ -1899,19 +1903,19 @@
    /// @cond
    typedef unordered_multiset_impl
       < typename make_hashtable_opt
- <T, O1, O2, O3, O4, O5, O6, O7>::type
+ <T, false, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type
> implementation_defined;
    /// @endcond
    typedef implementation_defined type;
 };
 
 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7>
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9>
 class unordered_multiset
- : public make_unordered_multiset<T, O1, O2, O3, O4, O5, O6, O7>::type
+ : public make_unordered_multiset<T, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type
 {
    typedef typename make_unordered_multiset
- <T, O1, O2, O3, O4, O5, O6, O7>::type Base;
+ <T, O1, O2, O3, O4, O5, O6, O7, O8, O9>::type Base;
    //Assert if passed value traits are compatible with the type
    BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
 

Modified: branches/release/boost/intrusive/unordered_set_hook.hpp
==============================================================================
--- branches/release/boost/intrusive/unordered_set_hook.hpp (original)
+++ branches/release/boost/intrusive/unordered_set_hook.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -17,6 +17,7 @@
 #include <boost/intrusive/detail/config_begin.hpp>
 #include <boost/intrusive/intrusive_fwd.hpp>
 #include <boost/intrusive/detail/utilities.hpp>
+#include <boost/intrusive/detail/pointer_to_other.hpp>
 #include <boost/intrusive/slist_hook.hpp>
 #include <boost/intrusive/options.hpp>
 #include <boost/intrusive/detail/generic_hook.hpp>
@@ -26,35 +27,66 @@
 
 /// @cond
 
-template<class VoidPointer>
-struct slist_node_plus_hash
+template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
+struct unordered_node
+ : public slist_node<VoidPointer>
 {
    typedef typename boost::pointer_to_other
- <VoidPointer, slist_node_plus_hash>::type node_ptr;
- node_ptr next_;
+ < VoidPointer
+ , unordered_node<VoidPointer, StoreHash, OptimizeMultiKey>
+ >::type node_ptr;
+ node_ptr prev_in_group_;
    std::size_t hash_;
 };
 
-// slist_node_traits can be used with circular_slist_algorithms and supplies
-// a slist_node holding the pointers needed for a singly-linked list
-// it is used by slist_base_hook and slist_member_hook
 template<class VoidPointer>
-struct slist_node_traits_plus_hash
+struct unordered_node<VoidPointer, false, true>
+ : public slist_node<VoidPointer>
 {
- typedef slist_node_plus_hash<VoidPointer> node;
+ typedef typename boost::pointer_to_other
+ < VoidPointer
+ , unordered_node<VoidPointer, false, true>
+ >::type node_ptr;
+ node_ptr prev_in_group_;
+};
+
+template<class VoidPointer>
+struct unordered_node<VoidPointer, true, false>
+ : public slist_node<VoidPointer>
+{
+ typedef typename boost::pointer_to_other
+ < VoidPointer
+ , unordered_node<VoidPointer, true, false>
+ >::type node_ptr;
+ std::size_t hash_;
+};
+
+template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
+struct unordered_node_traits
+ : public slist_node_traits<VoidPointer>
+{
+ typedef slist_node_traits<VoidPointer> reduced_slist_node_traits;
+ typedef unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> node;
    typedef typename boost::pointer_to_other
       <VoidPointer, node>::type node_ptr;
    typedef typename boost::pointer_to_other
       <VoidPointer, const node>::type const_node_ptr;
 
- static const bool store_hash = true;
+ static const bool store_hash = StoreHash;
+ static const bool optimize_multikey = OptimizeMultiKey;
 
    static node_ptr get_next(const_node_ptr n)
- { return n->next_; }
+ { return node_ptr(&static_cast<node &>(*n->next_)); }
 
    static void set_next(node_ptr n, node_ptr next)
    { n->next_ = next; }
 
+ static node_ptr get_prev_in_group(const_node_ptr n)
+ { return n->prev_in_group_; }
+
+ static void set_prev_in_group(node_ptr n, node_ptr prev)
+ { n->prev_in_group_ = prev; }
+
    static std::size_t get_hash(const_node_ptr n)
    { return n->hash_; }
 
@@ -62,15 +94,60 @@
    { n->hash_ = h; }
 };
 
-template<class VoidPointer, bool StoreHash>
+template<class NodeTraits>
+struct unordered_group_adapter
+{
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+
+ static node_ptr get_next(const_node_ptr n)
+ { return NodeTraits::get_prev_in_group(n); }
+
+ static void set_next(node_ptr n, node_ptr next)
+ { NodeTraits::set_prev_in_group(n, next); }
+};
+
+template<class NodeTraits>
+struct unordered_algorithms
+ : public circular_slist_algorithms<NodeTraits>
+{
+ typedef circular_slist_algorithms<NodeTraits> base_type;
+ typedef unordered_group_adapter<NodeTraits> group_traits;
+ typedef circular_slist_algorithms<group_traits> group_algorithms;
+
+ static void init(typename base_type::node_ptr n)
+ {
+ base_type::init(n);
+ group_algorithms::init(n);
+ }
+
+ static void init_header(typename base_type::node_ptr n)
+ {
+ base_type::init_header(n);
+ group_algorithms::init_header(n);
+ }
+
+ static void unlink(typename base_type::node_ptr n)
+ {
+ base_type::unlink(n);
+ group_algorithms::unlink(n);
+ }
+};
+
+template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
 struct get_uset_node_algo
 {
    typedef typename detail::if_c
- < StoreHash
- , slist_node_traits_plus_hash<VoidPointer>
+ < (StoreHash || OptimizeMultiKey)
+ , unordered_node_traits<VoidPointer, StoreHash, OptimizeMultiKey>
       , slist_node_traits<VoidPointer>
>::type node_traits_type;
- typedef circular_slist_algorithms<node_traits_type> type;
+ typedef typename detail::if_c
+ < OptimizeMultiKey
+ , unordered_algorithms<node_traits_type>
+ , circular_slist_algorithms<node_traits_type>
+ >::type type;
 };
 /// @endcond
 
@@ -90,6 +167,7 @@
    typedef detail::generic_hook
    < get_uset_node_algo<typename packed_options::void_pointer
                        , packed_options::store_hash
+ , packed_options::optimize_multikey
>
    , typename packed_options::tag
    , packed_options::link_mode
@@ -104,7 +182,7 @@
 //! the unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
 //!
 //! The hook admits the following options: \c tag<>, \c void_pointer<>,
-//! \c link_mode<> and \c store_hash<>.
+//! \c link_mode<>, \c store_hash<> and \c optimize_multikey<>.
 //!
 //! \c tag<> defines a tag to identify the node.
 //! The same tag value can be used in different classes, but if a class is
@@ -119,6 +197,10 @@
 //!
 //! \c store_hash<> will tell the hook to store the hash of the value
 //! to speed up rehashings.
+//!
+//! \c optimize_multikey<> will tell the hook to store a link to form a group
+//! with other value with the same value to speed up searches and insertions
+//! in unordered_multisets with a great number of with equivalent keys.
 #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
 template<class ...Options>
 #else
@@ -211,6 +293,7 @@
    typedef detail::generic_hook
    < get_uset_node_algo< typename packed_options::void_pointer
                        , packed_options::store_hash
+ , packed_options::optimize_multikey
>
    , member_tag
    , packed_options::link_mode

Modified: branches/release/libs/interprocess/doc/Jamfile.v2
==============================================================================
--- branches/release/libs/interprocess/doc/Jamfile.v2 (original)
+++ branches/release/libs/interprocess/doc/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 # Boost.Interprocess library documentation Jamfile ---------------------------------
 #
-# Copyright Ion Gaztañaga 2005-2007. Use, modification and
+# Copyright Ion Gaztanaga 2005-2007. Use, modification and
 # distribution is subject to 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)

Modified: branches/release/libs/interprocess/doc/interprocess.qbk
==============================================================================
--- branches/release/libs/interprocess/doc/interprocess.qbk (original)
+++ branches/release/libs/interprocess/doc/interprocess.qbk 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -58,6 +58,15 @@
 not need any separate compilation so the user can define `BOOST_DATE_TIME_NO_LIB`
 to avoid Boost from trying to automatically link the [*Boost.DateTime].
 
+In POSIX systems, [*Boost.Interprocess] uses pthread system calls to implement
+classes like mutexes, condition variables, etc... In some operating systems,
+these POSIX calls are implemented in separate libraries that are not automatically
+linked by the compiler. For example, in some Linux systems POSIX pthread functions
+are implemented in `librt.a` library, so you might need to add that library
+when linking an executable or shared library that uses [*Boost.Interprocess].
+If you obtain linking errors related to those pthread functions, please revise
+your system's documentation to know which library implements them.
+
 [endsect]
 
 [section:tested_compilers Tested compilers]
@@ -162,6 +171,9 @@
 [import ../example/doc_map.cpp]
 [doc_map]
 
+For a more advanced example including containers of containers, see the section
+[link interprocess.allocators_containers.containers_explained.containers_of_containers Containers of containers].
+
 [endsect]
 
 [endsect]
@@ -551,6 +563,30 @@
 
 [endsect]
 
+[section:anonymous_shared_memory Anonymous shared memory for UNIX systems]
+
+Creating a shared memory segment and mapping it can be a bit tedious when several
+processes are involved. When processes are related via `fork()` operating system
+call in UNIX sytems a simpler method is available using anonymous shared memory.
+
+This feature has been implemented in UNIX systems mapping the device `\dev\zero` or
+just using the `MAP_ANONYMOUS` in a POSIX conformant `mmap` system call.
+
+This feature is wrapped in [*Boost.Interprocess] using the `anonymous_shared_memory()`
+function, which returns a `mapped_region` object holding an anonymous shared memory
+segment that can be shared by related processes.
+
+Here's is an example:
+
+[import ../example/doc_anonymous_shared_memory.cpp]
+[doc_anonymous_shared_memory]
+
+Once the segment is created, a `fork()` call can
+be used so that `region` is used to communicate two related processes.
+
+[endsect]
+
+
 [section:windows_shared_memory Native windows shared memory]
 
 Windows operating system also offers shared memory, but the lifetime of this
@@ -1298,7 +1334,7 @@
 [blurb ['[*void lock()]]]
 
 [*Effects:]
- The calling thread tries to obtain ownership of the mutex, and if another thread has ownership of the mutex, it waits until it can obtain the ownership. If a thread takes ownership of the mutex the mutex must be unlocked by the same mutex. If the mutex supports recursive locking, the mutex must be unlocked the same number of times it is locked.
+ The calling thread tries to obtain ownership of the mutex, and if another thread has ownership of the mutex, it waits until it can obtain the ownership. If a thread takes ownership of the mutex the mutex must be unlocked by the same thread. If the mutex supports recursive locking, the mutex must be unlocked the same number of times it is locked.
 
 [*Throws:] *interprocess_exception* on error.
 
@@ -2129,7 +2165,8 @@
 
 [section:lock_conversions Lock Transfers Through Move Semantics]
 
-[blurb [*Interprocess uses its own move semantics emulation code.
+[blurb [*Interprocess uses its own move semantics emulation code for compilers
+that don't support rvalues references.
 This is a temporary solution until a Boost move semantics library is accepted.]]
 
 Scoped locks and similar utilities offer simple resource management possibilities,
@@ -3063,6 +3100,8 @@
    //
    managed_shared_memory segment (open_only, "MySharedMemory");//Shared memory object name[c++]
 
+[c++]
+
    //1. If the segment was previously created
    // equivalent to "open_only".
    //2. Otherwise, equivalent to "open_only" (size is ignored)
@@ -3519,6 +3558,36 @@
 
 [endsect]
 
+[section:managed_memory_segment_atomic_func Executing an object function atomically]
+
+Sometimes the programmer must execute some code, and needs to execute it with the
+guarantee that no other process or thread will create or destroy any named, unique
+or anonymous object while executing the functor. A user might want to create several
+named objects and initialize them, but those objects should be available for the rest of processes
+at once.
+
+To achieve this, the programmer can use the `atomic_func()` function offered by
+managed classes:
+
+[c++]
+
+ //This object function will create several named objects
+ create_several_objects_func func(/**/);
+
+ //While executing the function, no other process will be
+ //able to create or destroy objects
+ managed_memory.atomic_func(func);
+
+
+Note that `atomic_func` does not prevent other processes from allocating raw memory
+or executing member functions for already constructed objects (e.g.: another process
+might be pushing elements into a vector placed in the segment). The atomic function
+only blocks named, unique and anonymous creation, search and destruction
+(concurrent calls to `construct<>`, `find<>`, `find_or_construct<>`, `destroy<>`...)
+from other processes.
+
+[endsect]
+
 [endsect]
 
 [section:managed_memory_segment_advanced_features Managed Memory Segment Advanced Features]
@@ -3855,7 +3924,7 @@
 * If the parameter `command` only contains the value `expand_bwd` (with optional
    additional `nothrow_allocation`), the allocator will try to increase the size of
    the memory block referenced by pointer `reuse_ptr` only moving the start of the
- block to a returned new position new_ptr. If it's not possible, it will try to
+ block to a returned new position `new_ptr`. If it's not possible, it will try to
    move the start of the block as much as possible as long as this results in
    `size(new_ptr) >= limit_size`. Success is reported only if this results in
    `limit_size <= size(new_ptr)`.
@@ -3863,7 +3932,7 @@
 * If the parameter `command` only contains the value `allocate_new` (with optional
    additional `nothrow_allocation`), the allocator will try to allocate memory for
    `preferred_size` objects. If it's not possible it will try to allocate memory for
- at least limit_size` objects.
+ at least `limit_size` objects.
 
 * If the parameter `command` only contains a combination of `expand_fwd` and
    `allocate_new`, (with optional additional `nothrow_allocation`) the allocator will
@@ -3918,8 +3987,8 @@
 * If the user chooses `char` as template argument and a backwards expansion is
    performed, although properly aligned, the returned buffer might not be
    suitable because the distance between the new beginning and the old beginning
- might not multiple of the type the user wants to construct, because due to internal
- restriction the expansion can be slightly bigger than the requested. [*When
+ might not multiple of the type the user wants to construct, since due to internal
+ restrictions the expansion can be slightly bigger than the requested bytes. [*When
    performing backwards expansion, if you have already constructed objects in the
    old buffer, make sure to specify correctly the type.]
 
@@ -3935,6 +4004,43 @@
 
 [endsect]
 
+[section:copy_on_write_read_only Opening managed shared memory and mapped files with Copy On Write or Read Only modes]
+
+When mapping a memory segment based on shared memory or files, there is an option to
+open them using [*open_copy_on_write] option. This option is similar to `open_only` but
+every change the programmer does with this managed segment is kept private to this process
+and is not translated to the underlying device (shared memory or file).
+
+The underlying shared memory or file is opened as read-only so several processes can
+share an initial managed segment and make private changes to it. If many processes
+open a managed segment in copy on write mode and not modified pages from the managed
+segment will be shared between all those processes, with considerable memory savings.
+
+Opening managed shared memory and mapped files with [*open_read_only] maps the the
+underlying device in memory with [*read-only] attributes. This means that any attempt
+to write that memory, either creating objects or locking any mutex might result in an
+page-fault error (and thus, program termination) from the OS. Read-only mode opens
+the underlying device (shared memory, file...) in read-only mode and
+can result in considerable memory savings if several processes just want to process
+a managed memory segment without modifying it. Read-only mode operations are limited:
+
+* Read-only mode must be used only from managed classes. If the programmer obtains
+ the segment manager and tries to use it directly it might result in an access violation.
+ The reason for this is that the segment manager is placed in the underlying device
+ and does not nothing about the mode it's been mapped in memory.
+
+* Only const member functions from managed segments should be used.
+
+* Additionally, the `find<>` member function avoids using internal locks and can be
+ used to look for named and unique objects.
+
+Here's an example that shows the use of these two open modes:
+
+[import ../example/doc_managed_copy_on_write.cpp]
+[doc_managed_copy_on_write]
+
+[endsect]
+
 [endsect]
 
 [section:managed_heap_memory_external_buffer Managed Heap Memory And Managed External Buffer]
@@ -4933,6 +5039,56 @@
 
 [endsect]
 
+[section:containers_of_containers Containers of containers]
+
+When creating containers of containers, each container needs an allocator.
+To avoid using several allocators with complex type definitions, we can take
+advantage of the type erasure provided by void allocators and the ability
+to implicitly convert void allocators in allocators that allocate other types.
+
+Here we have an example that builds a map in shared memory. Key is a string
+and the mapped type is a class that stores several containers:
+
+[import ../example/doc_complex_map.cpp]
+[doc_complex_map]
+
+[endsect]
+
+[endsect]
+
+[section:additional_containers Boost containers compatible with Boost.Interprocess]
+
+As mentioned, container developers might need to change their implementation to make them
+compatible with Boost.Interprocess, because implementation usually ignore allocators with
+smart pointers. Hopefully several Boost containers are compatible with [*Interprocess].
+
+[section:unordered Boost unordered containers]
+
+[*Boost.Unordered] containers are compatible with Interprocess, so programmers can store
+hash containers in shared memory and memory mapped files. Here's an small example storing
+`unordered_map` in shared memory:
+
+[import ../example/doc_unordered_map.cpp]
+[doc_unordered_map]
+
+[endsect]
+
+[section:multi_index Boost.MultiIndex containers]
+
+The widely used [*Boost.MultiIndex] library is compatible with [*Boost.Interprocess] so
+we can construct pretty good databases in shared memory. Constructing databases in shared
+memory is a bit tougher than in normal memory, usually because those databases contain strings
+and those strings need to be placed in shared memory. Shared memory strings require
+an allocator in their constructors so this usually makes object insertion a bit more
+complicated.
+
+Here's is an example that shows how to put a multi index container in shared memory:
+
+[import ../example/doc_multi_index.cpp]
+[doc_multi_index]
+
+[endsect]
+
 [endsect]
 
 [section:memory_algorithms Memory allocation algorithms]
@@ -6262,7 +6418,7 @@
 For example, the index type `flat_map_index` based in `boost::interprocess::flat_map`
 is just defined as:
 
-[import ../../../boost/interprocess/indexes/flat_map_index.hpp]
+[import ../../boost/interprocess/indexes/flat_map_index.hpp]
 [flat_map_index]
 
 
@@ -6385,6 +6541,18 @@
 
 [section:release_notes Release Notes]
 
+[section:release_notes_boost_1_36_00 Boost 1.36 Release]
+
+* Added anonymous shared memory for UNIX systems.
+* Fixed erroneous `void` return types from `flat_map::erase()` functions.
+* Fixed missing move semantics on managed memory classes.
+* Added copy_on_write and open_read_only options for shared memory and mapped file managed classes.
+* [*ABI breaking]: Added to `mapped_region` the mode used to create it.
+* Corrected instantiation errors in void allocators.
+* `shared_ptr` is movable and supports aliasing.
+
+[endsect]
+
 [section:release_notes_boost_1_35_00 Boost 1.35 Release]
 
 * Added auxiliary utilities to ease the definition and construction of
@@ -6654,20 +6822,6 @@
 
 [endsect]
 
-[section:future_containers Unordered associative containers and other containers]
-
-We should be able to construct boost::unordered_xxx family in managed memory segments,
-so that there is no code duplication in boost. So [*Boost.Interprocess] should cooperate
-with boost container developers instead of duplicating effort writing it's own containers.
-
-A very interesting project is making [*boost::multi_index] compatible with
-[*Boost.Interprocess] ready for shared memory. This could be a good basis for memory
-mapped data-bases. The work to achieve this, however, can be huge. It would be
-interesting a collaboration with [*Intrusive] library to achieve shared memory
-intrusive containers.
-
-[endsect]
-
 [endsect]
 
 [endsect]

Modified: branches/release/libs/interprocess/example/Jamfile.v2
==============================================================================
--- branches/release/libs/interprocess/example/Jamfile.v2 (original)
+++ branches/release/libs/interprocess/example/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 # Boost Interprocess Library Example Jamfile
 
-# (C) Copyright Ion Gaztañaga 2006.
+# (C) Copyright Ion Gaztanaga 2006.
 # Use, modification and distribution are subject to 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)

Modified: branches/release/libs/interprocess/example/doc_file_mapping.cpp
==============================================================================
--- branches/release/libs/interprocess/example/doc_file_mapping.cpp (original)
+++ branches/release/libs/interprocess/example/doc_file_mapping.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -56,7 +56,6 @@
       std::cout << ex.what() << std::endl;
       return 1;
    }
- std::remove("file.bin");
    return 0;
 }
 //]

Modified: branches/release/libs/interprocess/example/doc_message_queueA.cpp
==============================================================================
--- branches/release/libs/interprocess/example/doc_message_queueA.cpp (original)
+++ branches/release/libs/interprocess/example/doc_message_queueA.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -35,11 +35,9 @@
       }
    }
    catch(interprocess_exception &ex){
- message_queue::remove("message_queue");
       std::cout << ex.what() << std::endl;
       return 1;
    }
- message_queue::remove("message_queue");
 
    return 0;
 }

Modified: branches/release/libs/interprocess/example/doc_move_containers.cpp
==============================================================================
--- branches/release/libs/interprocess/example/doc_move_containers.cpp (original)
+++ branches/release/libs/interprocess/example/doc_move_containers.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -53,7 +53,7 @@
          //In the following line, no string copy-constructor will be called.
          //"move_me"'s contents will be transferred to the string created in
          //the vector
- myshmvector->push_back(move(move_me));
+ myshmvector->push_back(boost::interprocess::move(move_me));
 
          //The source string is in default constructed state
          assert(move_me.empty());
@@ -69,7 +69,7 @@
       //No string copy-constructor or assignments will be called, but
       //move constructors and move-assignments. No memory allocation
       //function will be called in this operations!!
- myshmvector->insert(myshmvector->begin(), move(string_to_compare));
+ myshmvector->insert(myshmvector->begin(), boost::interprocess::move(string_to_compare));
 
       //Destroy vector. This will free all strings that the vector contains
       shm.destroy_ptr(myshmvector);

Modified: branches/release/libs/interprocess/example/doc_shared_memory.cpp
==============================================================================
--- branches/release/libs/interprocess/example/doc_shared_memory.cpp (original)
+++ branches/release/libs/interprocess/example/doc_shared_memory.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -38,7 +38,6 @@
       std::cout << ex.what() << std::endl;
       return 1;
    }
- shared_memory_object::remove("shared_memory");
    return 0;
 }
 //]

Modified: branches/release/libs/interprocess/example/doc_shared_memory2.cpp
==============================================================================
--- branches/release/libs/interprocess/example/doc_shared_memory2.cpp (original)
+++ branches/release/libs/interprocess/example/doc_shared_memory2.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -36,9 +36,10 @@
    }
    catch(interprocess_exception &ex){
       std::cout << "Unexpected exception: " << ex.what() << std::endl;
+ shared_memory_object::remove("shared_memory");
       return 1;
    }
-
+ shared_memory_object::remove("shared_memory");
    return 0;
 }
 //]

Modified: branches/release/libs/interprocess/proj/conceptgcc/MakeAll
==============================================================================
--- branches/release/libs/interprocess/proj/conceptgcc/MakeAll (original)
+++ branches/release/libs/interprocess/proj/conceptgcc/MakeAll 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,35 +1,35 @@
-
-#ifndef CC
-CC=i686-pc-cygwin-conceptg++.exe
-#endif
-
-BOOST_ROOT=../../../..
-
-INTERPROCESS_CPP := $(wildcard ../../src/*.cpp)
-INTERPROCESS_OBJ := $(patsubst ../../src/%.cpp, lib_%.o, $(INTERPROCESS_CPP))
-
-INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
-INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/conceptgcc/test_%.out, $(INTERPROCESSTEST_CPP))
-
-INTERPROCESSDOC_CPP := $(wildcard ../../example/*.cpp)
-INTERPROCESSDOC_OUT := $(patsubst ../../example/%.cpp, ../../bin/conceptgcc/ex_%.out, $(INTERPROCESSDOC_CPP))
-
-LIBDIR:= ../../../../stage/lib
-
-.PHONY: createdir clean
-
-all: createdir $(INTERPROCESSTEST_OUT) $(INTERPROCESSDOC_OUT)
- @cd .
-
-createdir:
- @mkdir -p ../../bin/conceptgcc
-
-../../bin/conceptgcc/test_%.out: ../../test/%.cpp
- $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR) -lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
-
-../../bin/conceptgcc/ex_%.out: ../../example/%.cpp
- $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR)-lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
-
-clean:
- rm -f *.o
- rm -f ../../bin/conceptgcc/*
+
+#ifndef CC
+CC=i686-pc-cygwin-conceptg++.exe
+#endif
+
+BOOST_ROOT=../../../..
+
+INTERPROCESS_CPP := $(wildcard ../../src/*.cpp)
+INTERPROCESS_OBJ := $(patsubst ../../src/%.cpp, lib_%.o, $(INTERPROCESS_CPP))
+
+INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
+INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/conceptgcc/test_%.out, $(INTERPROCESSTEST_CPP))
+
+INTERPROCESSDOC_CPP := $(wildcard ../../example/*.cpp)
+INTERPROCESSDOC_OUT := $(patsubst ../../example/%.cpp, ../../bin/conceptgcc/ex_%.out, $(INTERPROCESSDOC_CPP))
+
+LIBDIR:= ../../../../stage/lib
+
+.PHONY: createdir clean
+
+all: createdir $(INTERPROCESSTEST_OUT) $(INTERPROCESSDOC_OUT)
+ @cd .
+
+createdir:
+ @mkdir -p ../../bin/conceptgcc
+
+../../bin/conceptgcc/test_%.out: ../../test/%.cpp
+ $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR) -lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
+
+../../bin/conceptgcc/ex_%.out: ../../example/%.cpp
+ $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR)-lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
+
+clean:
+ rm -f *.o
+ rm -f ../../bin/conceptgcc/*

Modified: branches/release/libs/interprocess/proj/cygwin/MakeAll
==============================================================================
--- branches/release/libs/interprocess/proj/cygwin/MakeAll (original)
+++ branches/release/libs/interprocess/proj/cygwin/MakeAll 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,33 +1,33 @@
-
-ifndef CC
-CC=g++
-endif
-
-BOOST_ROOT=../../../..
-
-INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
-INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/cygwin/test_%.out, $(INTERPROCESSTEST_CPP))
-
-#INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
-#INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/cygwin/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
-
-LIBDIR:= ../../../../stage/lib
-
-.PHONY: createdir clean
-
-all: createdir $(INTERPROCESSEXAMPLE_OUT) $(INTERPROCESSTEST_OUT)
- @cd .
-
-createdir:
- @mkdir -p ../../bin/cygwin
-
-../../bin/cygwin/test_%.out: ../../test/%.cpp
- $(CC) -g $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR) -lboost_thread-gcc-mt -I$(BOOST_ROOT) -lstdc++ -o $@
-
-#../../bin/cygwin/ex_%.out: ../../example/%.cpp
-# $(CC) -g $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR)-lboost_thread-gcc-mt -I$(BOOST_ROOT) -lstdc++ -o $@
-
-
-clean:
- rm -f *.o
- rm -f ../../bin/cygwin/*
+
+ifndef CC
+CC=g++
+endif
+
+BOOST_ROOT=../../../..
+
+INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
+INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/cygwin/test_%.out, $(INTERPROCESSTEST_CPP))
+
+#INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
+#INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/cygwin/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
+
+LIBDIR:= ../../../../stage/lib
+
+.PHONY: createdir clean
+
+all: createdir $(INTERPROCESSEXAMPLE_OUT) $(INTERPROCESSTEST_OUT)
+ @cd .
+
+createdir:
+ @mkdir -p ../../bin/cygwin
+
+../../bin/cygwin/test_%.out: ../../test/%.cpp
+ $(CC) -g $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR) -lboost_thread-gcc-mt -I$(BOOST_ROOT) -lstdc++ -o $@
+
+#../../bin/cygwin/ex_%.out: ../../example/%.cpp
+# $(CC) -g $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR)-lboost_thread-gcc-mt -I$(BOOST_ROOT) -lstdc++ -o $@
+
+
+clean:
+ rm -f *.o
+ rm -f ../../bin/cygwin/*

Modified: branches/release/libs/interprocess/proj/linux/MakeAll
==============================================================================
--- branches/release/libs/interprocess/proj/linux/MakeAll (original)
+++ branches/release/libs/interprocess/proj/linux/MakeAll 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,32 +1,32 @@
-
-ifndef CC
-CC=g++
-endif
-
-BOOST_ROOT=../../../..
-BOOST_LIBS=/usr/local/lib
-
-
-INTERPROCESS_CPP := $(wildcard ../../test/*.cpp)
-INTERPROCESS_OUT := $(patsubst ../../test/%.cpp, ../../bin/linux/test_%.out, $(INTERPROCESS_CPP))
-
-INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
-INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/linux/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
-
-.PHONY: createdir clean
-
-all: createdir $(INTERPROCESS_OUT) $(INTERPROCESSEXAMPLE_OUT)
- @cd .
-
-createdir:
- @mkdir -p ../../bin/linux
-
-../../bin/linux/test_%.out: ../../test/%.cpp
- $(CC) $< -Wall -pedantic -g -pthread -DBOOST_DATE_TIME_NO_LIB -lstdc++ -lrt -lboost_thread-gcc-mt -I$(BOOST_ROOT) -L$(BOOST_LIBS) -o $@
-
-../../bin/linux/ex_%.out: ../../example/%.cpp
- $(CC) $< -Wall -pedantic -g -pthread -DBOOST_DATE_TIME_NO_LIB -lstdc++ -lrt -lboost_thread-gcc-mt -I$(BOOST_ROOT) -L$(BOOST_LIBS) -o $@
-
-clean:
- rm -f *.o
- rm -f ../../bin/linux/*
+
+ifndef CC
+CC=g++
+endif
+
+BOOST_ROOT=../../../..
+BOOST_LIBS=/usr/local/lib
+
+
+INTERPROCESS_CPP := $(wildcard ../../test/*.cpp)
+INTERPROCESS_OUT := $(patsubst ../../test/%.cpp, ../../bin/linux/test_%.out, $(INTERPROCESS_CPP))
+
+INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
+INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/linux/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
+
+.PHONY: createdir clean
+
+all: createdir $(INTERPROCESS_OUT) $(INTERPROCESSEXAMPLE_OUT)
+ @cd .
+
+createdir:
+ @mkdir -p ../../bin/linux
+
+../../bin/linux/test_%.out: ../../test/%.cpp
+ $(CC) $< -Wall -pedantic -g -pthread -DBOOST_DATE_TIME_NO_LIB -lstdc++ -lrt -lboost_thread-gcc-mt -I$(BOOST_ROOT) -L$(BOOST_LIBS) -o $@
+
+../../bin/linux/ex_%.out: ../../example/%.cpp
+ $(CC) $< -Wall -pedantic -g -pthread -DBOOST_DATE_TIME_NO_LIB -lstdc++ -lrt -lboost_thread-gcc-mt -I$(BOOST_ROOT) -L$(BOOST_LIBS) -o $@
+
+clean:
+ rm -f *.o
+ rm -f ../../bin/linux/*

Modified: branches/release/libs/interprocess/proj/mingw/MakeAll
==============================================================================
--- branches/release/libs/interprocess/proj/mingw/MakeAll (original)
+++ branches/release/libs/interprocess/proj/mingw/MakeAll 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,35 +1,35 @@
-
-ifndef CC
-CC=g++
-endif
-
-BOOST_ROOT=../../../..
-
-INTERPROCESS_CPP := $(wildcard ../../src/*.cpp)
-INTERPROCESS_OBJ := $(patsubst ../../src/%.cpp, lib_%.o, $(INTERPROCESS_CPP))
-
-INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
-INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/mingw/test_%.out, $(INTERPROCESSTEST_CPP))
-
-INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
-INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/mingw/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
-
-LIBDIR:= ../../../../stage/lib
-
-.PHONY: createdir clean
-
-all: createdir $(INTERPROCESSTEST_OUT) $(INTERPROCESSEXAMPLE_OUT)
- @cd .
-
-createdir:
- @mkdir -p ../../bin/mingw
-
-../../bin/mingw/test_%.out: ../../test/%.cpp
- $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR) -lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
-
-../../bin/mingw/ex_%.out: ../../example/%.cpp
- $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR)-lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
-
-clean:
- rm -f *.o
- rm -f ../../bin/mingw/*
+
+ifndef CC
+CC=g++
+endif
+
+BOOST_ROOT=../../../..
+
+INTERPROCESS_CPP := $(wildcard ../../src/*.cpp)
+INTERPROCESS_OBJ := $(patsubst ../../src/%.cpp, lib_%.o, $(INTERPROCESS_CPP))
+
+INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
+INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/mingw/test_%.out, $(INTERPROCESSTEST_CPP))
+
+INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
+INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/mingw/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
+
+LIBDIR:= ../../../../stage/lib
+
+.PHONY: createdir clean
+
+all: createdir $(INTERPROCESSTEST_OUT) $(INTERPROCESSEXAMPLE_OUT)
+ @cd .
+
+createdir:
+ @mkdir -p ../../bin/mingw
+
+../../bin/mingw/test_%.out: ../../test/%.cpp
+ $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR) -lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
+
+../../bin/mingw/ex_%.out: ../../example/%.cpp
+ $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -L$(LIBDIR)-lboost_thread-mgw-mt -I$(BOOST_ROOT) -lstdc++ -o $@
+
+clean:
+ rm -f *.o
+ rm -f ../../bin/mingw/*

Modified: branches/release/libs/interprocess/proj/qnx/MakeAll
==============================================================================
--- branches/release/libs/interprocess/proj/qnx/MakeAll (original)
+++ branches/release/libs/interprocess/proj/qnx/MakeAll 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,33 +1,33 @@
-
-ifndef CC
-CC=g++
-endif
-
-BOOST_ROOT=../../../..
-
-INTERPROCESS_CPP := $(wildcard ../../src/*.cpp)
-INTERPROCESS_OBJ := $(patsubst ../../src/%.cpp, lib_%.o, $(INTERPROCESS_CPP))
-
-INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
-INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/qnx/test_%.out, $(INTERPROCESSTEST_CPP))
-
-INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
-INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/qnx/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
-
-.PHONY: createdir clean
-
-all: createdir $(INTERPROCESSTEST_OUT) $(INTERPROCESSEXAMPLE_OUT)
- @cd .
-
-createdir:
- @mkdir -p ../../bin/qnx
-
-../../bin/qnx/test_%.out: ../../test/%.cpp
- $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -lboost_thread-gcc-mt-s -I$(BOOST_ROOT) -o $@
-
-../../bin/qnx/ex_%.out: ../../example/%.cpp
- $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -lboost_thread-gcc-mt-s -I$(BOOST_ROOT) -o $@
-
-clean:
- rm -f *.o
- rm -f ../../bin/qnx/*
+
+ifndef CC
+CC=g++
+endif
+
+BOOST_ROOT=../../../..
+
+INTERPROCESS_CPP := $(wildcard ../../src/*.cpp)
+INTERPROCESS_OBJ := $(patsubst ../../src/%.cpp, lib_%.o, $(INTERPROCESS_CPP))
+
+INTERPROCESSTEST_CPP := $(wildcard ../../test/*.cpp)
+INTERPROCESSTEST_OUT := $(patsubst ../../test/%.cpp, ../../bin/qnx/test_%.out, $(INTERPROCESSTEST_CPP))
+
+INTERPROCESSEXAMPLE_CPP := $(wildcard ../../example/*.cpp)
+INTERPROCESSEXAMPLE_OUT := $(patsubst ../../example/%.cpp, ../../bin/qnx/ex_%.out, $(INTERPROCESSEXAMPLE_CPP))
+
+.PHONY: createdir clean
+
+all: createdir $(INTERPROCESSTEST_OUT) $(INTERPROCESSEXAMPLE_OUT)
+ @cd .
+
+createdir:
+ @mkdir -p ../../bin/qnx
+
+../../bin/qnx/test_%.out: ../../test/%.cpp
+ $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -lboost_thread-gcc-mt-s -I$(BOOST_ROOT) -o $@
+
+../../bin/qnx/ex_%.out: ../../example/%.cpp
+ $(CC) $< -Wall -DBOOST_DATE_TIME_NO_LIB -lboost_thread-gcc-mt-s -I$(BOOST_ROOT) -o $@
+
+clean:
+ rm -f *.o
+ rm -f ../../bin/qnx/*

Modified: branches/release/libs/interprocess/proj/vc7ide/Interprocess.sln
==============================================================================
--- branches/release/libs/interprocess/proj/vc7ide/Interprocess.sln (original)
+++ branches/release/libs/interprocess/proj/vc7ide/Interprocess.sln 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,847 +1,935 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_memory_mapping_test", "shared_memory_mappable_test.vcproj", "{5CE18C83-6025-36FE-A4F7-BA09176D3A11}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_memory_test", "shared_memory_test.vcproj", "{5E2838CC-0916-8F4E-A4F7-93506BA0D310}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_ptr_test", "shared_ptr_test.vcproj", "{5371C383-6092-1238-A877-BAEB37867609}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slist_test", "slist_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792608}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "string_test", "string_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D4A792607}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tree_test", "tree_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792606}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upgradable_mutex_test", "upgradable_mutex.vcproj", "{4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "user_buffer_test", "user_buffer_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792603}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vectorstream_test", "vectorstream_test.vcproj", "{58CCE183-6032-12FE-A4F7-BA893A767601}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_test", "vector_test.vcproj", "{5CE11C83-096A-84FE-4FA2-D3A6BA792002}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_condition_test", "named_condition_test.vcproj", "{58CC2563-6092-48FE-FAF7-BA046A792658}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_mutexA", "doc_anonymous_mutexA.vcproj", "{58C1B183-9026-4E63-12F2-005412200054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_mutexB", "doc_anonymous_mutexB.vcproj", "{58C1B183-9026-4E63-12F2-005202441254}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_mutex", "doc_named_mutex.vcproj", "{58C181B3-9516-463E-2F12-122155400054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_conditionA", "doc_anonymous_conditionA.vcproj", "{5C1B8183-0296-4F83-1F22-001005220544}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_conditionB", "doc_anonymous_conditionB.vcproj", "{58C1FE83-2906-E643-2F12-024410052254}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_conditionA", "doc_named_conditionA.vcproj", "{58EB1CB3-1354-364E-12F2-154356612054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_conditionB", "doc_named_conditionB.vcproj", "{58181CB3-5134-634E-12F2-155435622054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_semaphoreA", "doc_anonymous_semaphoreA.vcproj", "{5CB81183-29FB-F843-24FF-022050100544}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_semaphoreB", "doc_anonymous_semaphoreB.vcproj", "{58FBE8C3-9026-FAB2-E643-000522441254}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_upgradable_mutex_test", "named_upgradable_mutex.vcproj", "{48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_upgradable_mutexA", "doc_anonymous_upgradable_mutexA.vcproj", "{5C18831B-F162-FA96-E6C3-FA5122040054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_upgradable_mutexB", "doc_anonymous_upgradable_mutexB.vcproj", "{5C1B1043-1EFF-2793-4E63-245241283054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_message_queueA", "doc_message_queueA.vcproj", "{51B189C3-4E63-9026-12F2-12200AF54054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_message_queueB", "doc_message_queueB.vcproj", "{5C1B1813-12C2-0296-4E63-244549126520}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_cont", "doc_cont.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792653}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_contA", "doc_contA.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792652}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_contB", "doc_contB.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792651}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_memory", "doc_shared_memory.vcproj", "{58CCE183-6032-12FE-4FC7-83A79F760B61}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unique_ptr_test", "unique_ptr_test.vcproj", "{571C3383-6092-A877-1238-B3786BAE7605}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_move_containers", "doc_move_containers.vcproj", "{58C1B183-0296-EA42-EF04-005120054104}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map_index_allocation_test", "map_index_allocation_test.vcproj", "{588CCD13-2962-83FE-F4B7-92230DB73629}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flat_map_index_allocation_test", "flat_map_index_allocation_test.vcproj", "{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iset_index_allocation_test", "iset_index_allocation_test.vcproj", "{58BD1CC3-6972-F3F7-84BE-0DB736035922}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iunordered_set_index_allocation_test", "iunordered_set_index_allocation_test.vcproj", "{5BD1C7C3-3F7F-6972-84BE-B731D9236035}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_memory2", "doc_shared_memory2.vcproj", "{58CE1D83-F31E-4FD7-6132-8A79F6307B61}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_file_mapping2", "doc_file_mapping2.vcproj", "{5CE19883-F413-7EFD-6342-B79639F7B611}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_file_mapping", "doc_file_mapping.vcproj", "{58DE18C3-3261-2F3E-FD47-83760B9FA761}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_map", "doc_map.vcproj", "{59CEC183-8192-8F6D-4FB7-BA260A79D352}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windows_shared_memory_test", "windows_shared_memory_test.vcproj", "{E385C28C-0691-4FA7-F48E-935BA0D06310}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windows_shared_memory_mapping_test", "windows_shared_memory_mapping_test.vcproj", "{518CE8C3-6512-FA75-46EF-B917A3A116D1}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed_windows_shared_memory_test", "managed_windows_shared_memory.vcproj", "{5D18CE83-1926-7AE4-FE94-B606D9B23131}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adaptive_pool_test", "adaptive_pool_test.vcproj", "{58CE1D84-1962-4FE9-BA0D-A4F7973A4652}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cached_adaptive_pool_test", "cached_adaptive_pool_test.vcproj", "{5188E3CE-2964-F43E-FB87-B037AC692D59}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "private_adaptive_pool_test", "private_adaptive_pool_test.vcproj", "{5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_allocator", "doc_allocator.vcproj", "{581B1C83-4E12-9526-020F-012482540054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_node_allocator", "doc_node_allocator.vcproj", "{51B17C83-E172-5396-0FA2-825472008554}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_private_node_allocator", "doc_private_node_allocator.vcproj", "{2B75C833-17D2-4956-A23F-820854254175}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_cached_node_allocator", "doc_cached_node_allocator.vcproj", "{283AD375-7D12-5866-23BF-854308651275}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_adaptive_pool", "doc_adaptive_pool.vcproj", "{57C832B1-17D2-9537-FA12-827220448554}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_cached_adaptive_pool", "doc_cached_adaptive_pool.vcproj", "{536C8251-7E12-9537-A1E2-822073258554}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_private_adaptive_pool", "doc_private_adaptive_pool.vcproj", "{83258CB1-127E-9375-F872-8324A1054454}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_raw_allocation", "doc_managed_raw_allocation.vcproj", "{5198EFC3-2731-F34E-4FD8-1859AC94F761}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_aligned_allocation", "doc_managed_aligned_allocation.vcproj", "{58DE18C3-3261-2F3E-FD47-83760B9FA761}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_interprocesslib", "interprocesslib.vcproj", "{FFAA56F1-32EC-4B22-B6BD-95A311A67C35}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_windows_shared_memory", "doc_windows_shared_memory.vcproj", "{5E17C9C3-1362-2E1E-C84F-8A76B6739F21}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_windows_shared_memory2", "doc_windows_shared_memory2.vcproj", "{5E1D6C83-31DE-4F6F-6132-87A9FB663041}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adaptive_node_pool_test", "adaptive_node_pool_test.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "node_pool_test", "node_pool_test.vcproj", "{8A519DC3-6092-A4FE-F748-BA91328D6522}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "deque_test", "deque_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792655}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "barrier_test", "barrier_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792661}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bufferstream_test", "bufferstream_test.vcproj", "{58C183CE-6203-FE12-A237-BA8976695960}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cached_node_allocator_test", "cached_node_allocator_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792659}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "private_node_allocator_test", "private_node_allocator_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792620}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "node_allocator_test", "node_allocator_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792622}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_mutex_test", "named_mutex_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792625}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_recursive_mutex_test", "named_recursive_mutex_test.vcproj", "{5C83CE18-4F48-A7FE-6092-B7920AD3A624}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_semaphore_test", "named_semaphore_test.vcproj", "{58CCE283-1609-48FE-A4F7-BA0D3A793523}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_heap_memory", "doc_managed_heap_memory.vcproj", "{58CCE183-6092-48FE-A4FC-BA0D3A792647}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allocexcept_test", "allocexcept_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792662}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "condition_test", "condition_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792658}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "data_test", "data_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792657}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_bufferstream", "doc_bufferstream.vcproj", "{58C1B183-9026-4E12-00F2-001200540054}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_intrusive", "doc_intrusive.vcproj", "{5E18CC83-6092-48FE-A677-B832A0D3A650}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_ipc_messageA", "doc_ipc_messageA.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792649}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_ipc_messageB", "doc_ipc_messageB.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792648}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_mapped_file", "doc_managed_mapped_file.vcproj", "{58CCE183-5091-48FE-A4FC-BA0D3A792446}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_allocA", "doc_named_allocA.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792645}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_allocB", "doc_named_allocB.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792644}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_offset_ptr", "doc_offset_ptr.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792643}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_scoped_ptr", "doc_scoped_ptr.vcproj", "{58CC8E13-0962-8F4E-77A6-BD3A6832A042}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_vectorstream", "doc_vectorstream.vcproj", "{58C1B183-9260-4E8F-F200-000000000041}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_where_allocate", "doc_where_allocate.vcproj", "{58CCE183-6092-48FE-A677-BA0D3A832640}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file_mapping_test", "file_mapping_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792638}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flat_tree_test", "flat_tree_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792637}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intrusive_ptr_test", "intrusive_ptr_test.vcproj", "{5821C383-6092-12FE-A877-BA0D33467633}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "list_test", "list_ex.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792632}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed_mapped_file_test", "managed_mapped_file_test.vcproj", "{5CCE1883-0926-F7A4-8FE4-BA0606D92331}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapped_file_test", "mapped_file_test.vcproj", "{5C6D9CE1-2609-F7A4-8FE4-BA0883602330}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "memory_algorithm_test", "memory_algorithm_test.vcproj", "{58E18CC3-6092-8F4E-A3E7-A792230D3629}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "message_queue_test", "message_queue.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792628}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mutex_test", "mutex_test.vcproj", "{83581CCE-487E-3292-A4E7-BA07926D3A27}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "null_index_test", "null_index_test.vcproj", "{0000058C-0000-0000-0000-000000000021}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "recursive_mutex_test", "recursive_mutex_test.vcproj", "{83581CCE-487E-3292-A4E7-BA07926D3A14}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "semaphore_test", "semaphore_test.vcproj", "{5CE28C83-48FE-1676-4FA7-B50D3A76A013}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_multiple_allocation", "doc_managed_multiple_allocation.vcproj", "{818C43EE-3561-F3AE-4FD7-8A2076E76A31}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_allocation_command", "doc_managed_allocation_command.vcproj", "{5189DEA3-3261-F33E-47ED-83BC69F66061}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_construction_info", "doc_managed_construction_info.vcproj", "{5C82D1D3-3861-3AF1-03EF-89AED4716761}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_ptr_explicit", "doc_shared_ptr_explicit.vcproj", "{4E887AC3-F8EA-6923-A744-C264A398C913}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_unique_ptr", "doc_unique_ptr.vcproj", "{589C2EB3-8A57-1862-F4EA-A6B14C7329A3}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_ptr", "doc_shared_ptr.vcproj", "{51CE89A3-6092-F4EA-48A7-B4B9AC326093}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed_shared_memory_test", "managed_shared_memory.vcproj", "{58DF28E3-0926-F47A-E28A-B03A4D619631}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_grow", "doc_managed_grow.vcproj", "{818C43EE-3561-F3AE-4FD7-8A2076E76A31}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "offset_ptr_test", "offset_ptr_test.vcproj", "{5CE11C83-096A-84FE-4FA2-D3A6BA792002}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectDependencies) = postSolution
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Debug.ActiveCfg = Debug|Win32
- {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Debug.Build.0 = Debug|Win32
- {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Release.ActiveCfg = Release|Win32
- {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Release.Build.0 = Release|Win32
- {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Debug.ActiveCfg = Debug|Win32
- {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Debug.Build.0 = Debug|Win32
- {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Release.ActiveCfg = Release|Win32
- {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Release.Build.0 = Release|Win32
- {5371C383-6092-1238-A877-BAEB37867609}.Debug.ActiveCfg = Debug|Win32
- {5371C383-6092-1238-A877-BAEB37867609}.Debug.Build.0 = Debug|Win32
- {5371C383-6092-1238-A877-BAEB37867609}.Release.ActiveCfg = Release|Win32
- {5371C383-6092-1238-A877-BAEB37867609}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Release.Build.0 = Release|Win32
- {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Debug.ActiveCfg = Debug|Win32
- {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Debug.Build.0 = Debug|Win32
- {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Release.ActiveCfg = Release|Win32
- {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Release.Build.0 = Release|Win32
- {58CCE183-6032-12FE-A4F7-BA893A767601}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6032-12FE-A4F7-BA893A767601}.Debug.Build.0 = Debug|Win32
- {58CCE183-6032-12FE-A4F7-BA893A767601}.Release.ActiveCfg = Release|Win32
- {58CCE183-6032-12FE-A4F7-BA893A767601}.Release.Build.0 = Release|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.ActiveCfg = Debug|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.Build.0 = Debug|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.ActiveCfg = Release|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.Build.0 = Release|Win32
- {58CC2563-6092-48FE-FAF7-BA046A792658}.Debug.ActiveCfg = Debug|Win32
- {58CC2563-6092-48FE-FAF7-BA046A792658}.Debug.Build.0 = Debug|Win32
- {58CC2563-6092-48FE-FAF7-BA046A792658}.Release.ActiveCfg = Release|Win32
- {58CC2563-6092-48FE-FAF7-BA046A792658}.Release.Build.0 = Release|Win32
- {58C1B183-9026-4E63-12F2-005412200054}.Debug.ActiveCfg = Debug|Win32
- {58C1B183-9026-4E63-12F2-005412200054}.Debug.Build.0 = Debug|Win32
- {58C1B183-9026-4E63-12F2-005412200054}.Release.ActiveCfg = Release|Win32
- {58C1B183-9026-4E63-12F2-005412200054}.Release.Build.0 = Release|Win32
- {58C1B183-9026-4E63-12F2-005202441254}.Debug.ActiveCfg = Debug|Win32
- {58C1B183-9026-4E63-12F2-005202441254}.Debug.Build.0 = Debug|Win32
- {58C1B183-9026-4E63-12F2-005202441254}.Release.ActiveCfg = Release|Win32
- {58C1B183-9026-4E63-12F2-005202441254}.Release.Build.0 = Release|Win32
- {58C181B3-9516-463E-2F12-122155400054}.Debug.ActiveCfg = Debug|Win32
- {58C181B3-9516-463E-2F12-122155400054}.Debug.Build.0 = Debug|Win32
- {58C181B3-9516-463E-2F12-122155400054}.Release.ActiveCfg = Release|Win32
- {58C181B3-9516-463E-2F12-122155400054}.Release.Build.0 = Release|Win32
- {5C1B8183-0296-4F83-1F22-001005220544}.Debug.ActiveCfg = Debug|Win32
- {5C1B8183-0296-4F83-1F22-001005220544}.Debug.Build.0 = Debug|Win32
- {5C1B8183-0296-4F83-1F22-001005220544}.Release.ActiveCfg = Release|Win32
- {5C1B8183-0296-4F83-1F22-001005220544}.Release.Build.0 = Release|Win32
- {58C1FE83-2906-E643-2F12-024410052254}.Debug.ActiveCfg = Debug|Win32
- {58C1FE83-2906-E643-2F12-024410052254}.Debug.Build.0 = Debug|Win32
- {58C1FE83-2906-E643-2F12-024410052254}.Release.ActiveCfg = Release|Win32
- {58C1FE83-2906-E643-2F12-024410052254}.Release.Build.0 = Release|Win32
- {58EB1CB3-1354-364E-12F2-154356612054}.Debug.ActiveCfg = Debug|Win32
- {58EB1CB3-1354-364E-12F2-154356612054}.Debug.Build.0 = Debug|Win32
- {58EB1CB3-1354-364E-12F2-154356612054}.Release.ActiveCfg = Release|Win32
- {58EB1CB3-1354-364E-12F2-154356612054}.Release.Build.0 = Release|Win32
- {58181CB3-5134-634E-12F2-155435622054}.Debug.ActiveCfg = Debug|Win32
- {58181CB3-5134-634E-12F2-155435622054}.Debug.Build.0 = Debug|Win32
- {58181CB3-5134-634E-12F2-155435622054}.Release.ActiveCfg = Release|Win32
- {58181CB3-5134-634E-12F2-155435622054}.Release.Build.0 = Release|Win32
- {5CB81183-29FB-F843-24FF-022050100544}.Debug.ActiveCfg = Debug|Win32
- {5CB81183-29FB-F843-24FF-022050100544}.Debug.Build.0 = Debug|Win32
- {5CB81183-29FB-F843-24FF-022050100544}.Release.ActiveCfg = Release|Win32
- {5CB81183-29FB-F843-24FF-022050100544}.Release.Build.0 = Release|Win32
- {58FBE8C3-9026-FAB2-E643-000522441254}.Debug.ActiveCfg = Debug|Win32
- {58FBE8C3-9026-FAB2-E643-000522441254}.Debug.Build.0 = Debug|Win32
- {58FBE8C3-9026-FAB2-E643-000522441254}.Release.ActiveCfg = Release|Win32
- {58FBE8C3-9026-FAB2-E643-000522441254}.Release.Build.0 = Release|Win32
- {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Debug.ActiveCfg = Debug|Win32
- {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Debug.Build.0 = Debug|Win32
- {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Release.ActiveCfg = Release|Win32
- {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Release.Build.0 = Release|Win32
- {5C18831B-F162-FA96-E6C3-FA5122040054}.Debug.ActiveCfg = Debug|Win32
- {5C18831B-F162-FA96-E6C3-FA5122040054}.Debug.Build.0 = Debug|Win32
- {5C18831B-F162-FA96-E6C3-FA5122040054}.Release.ActiveCfg = Release|Win32
- {5C18831B-F162-FA96-E6C3-FA5122040054}.Release.Build.0 = Release|Win32
- {5C1B1043-1EFF-2793-4E63-245241283054}.Debug.ActiveCfg = Debug|Win32
- {5C1B1043-1EFF-2793-4E63-245241283054}.Debug.Build.0 = Debug|Win32
- {5C1B1043-1EFF-2793-4E63-245241283054}.Release.ActiveCfg = Release|Win32
- {5C1B1043-1EFF-2793-4E63-245241283054}.Release.Build.0 = Release|Win32
- {51B189C3-4E63-9026-12F2-12200AF54054}.Debug.ActiveCfg = Debug|Win32
- {51B189C3-4E63-9026-12F2-12200AF54054}.Debug.Build.0 = Debug|Win32
- {51B189C3-4E63-9026-12F2-12200AF54054}.Release.ActiveCfg = Release|Win32
- {51B189C3-4E63-9026-12F2-12200AF54054}.Release.Build.0 = Release|Win32
- {5C1B1813-12C2-0296-4E63-244549126520}.Debug.ActiveCfg = Debug|Win32
- {5C1B1813-12C2-0296-4E63-244549126520}.Debug.Build.0 = Debug|Win32
- {5C1B1813-12C2-0296-4E63-244549126520}.Release.ActiveCfg = Release|Win32
- {5C1B1813-12C2-0296-4E63-244549126520}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Release.Build.0 = Release|Win32
- {58CCE183-6032-12FE-4FC7-83A79F760B61}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6032-12FE-4FC7-83A79F760B61}.Debug.Build.0 = Debug|Win32
- {58CCE183-6032-12FE-4FC7-83A79F760B61}.Release.ActiveCfg = Release|Win32
- {58CCE183-6032-12FE-4FC7-83A79F760B61}.Release.Build.0 = Release|Win32
- {571C3383-6092-A877-1238-B3786BAE7605}.Debug.ActiveCfg = Debug|Win32
- {571C3383-6092-A877-1238-B3786BAE7605}.Debug.Build.0 = Debug|Win32
- {571C3383-6092-A877-1238-B3786BAE7605}.Release.ActiveCfg = Release|Win32
- {571C3383-6092-A877-1238-B3786BAE7605}.Release.Build.0 = Release|Win32
- {58C1B183-0296-EA42-EF04-005120054104}.Debug.ActiveCfg = Debug|Win32
- {58C1B183-0296-EA42-EF04-005120054104}.Debug.Build.0 = Debug|Win32
- {58C1B183-0296-EA42-EF04-005120054104}.Release.ActiveCfg = Release|Win32
- {58C1B183-0296-EA42-EF04-005120054104}.Release.Build.0 = Release|Win32
- {588CCD13-2962-83FE-F4B7-92230DB73629}.Debug.ActiveCfg = Debug|Win32
- {588CCD13-2962-83FE-F4B7-92230DB73629}.Debug.Build.0 = Debug|Win32
- {588CCD13-2962-83FE-F4B7-92230DB73629}.Release.ActiveCfg = Release|Win32
- {588CCD13-2962-83FE-F4B7-92230DB73629}.Release.Build.0 = Release|Win32
- {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.ActiveCfg = Debug|Win32
- {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.Build.0 = Debug|Win32
- {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.ActiveCfg = Release|Win32
- {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.Build.0 = Release|Win32
- {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Debug.ActiveCfg = Debug|Win32
- {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Debug.Build.0 = Debug|Win32
- {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Release.ActiveCfg = Release|Win32
- {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Release.Build.0 = Release|Win32
- {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Debug.ActiveCfg = Debug|Win32
- {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Debug.Build.0 = Debug|Win32
- {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Release.ActiveCfg = Release|Win32
- {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Release.Build.0 = Release|Win32
- {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Debug.ActiveCfg = Debug|Win32
- {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Debug.Build.0 = Debug|Win32
- {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Release.ActiveCfg = Release|Win32
- {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Release.Build.0 = Release|Win32
- {5CE19883-F413-7EFD-6342-B79639F7B611}.Debug.ActiveCfg = Debug|Win32
- {5CE19883-F413-7EFD-6342-B79639F7B611}.Debug.Build.0 = Debug|Win32
- {5CE19883-F413-7EFD-6342-B79639F7B611}.Release.ActiveCfg = Release|Win32
- {5CE19883-F413-7EFD-6342-B79639F7B611}.Release.Build.0 = Release|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.ActiveCfg = Debug|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.Build.0 = Debug|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.ActiveCfg = Release|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.Build.0 = Release|Win32
- {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Debug.ActiveCfg = Debug|Win32
- {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Debug.Build.0 = Debug|Win32
- {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Release.ActiveCfg = Release|Win32
- {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Release.Build.0 = Release|Win32
- {E385C28C-0691-4FA7-F48E-935BA0D06310}.Debug.ActiveCfg = Debug|Win32
- {E385C28C-0691-4FA7-F48E-935BA0D06310}.Debug.Build.0 = Debug|Win32
- {E385C28C-0691-4FA7-F48E-935BA0D06310}.Release.ActiveCfg = Release|Win32
- {E385C28C-0691-4FA7-F48E-935BA0D06310}.Release.Build.0 = Release|Win32
- {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Debug.ActiveCfg = Debug|Win32
- {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Debug.Build.0 = Debug|Win32
- {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Release.ActiveCfg = Release|Win32
- {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Release.Build.0 = Release|Win32
- {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Debug.ActiveCfg = Debug|Win32
- {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Debug.Build.0 = Debug|Win32
- {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Release.ActiveCfg = Release|Win32
- {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Release.Build.0 = Release|Win32
- {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Debug.ActiveCfg = Debug|Win32
- {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Debug.Build.0 = Debug|Win32
- {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Release.ActiveCfg = Release|Win32
- {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Release.Build.0 = Release|Win32
- {5188E3CE-2964-F43E-FB87-B037AC692D59}.Debug.ActiveCfg = Debug|Win32
- {5188E3CE-2964-F43E-FB87-B037AC692D59}.Debug.Build.0 = Debug|Win32
- {5188E3CE-2964-F43E-FB87-B037AC692D59}.Release.ActiveCfg = Release|Win32
- {5188E3CE-2964-F43E-FB87-B037AC692D59}.Release.Build.0 = Release|Win32
- {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Debug.ActiveCfg = Debug|Win32
- {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Debug.Build.0 = Debug|Win32
- {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Release.ActiveCfg = Release|Win32
- {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Release.Build.0 = Release|Win32
- {581B1C83-4E12-9526-020F-012482540054}.Debug.ActiveCfg = Debug|Win32
- {581B1C83-4E12-9526-020F-012482540054}.Debug.Build.0 = Debug|Win32
- {581B1C83-4E12-9526-020F-012482540054}.Release.ActiveCfg = Release|Win32
- {581B1C83-4E12-9526-020F-012482540054}.Release.Build.0 = Release|Win32
- {51B17C83-E172-5396-0FA2-825472008554}.Debug.ActiveCfg = Debug|Win32
- {51B17C83-E172-5396-0FA2-825472008554}.Debug.Build.0 = Debug|Win32
- {51B17C83-E172-5396-0FA2-825472008554}.Release.ActiveCfg = Release|Win32
- {51B17C83-E172-5396-0FA2-825472008554}.Release.Build.0 = Release|Win32
- {2B75C833-17D2-4956-A23F-820854254175}.Debug.ActiveCfg = Debug|Win32
- {2B75C833-17D2-4956-A23F-820854254175}.Debug.Build.0 = Debug|Win32
- {2B75C833-17D2-4956-A23F-820854254175}.Release.ActiveCfg = Release|Win32
- {2B75C833-17D2-4956-A23F-820854254175}.Release.Build.0 = Release|Win32
- {283AD375-7D12-5866-23BF-854308651275}.Debug.ActiveCfg = Debug|Win32
- {283AD375-7D12-5866-23BF-854308651275}.Debug.Build.0 = Debug|Win32
- {283AD375-7D12-5866-23BF-854308651275}.Release.ActiveCfg = Release|Win32
- {283AD375-7D12-5866-23BF-854308651275}.Release.Build.0 = Release|Win32
- {57C832B1-17D2-9537-FA12-827220448554}.Debug.ActiveCfg = Debug|Win32
- {57C832B1-17D2-9537-FA12-827220448554}.Debug.Build.0 = Debug|Win32
- {57C832B1-17D2-9537-FA12-827220448554}.Release.ActiveCfg = Release|Win32
- {57C832B1-17D2-9537-FA12-827220448554}.Release.Build.0 = Release|Win32
- {536C8251-7E12-9537-A1E2-822073258554}.Debug.ActiveCfg = Debug|Win32
- {536C8251-7E12-9537-A1E2-822073258554}.Debug.Build.0 = Debug|Win32
- {536C8251-7E12-9537-A1E2-822073258554}.Release.ActiveCfg = Release|Win32
- {536C8251-7E12-9537-A1E2-822073258554}.Release.Build.0 = Release|Win32
- {83258CB1-127E-9375-F872-8324A1054454}.Debug.ActiveCfg = Debug|Win32
- {83258CB1-127E-9375-F872-8324A1054454}.Debug.Build.0 = Debug|Win32
- {83258CB1-127E-9375-F872-8324A1054454}.Release.ActiveCfg = Release|Win32
- {83258CB1-127E-9375-F872-8324A1054454}.Release.Build.0 = Release|Win32
- {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Debug.ActiveCfg = Debug|Win32
- {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Debug.Build.0 = Debug|Win32
- {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Release.ActiveCfg = Release|Win32
- {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Release.Build.0 = Release|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.ActiveCfg = Debug|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.Build.0 = Debug|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.ActiveCfg = Release|Win32
- {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.Build.0 = Release|Win32
- {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Debug.ActiveCfg = Debug|Win32
- {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Debug.Build.0 = Debug|Win32
- {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Release.ActiveCfg = Release|Win32
- {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Release.Build.0 = Release|Win32
- {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Debug.ActiveCfg = Debug|Win32
- {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Debug.Build.0 = Debug|Win32
- {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Release.ActiveCfg = Release|Win32
- {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Release.Build.0 = Release|Win32
- {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.ActiveCfg = Debug|Win32
- {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.Build.0 = Debug|Win32
- {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.ActiveCfg = Release|Win32
- {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.Build.0 = Release|Win32
- {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
- {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
- {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
- {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
- {8A519DC3-6092-A4FE-F748-BA91328D6522}.Debug.ActiveCfg = Debug|Win32
- {8A519DC3-6092-A4FE-F748-BA91328D6522}.Debug.Build.0 = Debug|Win32
- {8A519DC3-6092-A4FE-F748-BA91328D6522}.Release.ActiveCfg = Release|Win32
- {8A519DC3-6092-A4FE-F748-BA91328D6522}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Release.Build.0 = Release|Win32
- {58C183CE-6203-FE12-A237-BA8976695960}.Debug.ActiveCfg = Debug|Win32
- {58C183CE-6203-FE12-A237-BA8976695960}.Debug.Build.0 = Debug|Win32
- {58C183CE-6203-FE12-A237-BA8976695960}.Release.ActiveCfg = Release|Win32
- {58C183CE-6203-FE12-A237-BA8976695960}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Release.Build.0 = Release|Win32
- {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Debug.ActiveCfg = Debug|Win32
- {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Debug.Build.0 = Debug|Win32
- {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Release.ActiveCfg = Release|Win32
- {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Release.Build.0 = Release|Win32
- {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Debug.ActiveCfg = Debug|Win32
- {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Debug.Build.0 = Debug|Win32
- {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Release.ActiveCfg = Release|Win32
- {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Release.Build.0 = Release|Win32
- {58C1B183-9026-4E12-00F2-001200540054}.Debug.ActiveCfg = Debug|Win32
- {58C1B183-9026-4E12-00F2-001200540054}.Debug.Build.0 = Debug|Win32
- {58C1B183-9026-4E12-00F2-001200540054}.Release.ActiveCfg = Release|Win32
- {58C1B183-9026-4E12-00F2-001200540054}.Release.Build.0 = Release|Win32
- {5E18CC83-6092-48FE-A677-B832A0D3A650}.Debug.ActiveCfg = Debug|Win32
- {5E18CC83-6092-48FE-A677-B832A0D3A650}.Debug.Build.0 = Debug|Win32
- {5E18CC83-6092-48FE-A677-B832A0D3A650}.Release.ActiveCfg = Release|Win32
- {5E18CC83-6092-48FE-A677-B832A0D3A650}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Release.Build.0 = Release|Win32
- {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Debug.Build.0 = Debug|Win32
- {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Release.ActiveCfg = Release|Win32
- {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Release.Build.0 = Release|Win32
- {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Debug.ActiveCfg = Debug|Win32
- {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Debug.Build.0 = Debug|Win32
- {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Release.ActiveCfg = Release|Win32
- {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Release.Build.0 = Release|Win32
- {58C1B183-9260-4E8F-F200-000000000041}.Debug.ActiveCfg = Debug|Win32
- {58C1B183-9260-4E8F-F200-000000000041}.Debug.Build.0 = Debug|Win32
- {58C1B183-9260-4E8F-F200-000000000041}.Release.ActiveCfg = Release|Win32
- {58C1B183-9260-4E8F-F200-000000000041}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A677-BA0D3A832640}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A677-BA0D3A832640}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A677-BA0D3A832640}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A677-BA0D3A832640}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Release.Build.0 = Release|Win32
- {5821C383-6092-12FE-A877-BA0D33467633}.Debug.ActiveCfg = Debug|Win32
- {5821C383-6092-12FE-A877-BA0D33467633}.Debug.Build.0 = Debug|Win32
- {5821C383-6092-12FE-A877-BA0D33467633}.Release.ActiveCfg = Release|Win32
- {5821C383-6092-12FE-A877-BA0D33467633}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Release.Build.0 = Release|Win32
- {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Debug.ActiveCfg = Debug|Win32
- {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Debug.Build.0 = Debug|Win32
- {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Release.ActiveCfg = Release|Win32
- {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Release.Build.0 = Release|Win32
- {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Debug.ActiveCfg = Debug|Win32
- {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Debug.Build.0 = Debug|Win32
- {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Release.ActiveCfg = Release|Win32
- {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Release.Build.0 = Release|Win32
- {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Debug.ActiveCfg = Debug|Win32
- {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Debug.Build.0 = Debug|Win32
- {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Release.ActiveCfg = Release|Win32
- {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Release.Build.0 = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Debug.ActiveCfg = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Debug.Build.0 = Debug|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Release.ActiveCfg = Release|Win32
- {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Release.Build.0 = Release|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A27}.Debug.ActiveCfg = Debug|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A27}.Debug.Build.0 = Debug|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A27}.Release.ActiveCfg = Release|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A27}.Release.Build.0 = Release|Win32
- {0000058C-0000-0000-0000-000000000021}.Debug.ActiveCfg = Debug|Win32
- {0000058C-0000-0000-0000-000000000021}.Debug.Build.0 = Debug|Win32
- {0000058C-0000-0000-0000-000000000021}.Release.ActiveCfg = Release|Win32
- {0000058C-0000-0000-0000-000000000021}.Release.Build.0 = Release|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A14}.Debug.ActiveCfg = Debug|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A14}.Debug.Build.0 = Debug|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A14}.Release.ActiveCfg = Release|Win32
- {83581CCE-487E-3292-A4E7-BA07926D3A14}.Release.Build.0 = Release|Win32
- {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Debug.ActiveCfg = Debug|Win32
- {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Debug.Build.0 = Debug|Win32
- {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Release.ActiveCfg = Release|Win32
- {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Release.Build.0 = Release|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.ActiveCfg = Debug|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.Build.0 = Debug|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.ActiveCfg = Release|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.Build.0 = Release|Win32
- {5189DEA3-3261-F33E-47ED-83BC69F66061}.Debug.ActiveCfg = Debug|Win32
- {5189DEA3-3261-F33E-47ED-83BC69F66061}.Debug.Build.0 = Debug|Win32
- {5189DEA3-3261-F33E-47ED-83BC69F66061}.Release.ActiveCfg = Release|Win32
- {5189DEA3-3261-F33E-47ED-83BC69F66061}.Release.Build.0 = Release|Win32
- {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Debug.ActiveCfg = Debug|Win32
- {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Debug.Build.0 = Debug|Win32
- {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Release.ActiveCfg = Release|Win32
- {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Release.Build.0 = Release|Win32
- {4E887AC3-F8EA-6923-A744-C264A398C913}.Debug.ActiveCfg = Debug|Win32
- {4E887AC3-F8EA-6923-A744-C264A398C913}.Debug.Build.0 = Debug|Win32
- {4E887AC3-F8EA-6923-A744-C264A398C913}.Release.ActiveCfg = Release|Win32
- {4E887AC3-F8EA-6923-A744-C264A398C913}.Release.Build.0 = Release|Win32
- {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Debug.ActiveCfg = Debug|Win32
- {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Debug.Build.0 = Debug|Win32
- {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Release.ActiveCfg = Release|Win32
- {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Release.Build.0 = Release|Win32
- {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Debug.ActiveCfg = Debug|Win32
- {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Debug.Build.0 = Debug|Win32
- {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Release.ActiveCfg = Release|Win32
- {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Release.Build.0 = Release|Win32
- {58DF28E3-0926-F47A-E28A-B03A4D619631}.Debug.ActiveCfg = Debug|Win32
- {58DF28E3-0926-F47A-E28A-B03A4D619631}.Debug.Build.0 = Debug|Win32
- {58DF28E3-0926-F47A-E28A-B03A4D619631}.Release.ActiveCfg = Release|Win32
- {58DF28E3-0926-F47A-E28A-B03A4D619631}.Release.Build.0 = Release|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.ActiveCfg = Debug|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.Build.0 = Debug|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.ActiveCfg = Release|Win32
- {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.Build.0 = Release|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.ActiveCfg = Debug|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.Build.0 = Debug|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.ActiveCfg = Release|Win32
- {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_memory_mapping_test", "shared_memory_mappable_test.vcproj", "{5CE18C83-6025-36FE-A4F7-BA09176D3A11}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_memory_test", "shared_memory_test.vcproj", "{5E2838CC-0916-8F4E-A4F7-93506BA0D310}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared_ptr_test", "shared_ptr_test.vcproj", "{5371C383-6092-1238-A877-BAEB37867609}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slist_test", "slist_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792608}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "string_test", "string_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D4A792607}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tree_test", "tree_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792606}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "upgradable_mutex_test", "upgradable_mutex.vcproj", "{4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "user_buffer_test", "user_buffer_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792603}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vectorstream_test", "vectorstream_test.vcproj", "{58CCE183-6032-12FE-A4F7-BA893A767601}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vector_test", "vector_test.vcproj", "{5CE11C83-096A-84FE-4FA2-D3A6BA792002}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_condition_test", "named_condition_test.vcproj", "{58CC2563-6092-48FE-FAF7-BA046A792658}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_mutexA", "doc_anonymous_mutexA.vcproj", "{58C1B183-9026-4E63-12F2-005412200054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_mutexB", "doc_anonymous_mutexB.vcproj", "{58C1B183-9026-4E63-12F2-005202441254}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_mutex", "doc_named_mutex.vcproj", "{58C181B3-9516-463E-2F12-122155400054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_conditionA", "doc_anonymous_conditionA.vcproj", "{5C1B8183-0296-4F83-1F22-001005220544}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_conditionB", "doc_anonymous_conditionB.vcproj", "{58C1FE83-2906-E643-2F12-024410052254}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_conditionA", "doc_named_conditionA.vcproj", "{58EB1CB3-1354-364E-12F2-154356612054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_conditionB", "doc_named_conditionB.vcproj", "{58181CB3-5134-634E-12F2-155435622054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_semaphoreA", "doc_anonymous_semaphoreA.vcproj", "{5CB81183-29FB-F843-24FF-022050100544}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_semaphoreB", "doc_anonymous_semaphoreB.vcproj", "{58FBE8C3-9026-FAB2-E643-000522441254}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_upgradable_mutex_test", "named_upgradable_mutex.vcproj", "{48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_upgradable_mutexA", "doc_anonymous_upgradable_mutexA.vcproj", "{5C18831B-F162-FA96-E6C3-FA5122040054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_upgradable_mutexB", "doc_anonymous_upgradable_mutexB.vcproj", "{5C1B1043-1EFF-2793-4E63-245241283054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_message_queueA", "doc_message_queueA.vcproj", "{51B189C3-4E63-9026-12F2-12200AF54054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_message_queueB", "doc_message_queueB.vcproj", "{5C1B1813-12C2-0296-4E63-244549126520}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_cont", "doc_cont.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792653}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_contA", "doc_contA.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792652}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_contB", "doc_contB.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792651}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_memory", "doc_shared_memory.vcproj", "{58CCE183-6032-12FE-4FC7-83A79F760B61}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unique_ptr_test", "unique_ptr_test.vcproj", "{571C3383-6092-A877-1238-B3786BAE7605}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_move_containers", "doc_move_containers.vcproj", "{58C1B183-0296-EA42-EF04-005120054104}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map_index_allocation_test", "map_index_allocation_test.vcproj", "{588CCD13-2962-83FE-F4B7-92230DB73629}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flat_map_index_allocation_test", "flat_map_index_allocation_test.vcproj", "{51D8E9C3-2D65-48FE-3AA7-7922C0E36329}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iset_index_allocation_test", "iset_index_allocation_test.vcproj", "{58BD1CC3-6972-F3F7-84BE-0DB736035922}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iunordered_set_index_allocation_test", "iunordered_set_index_allocation_test.vcproj", "{5BD1C7C3-3F7F-6972-84BE-B731D9236035}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_memory2", "doc_shared_memory2.vcproj", "{58CE1D83-F31E-4FD7-6132-8A79F6307B61}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_file_mapping2", "doc_file_mapping2.vcproj", "{5CE19883-F413-7EFD-6342-B79639F7B611}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_file_mapping", "doc_file_mapping.vcproj", "{58DE18C3-3261-2F3E-FD47-83760B9FA761}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_map", "doc_map.vcproj", "{59CEC183-8192-8F6D-4FB7-BA260A79D352}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windows_shared_memory_test", "windows_shared_memory_test.vcproj", "{E385C28C-0691-4FA7-F48E-935BA0D06310}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windows_shared_memory_mapping_test", "windows_shared_memory_mapping_test.vcproj", "{518CE8C3-6512-FA75-46EF-B917A3A116D1}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed_windows_shared_memory_test", "managed_windows_shared_memory.vcproj", "{5D18CE83-1926-7AE4-FE94-B606D9B23131}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adaptive_pool_test", "adaptive_pool_test.vcproj", "{58CE1D84-1962-4FE9-BA0D-A4F7973A4652}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cached_adaptive_pool_test", "cached_adaptive_pool_test.vcproj", "{5188E3CE-2964-F43E-FB87-B037AC692D59}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "private_adaptive_pool_test", "private_adaptive_pool_test.vcproj", "{5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_allocator", "doc_allocator.vcproj", "{581B1C83-4E12-9526-020F-012482540054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_node_allocator", "doc_node_allocator.vcproj", "{51B17C83-E172-5396-0FA2-825472008554}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_private_node_allocator", "doc_private_node_allocator.vcproj", "{2B75C833-17D2-4956-A23F-820854254175}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_cached_node_allocator", "doc_cached_node_allocator.vcproj", "{283AD375-7D12-5866-23BF-854308651275}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_adaptive_pool", "doc_adaptive_pool.vcproj", "{57C832B1-17D2-9537-FA12-827220448554}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_cached_adaptive_pool", "doc_cached_adaptive_pool.vcproj", "{536C8251-7E12-9537-A1E2-822073258554}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_private_adaptive_pool", "doc_private_adaptive_pool.vcproj", "{83258CB1-127E-9375-F872-8324A1054454}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_raw_allocation", "doc_managed_raw_allocation.vcproj", "{5198EFC3-2731-F34E-4FD8-1859AC94F761}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_aligned_allocation", "doc_managed_aligned_allocation.vcproj", "{58DE18C3-3261-2F3E-FD47-83760B9FA761}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_interprocesslib", "interprocesslib.vcproj", "{FFAA56F1-32EC-4B22-B6BD-95A311A67C35}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_windows_shared_memory", "doc_windows_shared_memory.vcproj", "{5E17C9C3-1362-2E1E-C84F-8A76B6739F21}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_windows_shared_memory2", "doc_windows_shared_memory2.vcproj", "{5E1D6C83-31DE-4F6F-6132-87A9FB663041}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adaptive_node_pool_test", "adaptive_node_pool_test.vcproj", "{CD57C283-1862-42FE-BF87-B96D3A2A7912}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "node_pool_test", "node_pool_test.vcproj", "{8A519DC3-6092-A4FE-F748-BA91328D6522}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "deque_test", "deque_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792655}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "barrier_test", "barrier_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792661}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bufferstream_test", "bufferstream_test.vcproj", "{58C183CE-6203-FE12-A237-BA8976695960}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cached_node_allocator_test", "cached_node_allocator_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792659}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "private_node_allocator_test", "private_node_allocator_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792620}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "node_allocator_test", "node_allocator_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792622}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_mutex_test", "named_mutex_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792625}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_recursive_mutex_test", "named_recursive_mutex_test.vcproj", "{5C83CE18-4F48-A7FE-6092-B7920AD3A624}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named_semaphore_test", "named_semaphore_test.vcproj", "{58CCE283-1609-48FE-A4F7-BA0D3A793523}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_heap_memory", "doc_managed_heap_memory.vcproj", "{58CCE183-6092-48FE-A4FC-BA0D3A792647}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allocexcept_test", "allocexcept_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792662}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "condition_test", "condition_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792658}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "data_test", "data_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792657}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_bufferstream", "doc_bufferstream.vcproj", "{58C1B183-9026-4E12-00F2-001200540054}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_intrusive", "doc_intrusive.vcproj", "{5E18CC83-6092-48FE-A677-B832A0D3A650}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_ipc_messageA", "doc_ipc_messageA.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792649}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_ipc_messageB", "doc_ipc_messageB.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792648}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_mapped_file", "doc_managed_mapped_file.vcproj", "{58CCE183-5091-48FE-A4FC-BA0D3A792446}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_allocA", "doc_named_allocA.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792645}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_named_allocB", "doc_named_allocB.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792644}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_offset_ptr", "doc_offset_ptr.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792643}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_scoped_ptr", "doc_scoped_ptr.vcproj", "{58CC8E13-0962-8F4E-77A6-BD3A6832A042}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_vectorstream", "doc_vectorstream.vcproj", "{58C1B183-9260-4E8F-F200-000000000041}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_where_allocate", "doc_where_allocate.vcproj", "{58CCE183-6092-48FE-A677-BA0D3A832640}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file_mapping_test", "file_mapping_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792638}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flat_tree_test", "flat_tree_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792637}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intrusive_ptr_test", "intrusive_ptr_test.vcproj", "{5821C383-6092-12FE-A877-BA0D33467633}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "list_test", "list_ex.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792632}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed_mapped_file_test", "managed_mapped_file_test.vcproj", "{5CCE1883-0926-F7A4-8FE4-BA0606D92331}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapped_file_test", "mapped_file_test.vcproj", "{5C6D9CE1-2609-F7A4-8FE4-BA0883602330}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "memory_algorithm_test", "memory_algorithm_test.vcproj", "{58E18CC3-6092-8F4E-A3E7-A792230D3629}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "message_queue_test", "message_queue.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792628}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mutex_test", "mutex_test.vcproj", "{83581CCE-487E-3292-A4E7-BA07926D3A27}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "null_index_test", "null_index_test.vcproj", "{0000058C-0000-0000-0000-000000000021}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "recursive_mutex_test", "recursive_mutex_test.vcproj", "{83581CCE-487E-3292-A4E7-BA07926D3A14}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "semaphore_test", "semaphore_test.vcproj", "{5CE28C83-48FE-1676-4FA7-B50D3A76A013}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_multiple_allocation", "doc_managed_multiple_allocation.vcproj", "{818C43EE-3561-F3AE-4FD7-8A2076E76A31}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_allocation_command", "doc_managed_allocation_command.vcproj", "{5189DEA3-3261-F33E-47ED-83BC69F66061}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_construction_info", "doc_managed_construction_info.vcproj", "{5C82D1D3-3861-3AF1-03EF-89AED4716761}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_ptr_explicit", "doc_shared_ptr_explicit.vcproj", "{4E887AC3-F8EA-6923-A744-C264A398C913}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_unique_ptr", "doc_unique_ptr.vcproj", "{589C2EB3-8A57-1862-F4EA-A6B14C7329A3}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_shared_ptr", "doc_shared_ptr.vcproj", "{51CE89A3-6092-F4EA-48A7-B4B9AC326093}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "managed_shared_memory_test", "managed_shared_memory.vcproj", "{58DF28E3-0926-F47A-E28A-B03A4D619631}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_grow", "doc_managed_grow.vcproj", "{818C43EE-3561-F3AE-4FD7-8A2076E76A31}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "offset_ptr_test", "offset_ptr_test.vcproj", "{5CE11C83-096A-84FE-4FA2-D3A6BA792002}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_anonymous_shared_memory", "doc_anonymous_shared_memory.vcproj", "{6DE178C3-12FE-6032-4FC7-879B63B9F651}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "anonymous_shared_memory_test", "anonymous_shared_memory_test.vcproj", "{58DE8A13-4FA7-6252-36FE-B3A0A6D92812}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_unordered_map", "doc_unordered_map.vcproj", "{9C185DF3-B75F-1928-8F6D-735108AABE62}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_multi_index", "doc_multi_index.vcproj", "{918C5DF3-1928-B73F-F626-7358518CBE62}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_test", "unordered_test.vcproj", "{C3CE1183-09F2-A46A-4FE6-D06BA7923A02}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multi_index_test", "multi_index_test.vcproj", "{9285DFD3-1928-F662-CB73-73518CB53A62}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file_lock_test", "file_lock_test.vcproj", "{58CCE183-6092-48FE-A4F7-BA0D3A792639}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intersegment_ptr_test", "intersegment_ptr_test.vcproj", "{5E81CD01-4FA2-2A96-84FE-DA631CA20962}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_managed_copy_on_write", "doc_managed_copy_on_write.vcproj", "{8E0C437E-3613-FD46-F3AE-876A0731CA85}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "enable_shared_from_this_test", "enable_shared_from_this_test.vcproj", "{571C3483-87C7-6921-1238-B086B3E766C9}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "doc_complex_map", "doc_complex_map.vcproj", "{5C19CF83-4FB7-8219-8F6D-3BA9D2715A22}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Debug.ActiveCfg = Debug|Win32
+ {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Debug.Build.0 = Debug|Win32
+ {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Release.ActiveCfg = Release|Win32
+ {5CE18C83-6025-36FE-A4F7-BA09176D3A11}.Release.Build.0 = Release|Win32
+ {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Debug.ActiveCfg = Debug|Win32
+ {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Debug.Build.0 = Debug|Win32
+ {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Release.ActiveCfg = Release|Win32
+ {5E2838CC-0916-8F4E-A4F7-93506BA0D310}.Release.Build.0 = Release|Win32
+ {5371C383-6092-1238-A877-BAEB37867609}.Debug.ActiveCfg = Debug|Win32
+ {5371C383-6092-1238-A877-BAEB37867609}.Debug.Build.0 = Debug|Win32
+ {5371C383-6092-1238-A877-BAEB37867609}.Release.ActiveCfg = Release|Win32
+ {5371C383-6092-1238-A877-BAEB37867609}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792608}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D4A792607}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792606}.Release.Build.0 = Release|Win32
+ {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Debug.ActiveCfg = Debug|Win32
+ {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Debug.Build.0 = Debug|Win32
+ {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Release.ActiveCfg = Release|Win32
+ {4E88C1C2-0961-F7A4-F48E-A6A7D3B06004}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792603}.Release.Build.0 = Release|Win32
+ {58CCE183-6032-12FE-A4F7-BA893A767601}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6032-12FE-A4F7-BA893A767601}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6032-12FE-A4F7-BA893A767601}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6032-12FE-A4F7-BA893A767601}.Release.Build.0 = Release|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.ActiveCfg = Debug|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.Build.0 = Debug|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.ActiveCfg = Release|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.Build.0 = Release|Win32
+ {58CC2563-6092-48FE-FAF7-BA046A792658}.Debug.ActiveCfg = Debug|Win32
+ {58CC2563-6092-48FE-FAF7-BA046A792658}.Debug.Build.0 = Debug|Win32
+ {58CC2563-6092-48FE-FAF7-BA046A792658}.Release.ActiveCfg = Release|Win32
+ {58CC2563-6092-48FE-FAF7-BA046A792658}.Release.Build.0 = Release|Win32
+ {58C1B183-9026-4E63-12F2-005412200054}.Debug.ActiveCfg = Debug|Win32
+ {58C1B183-9026-4E63-12F2-005412200054}.Debug.Build.0 = Debug|Win32
+ {58C1B183-9026-4E63-12F2-005412200054}.Release.ActiveCfg = Release|Win32
+ {58C1B183-9026-4E63-12F2-005412200054}.Release.Build.0 = Release|Win32
+ {58C1B183-9026-4E63-12F2-005202441254}.Debug.ActiveCfg = Debug|Win32
+ {58C1B183-9026-4E63-12F2-005202441254}.Debug.Build.0 = Debug|Win32
+ {58C1B183-9026-4E63-12F2-005202441254}.Release.ActiveCfg = Release|Win32
+ {58C1B183-9026-4E63-12F2-005202441254}.Release.Build.0 = Release|Win32
+ {58C181B3-9516-463E-2F12-122155400054}.Debug.ActiveCfg = Debug|Win32
+ {58C181B3-9516-463E-2F12-122155400054}.Debug.Build.0 = Debug|Win32
+ {58C181B3-9516-463E-2F12-122155400054}.Release.ActiveCfg = Release|Win32
+ {58C181B3-9516-463E-2F12-122155400054}.Release.Build.0 = Release|Win32
+ {5C1B8183-0296-4F83-1F22-001005220544}.Debug.ActiveCfg = Debug|Win32
+ {5C1B8183-0296-4F83-1F22-001005220544}.Debug.Build.0 = Debug|Win32
+ {5C1B8183-0296-4F83-1F22-001005220544}.Release.ActiveCfg = Release|Win32
+ {5C1B8183-0296-4F83-1F22-001005220544}.Release.Build.0 = Release|Win32
+ {58C1FE83-2906-E643-2F12-024410052254}.Debug.ActiveCfg = Debug|Win32
+ {58C1FE83-2906-E643-2F12-024410052254}.Debug.Build.0 = Debug|Win32
+ {58C1FE83-2906-E643-2F12-024410052254}.Release.ActiveCfg = Release|Win32
+ {58C1FE83-2906-E643-2F12-024410052254}.Release.Build.0 = Release|Win32
+ {58EB1CB3-1354-364E-12F2-154356612054}.Debug.ActiveCfg = Debug|Win32
+ {58EB1CB3-1354-364E-12F2-154356612054}.Debug.Build.0 = Debug|Win32
+ {58EB1CB3-1354-364E-12F2-154356612054}.Release.ActiveCfg = Release|Win32
+ {58EB1CB3-1354-364E-12F2-154356612054}.Release.Build.0 = Release|Win32
+ {58181CB3-5134-634E-12F2-155435622054}.Debug.ActiveCfg = Debug|Win32
+ {58181CB3-5134-634E-12F2-155435622054}.Debug.Build.0 = Debug|Win32
+ {58181CB3-5134-634E-12F2-155435622054}.Release.ActiveCfg = Release|Win32
+ {58181CB3-5134-634E-12F2-155435622054}.Release.Build.0 = Release|Win32
+ {5CB81183-29FB-F843-24FF-022050100544}.Debug.ActiveCfg = Debug|Win32
+ {5CB81183-29FB-F843-24FF-022050100544}.Debug.Build.0 = Debug|Win32
+ {5CB81183-29FB-F843-24FF-022050100544}.Release.ActiveCfg = Release|Win32
+ {5CB81183-29FB-F843-24FF-022050100544}.Release.Build.0 = Release|Win32
+ {58FBE8C3-9026-FAB2-E643-000522441254}.Debug.ActiveCfg = Debug|Win32
+ {58FBE8C3-9026-FAB2-E643-000522441254}.Debug.Build.0 = Debug|Win32
+ {58FBE8C3-9026-FAB2-E643-000522441254}.Release.ActiveCfg = Release|Win32
+ {58FBE8C3-9026-FAB2-E643-000522441254}.Release.Build.0 = Release|Win32
+ {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Debug.ActiveCfg = Debug|Win32
+ {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Debug.Build.0 = Debug|Win32
+ {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Release.ActiveCfg = Release|Win32
+ {48C1FBE8-F7A4-0961-48FE-7D93A63B0A04}.Release.Build.0 = Release|Win32
+ {5C18831B-F162-FA96-E6C3-FA5122040054}.Debug.ActiveCfg = Debug|Win32
+ {5C18831B-F162-FA96-E6C3-FA5122040054}.Debug.Build.0 = Debug|Win32
+ {5C18831B-F162-FA96-E6C3-FA5122040054}.Release.ActiveCfg = Release|Win32
+ {5C18831B-F162-FA96-E6C3-FA5122040054}.Release.Build.0 = Release|Win32
+ {5C1B1043-1EFF-2793-4E63-245241283054}.Debug.ActiveCfg = Debug|Win32
+ {5C1B1043-1EFF-2793-4E63-245241283054}.Debug.Build.0 = Debug|Win32
+ {5C1B1043-1EFF-2793-4E63-245241283054}.Release.ActiveCfg = Release|Win32
+ {5C1B1043-1EFF-2793-4E63-245241283054}.Release.Build.0 = Release|Win32
+ {51B189C3-4E63-9026-12F2-12200AF54054}.Debug.ActiveCfg = Debug|Win32
+ {51B189C3-4E63-9026-12F2-12200AF54054}.Debug.Build.0 = Debug|Win32
+ {51B189C3-4E63-9026-12F2-12200AF54054}.Release.ActiveCfg = Release|Win32
+ {51B189C3-4E63-9026-12F2-12200AF54054}.Release.Build.0 = Release|Win32
+ {5C1B1813-12C2-0296-4E63-244549126520}.Debug.ActiveCfg = Debug|Win32
+ {5C1B1813-12C2-0296-4E63-244549126520}.Debug.Build.0 = Debug|Win32
+ {5C1B1813-12C2-0296-4E63-244549126520}.Release.ActiveCfg = Release|Win32
+ {5C1B1813-12C2-0296-4E63-244549126520}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792653}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792652}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792651}.Release.Build.0 = Release|Win32
+ {58CCE183-6032-12FE-4FC7-83A79F760B61}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6032-12FE-4FC7-83A79F760B61}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6032-12FE-4FC7-83A79F760B61}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6032-12FE-4FC7-83A79F760B61}.Release.Build.0 = Release|Win32
+ {571C3383-6092-A877-1238-B3786BAE7605}.Debug.ActiveCfg = Debug|Win32
+ {571C3383-6092-A877-1238-B3786BAE7605}.Debug.Build.0 = Debug|Win32
+ {571C3383-6092-A877-1238-B3786BAE7605}.Release.ActiveCfg = Release|Win32
+ {571C3383-6092-A877-1238-B3786BAE7605}.Release.Build.0 = Release|Win32
+ {58C1B183-0296-EA42-EF04-005120054104}.Debug.ActiveCfg = Debug|Win32
+ {58C1B183-0296-EA42-EF04-005120054104}.Debug.Build.0 = Debug|Win32
+ {58C1B183-0296-EA42-EF04-005120054104}.Release.ActiveCfg = Release|Win32
+ {58C1B183-0296-EA42-EF04-005120054104}.Release.Build.0 = Release|Win32
+ {588CCD13-2962-83FE-F4B7-92230DB73629}.Debug.ActiveCfg = Debug|Win32
+ {588CCD13-2962-83FE-F4B7-92230DB73629}.Debug.Build.0 = Debug|Win32
+ {588CCD13-2962-83FE-F4B7-92230DB73629}.Release.ActiveCfg = Release|Win32
+ {588CCD13-2962-83FE-F4B7-92230DB73629}.Release.Build.0 = Release|Win32
+ {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.ActiveCfg = Debug|Win32
+ {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Debug.Build.0 = Debug|Win32
+ {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.ActiveCfg = Release|Win32
+ {51D8E9C3-2D65-48FE-3AA7-7922C0E36329}.Release.Build.0 = Release|Win32
+ {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Debug.ActiveCfg = Debug|Win32
+ {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Debug.Build.0 = Debug|Win32
+ {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Release.ActiveCfg = Release|Win32
+ {58BD1CC3-6972-F3F7-84BE-0DB736035922}.Release.Build.0 = Release|Win32
+ {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Debug.ActiveCfg = Debug|Win32
+ {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Debug.Build.0 = Debug|Win32
+ {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Release.ActiveCfg = Release|Win32
+ {5BD1C7C3-3F7F-6972-84BE-B731D9236035}.Release.Build.0 = Release|Win32
+ {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Debug.ActiveCfg = Debug|Win32
+ {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Debug.Build.0 = Debug|Win32
+ {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Release.ActiveCfg = Release|Win32
+ {58CE1D83-F31E-4FD7-6132-8A79F6307B61}.Release.Build.0 = Release|Win32
+ {5CE19883-F413-7EFD-6342-B79639F7B611}.Debug.ActiveCfg = Debug|Win32
+ {5CE19883-F413-7EFD-6342-B79639F7B611}.Debug.Build.0 = Debug|Win32
+ {5CE19883-F413-7EFD-6342-B79639F7B611}.Release.ActiveCfg = Release|Win32
+ {5CE19883-F413-7EFD-6342-B79639F7B611}.Release.Build.0 = Release|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.ActiveCfg = Debug|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.Build.0 = Debug|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.ActiveCfg = Release|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.Build.0 = Release|Win32
+ {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Debug.ActiveCfg = Debug|Win32
+ {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Debug.Build.0 = Debug|Win32
+ {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Release.ActiveCfg = Release|Win32
+ {59CEC183-8192-8F6D-4FB7-BA260A79D352}.Release.Build.0 = Release|Win32
+ {E385C28C-0691-4FA7-F48E-935BA0D06310}.Debug.ActiveCfg = Debug|Win32
+ {E385C28C-0691-4FA7-F48E-935BA0D06310}.Debug.Build.0 = Debug|Win32
+ {E385C28C-0691-4FA7-F48E-935BA0D06310}.Release.ActiveCfg = Release|Win32
+ {E385C28C-0691-4FA7-F48E-935BA0D06310}.Release.Build.0 = Release|Win32
+ {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Debug.ActiveCfg = Debug|Win32
+ {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Debug.Build.0 = Debug|Win32
+ {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Release.ActiveCfg = Release|Win32
+ {518CE8C3-6512-FA75-46EF-B917A3A116D1}.Release.Build.0 = Release|Win32
+ {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Debug.ActiveCfg = Debug|Win32
+ {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Debug.Build.0 = Debug|Win32
+ {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Release.ActiveCfg = Release|Win32
+ {5D18CE83-1926-7AE4-FE94-B606D9B23131}.Release.Build.0 = Release|Win32
+ {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Debug.ActiveCfg = Debug|Win32
+ {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Debug.Build.0 = Debug|Win32
+ {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Release.ActiveCfg = Release|Win32
+ {58CE1D84-1962-4FE9-BA0D-A4F7973A4652}.Release.Build.0 = Release|Win32
+ {5188E3CE-2964-F43E-FB87-B037AC692D59}.Debug.ActiveCfg = Debug|Win32
+ {5188E3CE-2964-F43E-FB87-B037AC692D59}.Debug.Build.0 = Debug|Win32
+ {5188E3CE-2964-F43E-FB87-B037AC692D59}.Release.ActiveCfg = Release|Win32
+ {5188E3CE-2964-F43E-FB87-B037AC692D59}.Release.Build.0 = Release|Win32
+ {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Debug.ActiveCfg = Debug|Win32
+ {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Debug.Build.0 = Debug|Win32
+ {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Release.ActiveCfg = Release|Win32
+ {5CE14C83-4962-8F5E-4FA7-B0D3A7B93635}.Release.Build.0 = Release|Win32
+ {581B1C83-4E12-9526-020F-012482540054}.Debug.ActiveCfg = Debug|Win32
+ {581B1C83-4E12-9526-020F-012482540054}.Debug.Build.0 = Debug|Win32
+ {581B1C83-4E12-9526-020F-012482540054}.Release.ActiveCfg = Release|Win32
+ {581B1C83-4E12-9526-020F-012482540054}.Release.Build.0 = Release|Win32
+ {51B17C83-E172-5396-0FA2-825472008554}.Debug.ActiveCfg = Debug|Win32
+ {51B17C83-E172-5396-0FA2-825472008554}.Debug.Build.0 = Debug|Win32
+ {51B17C83-E172-5396-0FA2-825472008554}.Release.ActiveCfg = Release|Win32
+ {51B17C83-E172-5396-0FA2-825472008554}.Release.Build.0 = Release|Win32
+ {2B75C833-17D2-4956-A23F-820854254175}.Debug.ActiveCfg = Debug|Win32
+ {2B75C833-17D2-4956-A23F-820854254175}.Debug.Build.0 = Debug|Win32
+ {2B75C833-17D2-4956-A23F-820854254175}.Release.ActiveCfg = Release|Win32
+ {2B75C833-17D2-4956-A23F-820854254175}.Release.Build.0 = Release|Win32
+ {283AD375-7D12-5866-23BF-854308651275}.Debug.ActiveCfg = Debug|Win32
+ {283AD375-7D12-5866-23BF-854308651275}.Debug.Build.0 = Debug|Win32
+ {283AD375-7D12-5866-23BF-854308651275}.Release.ActiveCfg = Release|Win32
+ {283AD375-7D12-5866-23BF-854308651275}.Release.Build.0 = Release|Win32
+ {57C832B1-17D2-9537-FA12-827220448554}.Debug.ActiveCfg = Debug|Win32
+ {57C832B1-17D2-9537-FA12-827220448554}.Debug.Build.0 = Debug|Win32
+ {57C832B1-17D2-9537-FA12-827220448554}.Release.ActiveCfg = Release|Win32
+ {57C832B1-17D2-9537-FA12-827220448554}.Release.Build.0 = Release|Win32
+ {536C8251-7E12-9537-A1E2-822073258554}.Debug.ActiveCfg = Debug|Win32
+ {536C8251-7E12-9537-A1E2-822073258554}.Debug.Build.0 = Debug|Win32
+ {536C8251-7E12-9537-A1E2-822073258554}.Release.ActiveCfg = Release|Win32
+ {536C8251-7E12-9537-A1E2-822073258554}.Release.Build.0 = Release|Win32
+ {83258CB1-127E-9375-F872-8324A1054454}.Debug.ActiveCfg = Debug|Win32
+ {83258CB1-127E-9375-F872-8324A1054454}.Debug.Build.0 = Debug|Win32
+ {83258CB1-127E-9375-F872-8324A1054454}.Release.ActiveCfg = Release|Win32
+ {83258CB1-127E-9375-F872-8324A1054454}.Release.Build.0 = Release|Win32
+ {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Debug.ActiveCfg = Debug|Win32
+ {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Debug.Build.0 = Debug|Win32
+ {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Release.ActiveCfg = Release|Win32
+ {5198EFC3-2731-F34E-4FD8-1859AC94F761}.Release.Build.0 = Release|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.ActiveCfg = Debug|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Debug.Build.0 = Debug|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.ActiveCfg = Release|Win32
+ {58DE18C3-3261-2F3E-FD47-83760B9FA761}.Release.Build.0 = Release|Win32
+ {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Debug.ActiveCfg = Debug|Win32
+ {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Debug.Build.0 = Debug|Win32
+ {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Release.ActiveCfg = Release|Win32
+ {FFAA56F1-32EC-4B22-B6BD-95A311A67C35}.Release.Build.0 = Release|Win32
+ {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Debug.ActiveCfg = Debug|Win32
+ {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Debug.Build.0 = Debug|Win32
+ {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Release.ActiveCfg = Release|Win32
+ {5E17C9C3-1362-2E1E-C84F-8A76B6739F21}.Release.Build.0 = Release|Win32
+ {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.ActiveCfg = Debug|Win32
+ {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Debug.Build.0 = Debug|Win32
+ {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.ActiveCfg = Release|Win32
+ {5E1D6C83-31DE-4F6F-6132-87A9FB663041}.Release.Build.0 = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.ActiveCfg = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Debug.Build.0 = Debug|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.ActiveCfg = Release|Win32
+ {CD57C283-1862-42FE-BF87-B96D3A2A7912}.Release.Build.0 = Release|Win32
+ {8A519DC3-6092-A4FE-F748-BA91328D6522}.Debug.ActiveCfg = Debug|Win32
+ {8A519DC3-6092-A4FE-F748-BA91328D6522}.Debug.Build.0 = Debug|Win32
+ {8A519DC3-6092-A4FE-F748-BA91328D6522}.Release.ActiveCfg = Release|Win32
+ {8A519DC3-6092-A4FE-F748-BA91328D6522}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792655}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792661}.Release.Build.0 = Release|Win32
+ {58C183CE-6203-FE12-A237-BA8976695960}.Debug.ActiveCfg = Debug|Win32
+ {58C183CE-6203-FE12-A237-BA8976695960}.Debug.Build.0 = Debug|Win32
+ {58C183CE-6203-FE12-A237-BA8976695960}.Release.ActiveCfg = Release|Win32
+ {58C183CE-6203-FE12-A237-BA8976695960}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792659}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792620}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792622}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792625}.Release.Build.0 = Release|Win32
+ {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Debug.ActiveCfg = Debug|Win32
+ {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Debug.Build.0 = Debug|Win32
+ {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Release.ActiveCfg = Release|Win32
+ {5C83CE18-4F48-A7FE-6092-B7920AD3A624}.Release.Build.0 = Release|Win32
+ {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Debug.ActiveCfg = Debug|Win32
+ {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Debug.Build.0 = Debug|Win32
+ {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Release.ActiveCfg = Release|Win32
+ {58CCE283-1609-48FE-A4F7-BA0D3A793523}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4FC-BA0D3A792647}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792662}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792658}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792657}.Release.Build.0 = Release|Win32
+ {58C1B183-9026-4E12-00F2-001200540054}.Debug.ActiveCfg = Debug|Win32
+ {58C1B183-9026-4E12-00F2-001200540054}.Debug.Build.0 = Debug|Win32
+ {58C1B183-9026-4E12-00F2-001200540054}.Release.ActiveCfg = Release|Win32
+ {58C1B183-9026-4E12-00F2-001200540054}.Release.Build.0 = Release|Win32
+ {5E18CC83-6092-48FE-A677-B832A0D3A650}.Debug.ActiveCfg = Debug|Win32
+ {5E18CC83-6092-48FE-A677-B832A0D3A650}.Debug.Build.0 = Debug|Win32
+ {5E18CC83-6092-48FE-A677-B832A0D3A650}.Release.ActiveCfg = Release|Win32
+ {5E18CC83-6092-48FE-A677-B832A0D3A650}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792649}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792648}.Release.Build.0 = Release|Win32
+ {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Debug.Build.0 = Debug|Win32
+ {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Release.ActiveCfg = Release|Win32
+ {58CCE183-5091-48FE-A4FC-BA0D3A792446}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792645}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792644}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792643}.Release.Build.0 = Release|Win32
+ {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Debug.ActiveCfg = Debug|Win32
+ {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Debug.Build.0 = Debug|Win32
+ {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Release.ActiveCfg = Release|Win32
+ {58CC8E13-0962-8F4E-77A6-BD3A6832A042}.Release.Build.0 = Release|Win32
+ {58C1B183-9260-4E8F-F200-000000000041}.Debug.ActiveCfg = Debug|Win32
+ {58C1B183-9260-4E8F-F200-000000000041}.Debug.Build.0 = Debug|Win32
+ {58C1B183-9260-4E8F-F200-000000000041}.Release.ActiveCfg = Release|Win32
+ {58C1B183-9260-4E8F-F200-000000000041}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A677-BA0D3A832640}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A677-BA0D3A832640}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A677-BA0D3A832640}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A677-BA0D3A832640}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792638}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792637}.Release.Build.0 = Release|Win32
+ {5821C383-6092-12FE-A877-BA0D33467633}.Debug.ActiveCfg = Debug|Win32
+ {5821C383-6092-12FE-A877-BA0D33467633}.Debug.Build.0 = Debug|Win32
+ {5821C383-6092-12FE-A877-BA0D33467633}.Release.ActiveCfg = Release|Win32
+ {5821C383-6092-12FE-A877-BA0D33467633}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792632}.Release.Build.0 = Release|Win32
+ {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Debug.ActiveCfg = Debug|Win32
+ {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Debug.Build.0 = Debug|Win32
+ {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Release.ActiveCfg = Release|Win32
+ {5CCE1883-0926-F7A4-8FE4-BA0606D92331}.Release.Build.0 = Release|Win32
+ {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Debug.ActiveCfg = Debug|Win32
+ {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Debug.Build.0 = Debug|Win32
+ {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Release.ActiveCfg = Release|Win32
+ {5C6D9CE1-2609-F7A4-8FE4-BA0883602330}.Release.Build.0 = Release|Win32
+ {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Debug.ActiveCfg = Debug|Win32
+ {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Debug.Build.0 = Debug|Win32
+ {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Release.ActiveCfg = Release|Win32
+ {58E18CC3-6092-8F4E-A3E7-A792230D3629}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792628}.Release.Build.0 = Release|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Debug.ActiveCfg = Debug|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Debug.Build.0 = Debug|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Release.ActiveCfg = Release|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A27}.Release.Build.0 = Release|Win32
+ {0000058C-0000-0000-0000-000000000021}.Debug.ActiveCfg = Debug|Win32
+ {0000058C-0000-0000-0000-000000000021}.Debug.Build.0 = Debug|Win32
+ {0000058C-0000-0000-0000-000000000021}.Release.ActiveCfg = Release|Win32
+ {0000058C-0000-0000-0000-000000000021}.Release.Build.0 = Release|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A14}.Debug.ActiveCfg = Debug|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A14}.Debug.Build.0 = Debug|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A14}.Release.ActiveCfg = Release|Win32
+ {83581CCE-487E-3292-A4E7-BA07926D3A14}.Release.Build.0 = Release|Win32
+ {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Debug.ActiveCfg = Debug|Win32
+ {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Debug.Build.0 = Debug|Win32
+ {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Release.ActiveCfg = Release|Win32
+ {5CE28C83-48FE-1676-4FA7-B50D3A76A013}.Release.Build.0 = Release|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.ActiveCfg = Debug|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.Build.0 = Debug|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.ActiveCfg = Release|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.Build.0 = Release|Win32
+ {5189DEA3-3261-F33E-47ED-83BC69F66061}.Debug.ActiveCfg = Debug|Win32
+ {5189DEA3-3261-F33E-47ED-83BC69F66061}.Debug.Build.0 = Debug|Win32
+ {5189DEA3-3261-F33E-47ED-83BC69F66061}.Release.ActiveCfg = Release|Win32
+ {5189DEA3-3261-F33E-47ED-83BC69F66061}.Release.Build.0 = Release|Win32
+ {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Debug.ActiveCfg = Debug|Win32
+ {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Debug.Build.0 = Debug|Win32
+ {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Release.ActiveCfg = Release|Win32
+ {5C82D1D3-3861-3AF1-03EF-89AED4716761}.Release.Build.0 = Release|Win32
+ {4E887AC3-F8EA-6923-A744-C264A398C913}.Debug.ActiveCfg = Debug|Win32
+ {4E887AC3-F8EA-6923-A744-C264A398C913}.Debug.Build.0 = Debug|Win32
+ {4E887AC3-F8EA-6923-A744-C264A398C913}.Release.ActiveCfg = Release|Win32
+ {4E887AC3-F8EA-6923-A744-C264A398C913}.Release.Build.0 = Release|Win32
+ {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Debug.ActiveCfg = Debug|Win32
+ {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Debug.Build.0 = Debug|Win32
+ {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Release.ActiveCfg = Release|Win32
+ {589C2EB3-8A57-1862-F4EA-A6B14C7329A3}.Release.Build.0 = Release|Win32
+ {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Debug.ActiveCfg = Debug|Win32
+ {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Debug.Build.0 = Debug|Win32
+ {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Release.ActiveCfg = Release|Win32
+ {51CE89A3-6092-F4EA-48A7-B4B9AC326093}.Release.Build.0 = Release|Win32
+ {58DF28E3-0926-F47A-E28A-B03A4D619631}.Debug.ActiveCfg = Debug|Win32
+ {58DF28E3-0926-F47A-E28A-B03A4D619631}.Debug.Build.0 = Debug|Win32
+ {58DF28E3-0926-F47A-E28A-B03A4D619631}.Release.ActiveCfg = Release|Win32
+ {58DF28E3-0926-F47A-E28A-B03A4D619631}.Release.Build.0 = Release|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.ActiveCfg = Debug|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Debug.Build.0 = Debug|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.ActiveCfg = Release|Win32
+ {818C43EE-3561-F3AE-4FD7-8A2076E76A31}.Release.Build.0 = Release|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.ActiveCfg = Debug|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Debug.Build.0 = Debug|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.ActiveCfg = Release|Win32
+ {5CE11C83-096A-84FE-4FA2-D3A6BA792002}.Release.Build.0 = Release|Win32
+ {6DE178C3-12FE-6032-4FC7-879B63B9F651}.Debug.ActiveCfg = Debug|Win32
+ {6DE178C3-12FE-6032-4FC7-879B63B9F651}.Debug.Build.0 = Debug|Win32
+ {6DE178C3-12FE-6032-4FC7-879B63B9F651}.Release.ActiveCfg = Release|Win32
+ {6DE178C3-12FE-6032-4FC7-879B63B9F651}.Release.Build.0 = Release|Win32
+ {58DE8A13-4FA7-6252-36FE-B3A0A6D92812}.Debug.ActiveCfg = Debug|Win32
+ {58DE8A13-4FA7-6252-36FE-B3A0A6D92812}.Debug.Build.0 = Debug|Win32
+ {58DE8A13-4FA7-6252-36FE-B3A0A6D92812}.Release.ActiveCfg = Release|Win32
+ {58DE8A13-4FA7-6252-36FE-B3A0A6D92812}.Release.Build.0 = Release|Win32
+ {9C185DF3-B75F-1928-8F6D-735108AABE62}.Debug.ActiveCfg = Debug|Win32
+ {9C185DF3-B75F-1928-8F6D-735108AABE62}.Debug.Build.0 = Debug|Win32
+ {9C185DF3-B75F-1928-8F6D-735108AABE62}.Release.ActiveCfg = Release|Win32
+ {9C185DF3-B75F-1928-8F6D-735108AABE62}.Release.Build.0 = Release|Win32
+ {918C5DF3-1928-B73F-F626-7358518CBE62}.Debug.ActiveCfg = Debug|Win32
+ {918C5DF3-1928-B73F-F626-7358518CBE62}.Debug.Build.0 = Debug|Win32
+ {918C5DF3-1928-B73F-F626-7358518CBE62}.Release.ActiveCfg = Release|Win32
+ {918C5DF3-1928-B73F-F626-7358518CBE62}.Release.Build.0 = Release|Win32
+ {C3CE1183-09F2-A46A-4FE6-D06BA7923A02}.Debug.ActiveCfg = Debug|Win32
+ {C3CE1183-09F2-A46A-4FE6-D06BA7923A02}.Debug.Build.0 = Debug|Win32
+ {C3CE1183-09F2-A46A-4FE6-D06BA7923A02}.Release.ActiveCfg = Release|Win32
+ {C3CE1183-09F2-A46A-4FE6-D06BA7923A02}.Release.Build.0 = Release|Win32
+ {9285DFD3-1928-F662-CB73-73518CB53A62}.Debug.ActiveCfg = Debug|Win32
+ {9285DFD3-1928-F662-CB73-73518CB53A62}.Debug.Build.0 = Debug|Win32
+ {9285DFD3-1928-F662-CB73-73518CB53A62}.Release.ActiveCfg = Release|Win32
+ {9285DFD3-1928-F662-CB73-73518CB53A62}.Release.Build.0 = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792639}.Debug.ActiveCfg = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792639}.Debug.Build.0 = Debug|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792639}.Release.ActiveCfg = Release|Win32
+ {58CCE183-6092-48FE-A4F7-BA0D3A792639}.Release.Build.0 = Release|Win32
+ {5E81CD01-4FA2-2A96-84FE-DA631CA20962}.Debug.ActiveCfg = Debug|Win32
+ {5E81CD01-4FA2-2A96-84FE-DA631CA20962}.Debug.Build.0 = Debug|Win32
+ {5E81CD01-4FA2-2A96-84FE-DA631CA20962}.Release.ActiveCfg = Release|Win32
+ {5E81CD01-4FA2-2A96-84FE-DA631CA20962}.Release.Build.0 = Release|Win32
+ {8E0C437E-3613-FD46-F3AE-876A0731CA85}.Debug.ActiveCfg = Debug|Win32
+ {8E0C437E-3613-FD46-F3AE-876A0731CA85}.Debug.Build.0 = Debug|Win32
+ {8E0C437E-3613-FD46-F3AE-876A0731CA85}.Release.ActiveCfg = Release|Win32
+ {8E0C437E-3613-FD46-F3AE-876A0731CA85}.Release.Build.0 = Release|Win32
+ {571C3483-87C7-6921-1238-B086B3E766C9}.Debug.ActiveCfg = Debug|Win32
+ {571C3483-87C7-6921-1238-B086B3E766C9}.Debug.Build.0 = Debug|Win32
+ {571C3483-87C7-6921-1238-B086B3E766C9}.Release.ActiveCfg = Release|Win32
+ {571C3483-87C7-6921-1238-B086B3E766C9}.Release.Build.0 = Release|Win32
+ {5C19CF83-4FB7-8219-8F6D-3BA9D2715A22}.Debug.ActiveCfg = Debug|Win32
+ {5C19CF83-4FB7-8219-8F6D-3BA9D2715A22}.Debug.Build.0 = Debug|Win32
+ {5C19CF83-4FB7-8219-8F6D-3BA9D2715A22}.Release.ActiveCfg = Release|Win32
+ {5C19CF83-4FB7-8219-8F6D-3BA9D2715A22}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal

Modified: branches/release/libs/interprocess/proj/vc7ide/interprocesslib.vcproj
==============================================================================
--- branches/release/libs/interprocess/proj/vc7ide/interprocesslib.vcproj (original)
+++ branches/release/libs/interprocess/proj/vc7ide/interprocesslib.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -316,6 +316,9 @@
                         Filter="h;hpp;hxx;hm;inl;inc;xsd"
                         UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
                         <File
+ RelativePath="..\..\..\..\boost\interprocess\anonymous_shared_memory.hpp">
+ </File>
+ <File
                                 RelativePath="..\..\..\..\boost\interprocess\creation_tags.hpp">
                         </File>
                         <File

Modified: branches/release/libs/interprocess/test/Jamfile.v2
==============================================================================
--- branches/release/libs/interprocess/test/Jamfile.v2 (original)
+++ branches/release/libs/interprocess/test/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 # Boost Interprocess Library Test Jamfile
 
-# (C) Copyright Ion Gaztañaga 2006.
+# (C) Copyright Ion Gaztanaga 2006.
 # Use, modification and distribution are subject to 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)

Modified: branches/release/libs/interprocess/test/adaptive_node_pool_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/adaptive_node_pool_test.cpp (original)
+++ branches/release/libs/interprocess/test/adaptive_node_pool_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -10,14 +10,18 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include "node_pool_test.hpp"
 #include <boost/interprocess/allocators/detail/adaptive_node_pool.hpp>
+#include <vector>
+
+using namespace boost::interprocess;
+typedef managed_shared_memory::segment_manager segment_manager_t;
+
+//Explicit specialization to catch compilation errors
+template class detail::private_adaptive_node_pool_impl<segment_manager_t>;
 
 int main ()
 {
- using namespace boost::interprocess;
- typedef managed_shared_memory::segment_manager segment_manager;
-
    typedef detail::private_adaptive_node_pool
- <segment_manager, 4, 64, 64, 5> node_pool_t;
+ <segment_manager_t, 4, 64, 64, 5> node_pool_t;
 
    if(!test::test_all_node_pool<node_pool_t>())
       return 1;

Modified: branches/release/libs/interprocess/test/adaptive_pool_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/adaptive_pool_test.cpp (original)
+++ branches/release/libs/interprocess/test/adaptive_pool_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -32,6 +32,8 @@
 //Explicit instantiations to catch compilation errors
 template class adaptive_pool<int, managed_shared_memory::segment_manager>;
 template class detail::adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
+template class adaptive_pool<void, managed_shared_memory::segment_manager>;
+template class detail::adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, shmem_node_allocator_t> MyShmList;
@@ -41,7 +43,6 @@
 typedef vector<int, shmem_node_allocator_t> MyShmVector;
 typedef vector<int, shmem_node_allocator_v1_t> MyShmVectorV1;
 
-
 int main ()
 {
    if(test::list_test<managed_shared_memory, MyShmList, true>())

Modified: branches/release/libs/interprocess/test/allocator_v1.hpp
==============================================================================
--- branches/release/libs/interprocess/test/allocator_v1.hpp (original)
+++ branches/release/libs/interprocess/test/allocator_v1.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -114,17 +114,17 @@
 
    //!Deallocates memory previously allocated. Never throws
    void deallocate(const pointer &ptr, size_type)
- { mp_mngr->deallocate(detail::get_pointer(ptr)); }
-/*
+ { mp_mngr->deallocate((void*)detail::get_pointer(ptr)); }
+
    //!Construct object, calling constructor.
    //!Throws if T(const T&) throws
    void construct(const pointer &ptr, const_reference value)
- { new(detail::get_pointer(ptr)) value_type(value); }
+ { new((void*)detail::get_pointer(ptr)) value_type(value); }
 
    //!Destroys object. Throws if object's destructor throws
    void destroy(const pointer &ptr)
    { BOOST_ASSERT(ptr != 0); (*ptr).~value_type(); }
-*/
+
    //!Returns the number of elements that could be allocated. Never throws
    size_type max_size() const
    { return mp_mngr->get_size(); }

Modified: branches/release/libs/interprocess/test/cached_adaptive_pool_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/cached_adaptive_pool_test.cpp (original)
+++ branches/release/libs/interprocess/test/cached_adaptive_pool_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/containers/list.hpp>
+#include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/cached_adaptive_pool.hpp>
 #include "print_container.hpp"
 #include "dummy_test_allocator.hpp"
@@ -33,7 +34,8 @@
 //Explicit instantiations to catch compilation errors
 template class cached_adaptive_pool<int, managed_shared_memory::segment_manager>;
 template class detail::cached_adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
-
+template class cached_adaptive_pool<void, managed_shared_memory::segment_manager>;
+template class detail::cached_adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, cached_node_allocator_t> MyShmList;

Modified: branches/release/libs/interprocess/test/cached_node_allocator_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/cached_node_allocator_test.cpp (original)
+++ branches/release/libs/interprocess/test/cached_node_allocator_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/containers/list.hpp>
+#include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/cached_node_allocator.hpp>
 #include "print_container.hpp"
 #include "dummy_test_allocator.hpp"
@@ -31,6 +32,8 @@
 //Explicit instantiations to catch compilation errors
 template class cached_node_allocator<int, managed_shared_memory::segment_manager>;
 template class detail::cached_node_allocator_v1<int, managed_shared_memory::segment_manager>;
+template class cached_node_allocator<void, managed_shared_memory::segment_manager>;
+template class detail::cached_node_allocator_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, cached_node_allocator_t> MyShmList;

Modified: branches/release/libs/interprocess/test/deque_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/deque_test.cpp (original)
+++ branches/release/libs/interprocess/test/deque_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -65,12 +65,12 @@
    {
    IntType move_me(1);
    stddeque->insert(stddeque->begin()+size/2, 50, 1);
- shmdeque->insert(shmdeque->begin()+size/2, 50, move(move_me));
+ shmdeque->insert(shmdeque->begin()+size/2, 50, detail::move_impl(move_me));
    if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
    }
    {
    IntType move_me(2);
- shmdeque->assign(shmdeque->size()/2, move(move_me));
+ shmdeque->assign(shmdeque->size()/2, detail::move_impl(move_me));
    stddeque->assign(stddeque->size()/2, 2);
    if(!test::CheckEqualContainers(shmdeque, stddeque)) return false;
    }
@@ -120,7 +120,7 @@
          int i;
          for(i = 0; i < max; ++i){
             IntType move_me(i);
- shmdeque->insert(shmdeque->end(), move(move_me));
+ shmdeque->insert(shmdeque->end(), detail::move_impl(move_me));
             stddeque->insert(stddeque->end(), i);
          }
          if(!test::CheckEqualContainers(shmdeque, stddeque)) return 1;
@@ -141,7 +141,7 @@
             IntType aux_vect[50];
             for(int i = 0; i < 50; ++i){
                IntType move_me (-1);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
             }
             int aux_vect2[50];
             for(int i = 0; i < 50; ++i){
@@ -164,7 +164,7 @@
             IntType aux_vect[50];
             for(int i = 0; i < 50; ++i){
                IntType move_me(-1);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
             }
             int aux_vect2[50];
             for(int i = 0; i < 50; ++i){
@@ -189,7 +189,7 @@
 
          for(i = 0; i < max; ++i){
             IntType move_me(i);
- shmdeque->insert(shmdeque->begin(), move(move_me));
+ shmdeque->insert(shmdeque->begin(), detail::move_impl(move_me));
             stddeque->insert(stddeque->begin(), i);
          }
          if(!test::CheckEqualContainers(shmdeque, stddeque)) return 1;

Modified: branches/release/libs/interprocess/test/dummy_test_allocator.hpp
==============================================================================
--- branches/release/libs/interprocess/test/dummy_test_allocator.hpp (original)
+++ branches/release/libs/interprocess/test/dummy_test_allocator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -82,26 +82,26 @@
    template<class T2>
    dummy_test_allocator(const dummy_test_allocator<T2> &)
    {}
-/*
+
    pointer address(reference value)
    { return pointer(addressof(value)); }
 
    const_pointer address(const_reference value) const
    { return const_pointer(addressof(value)); }
-*/
+
    pointer allocate(size_type, cvoid_ptr = 0)
    { return 0; }
 
    void deallocate(const pointer &, size_type)
    { }
-/*
+
    template<class Convertible>
    void construct(pointer, const Convertible &)
    {}
 
    void destroy(pointer)
    {}
-*/
+
    size_type max_size() const
    { return 0; }
 
@@ -115,7 +115,7 @@
                          size_type,
                          size_type,
                          size_type &, const pointer & = 0)
- { return std::pair<pointer, bool>(0, true); }
+ { return std::pair<pointer, bool>(pointer(0), true); }
 
    //!Returns maximum the number of objects the previously allocated memory
    //!pointed by p can hold.

Modified: branches/release/libs/interprocess/test/expand_bwd_test_allocator.hpp
==============================================================================
--- branches/release/libs/interprocess/test/expand_bwd_test_allocator.hpp (original)
+++ branches/release/libs/interprocess/test/expand_bwd_test_allocator.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -85,26 +85,26 @@
    expand_bwd_test_allocator(const expand_bwd_test_allocator<T2> &other)
       : mp_buffer(other.mp_buffer), m_size(other.m_size)
       , m_offset(other.m_offset), m_allocations(0){ }
-/*
+
    pointer address(reference value)
    { return pointer(addressof(value)); }
 
    const_pointer address(const_reference value) const
    { return const_pointer(addressof(value)); }
-*/
+
    pointer allocate(size_type , cvoid_ptr hint = 0)
    { (void)hint; return 0; }
 
    void deallocate(const pointer &, size_type)
    {}
-/*
+
    template<class Convertible>
    void construct(pointer ptr, const Convertible &value)
    { new((void*)ptr) value_type(value); }
 
    void destroy(pointer ptr)
    { (*ptr).~value_type(); }
-*/
+
    size_type max_size() const
    { return m_size; }
 

Modified: branches/release/libs/interprocess/test/expand_bwd_test_template.hpp
==============================================================================
--- branches/release/libs/interprocess/test/expand_bwd_test_template.hpp (original)
+++ branches/release/libs/interprocess/test/expand_bwd_test_template.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -15,6 +15,7 @@
 #include <vector>
 #include "expand_bwd_test_allocator.hpp"
 #include <algorithm>
+#include <boost/type_traits/remove_volatile.hpp>
 
 namespace boost { namespace interprocess { namespace test {
 
@@ -107,7 +108,8 @@
 bool test_insert_with_expand_bwd()
 {
    typedef typename VectorWithExpandBwdAllocator::value_type value_type;
- typedef std::vector<value_type> Vect;
+ typedef typename boost::remove_volatile<value_type>::type non_volatile_value_type;
+ typedef std::vector<non_volatile_value_type> Vect;
    const int MemorySize = 1000;
 
    //Distance old and new buffer
@@ -131,37 +133,42 @@
 
    for(int iteration = 0; iteration < Iterations; ++iteration)
    {
- Vect memory;
- memory.resize(MemorySize);
-
- Vect initial_data;
- initial_data.resize(InitialSize[iteration]);
- for(int i = 0; i < InitialSize[iteration]; ++i){
- initial_data[i] = value_type(i);
- }
-
- Vect data_to_insert;
- data_to_insert.resize(InsertSize[iteration]);
- for(int i = 0; i < InsertSize[iteration]; ++i){
- data_to_insert[i] = value_type(-i);
- }
-
- expand_bwd_test_allocator<value_type> alloc
- (&memory[0], memory.size(), Offset[iteration]);
- VectorWithExpandBwdAllocator vector(alloc);
- vector.insert( vector.begin()
- , initial_data.begin(), initial_data.end());
- vector.insert( vector.begin() + Position[iteration]
- , data_to_insert.begin(), data_to_insert.end());
- initial_data.insert(initial_data.begin() + Position[iteration]
- , data_to_insert.begin(), data_to_insert.end());
- //Now check that values are equal
- if(!CheckEqualVector(vector, initial_data)){
- std::cout << "test_assign_with_expand_bwd::CheckEqualVector failed." << std::endl
- << " Class: " << typeid(VectorWithExpandBwdAllocator).name() << std::endl
- << " Iteration: " << iteration << std::endl;
- return false;
+ value_type *memory = new value_type[MemorySize];
+ try {
+ std::vector<non_volatile_value_type> initial_data;
+ initial_data.resize(InitialSize[iteration]);
+ for(int i = 0; i < InitialSize[iteration]; ++i){
+ initial_data[i] = i;
+ }
+
+ Vect data_to_insert;
+ data_to_insert.resize(InsertSize[iteration]);
+ for(int i = 0; i < InsertSize[iteration]; ++i){
+ data_to_insert[i] = -i;
+ }
+
+ expand_bwd_test_allocator<value_type> alloc
+ ((value_type*)&memory[0], MemorySize, Offset[iteration]);
+ VectorWithExpandBwdAllocator vector(alloc);
+ vector.insert( vector.begin()
+ , initial_data.begin(), initial_data.end());
+ vector.insert( vector.begin() + Position[iteration]
+ , data_to_insert.begin(), data_to_insert.end());
+ initial_data.insert(initial_data.begin() + Position[iteration]
+ , data_to_insert.begin(), data_to_insert.end());
+ //Now check that values are equal
+ if(!CheckEqualVector(vector, initial_data)){
+ std::cout << "test_assign_with_expand_bwd::CheckEqualVector failed." << std::endl
+ << " Class: " << typeid(VectorWithExpandBwdAllocator).name() << std::endl
+ << " Iteration: " << iteration << std::endl;
+ return false;
+ }
+ }
+ catch(...){
+ delete []((non_volatile_value_type*)memory);
+ throw;
       }
+ delete []((non_volatile_value_type*)memory);
    }
 
    return true;
@@ -173,7 +180,8 @@
 bool test_assign_with_expand_bwd()
 {
    typedef typename VectorWithExpandBwdAllocator::value_type value_type;
- typedef std::vector<value_type> Vect;
+ typedef typename boost::remove_volatile<value_type>::type non_volatile_value_type;
+ typedef std::vector<non_volatile_value_type> Vect;
    const int MemorySize = 200;
 
    const int Offset[] = { 50, 50, 50};
@@ -183,41 +191,46 @@
 
    for(int iteration = 0; iteration <Iterations; ++iteration)
    {
- Vect memory;
- memory.resize(MemorySize);
-
- //Create initial data
- Vect initial_data;
- initial_data.resize(InitialSize[iteration]);
- for(int i = 0; i < InitialSize[iteration]; ++i){
- initial_data[i] = i;
- }
-
- //Create data to assign
- Vect data_to_assign;
- data_to_assign.resize(AssignSize[iteration]);
- for(int i = 0; i < AssignSize[iteration]; ++i){
- data_to_assign[i] = -i;
- }
-
- //Insert initial data to the vector to test
- expand_bwd_test_allocator<value_type> alloc
- (&memory[0], memory.size(), Offset[iteration]);
- VectorWithExpandBwdAllocator vector(alloc);
- vector.insert( vector.begin()
- , initial_data.begin(), initial_data.end());
-
- //Assign data
- vector.assign(data_to_assign.begin(), data_to_assign.end());
- initial_data.assign(data_to_assign.begin(), data_to_assign.end());
-
- //Now check that values are equal
- if(!CheckEqualVector(vector, initial_data)){
- std::cout << "test_assign_with_expand_bwd::CheckEqualVector failed." << std::endl
- << " Class: " << typeid(VectorWithExpandBwdAllocator).name() << std::endl
- << " Iteration: " << iteration << std::endl;
- return false;
+ value_type *memory = new value_type[MemorySize];
+ try {
+ //Create initial data
+ std::vector<non_volatile_value_type> initial_data;
+ initial_data.resize(InitialSize[iteration]);
+ for(int i = 0; i < InitialSize[iteration]; ++i){
+ initial_data[i] = i;
+ }
+
+ //Create data to assign
+ std::vector<non_volatile_value_type> data_to_assign;
+ data_to_assign.resize(AssignSize[iteration]);
+ for(int i = 0; i < AssignSize[iteration]; ++i){
+ data_to_assign[i] = -i;
+ }
+
+ //Insert initial data to the vector to test
+ expand_bwd_test_allocator<value_type> alloc
+ (&memory[0], MemorySize, Offset[iteration]);
+ VectorWithExpandBwdAllocator vector(alloc);
+ vector.insert( vector.begin()
+ , initial_data.begin(), initial_data.end());
+
+ //Assign data
+ vector.assign(data_to_assign.begin(), data_to_assign.end());
+ initial_data.assign(data_to_assign.begin(), data_to_assign.end());
+
+ //Now check that values are equal
+ if(!CheckEqualVector(vector, initial_data)){
+ std::cout << "test_assign_with_expand_bwd::CheckEqualVector failed." << std::endl
+ << " Class: " << typeid(VectorWithExpandBwdAllocator).name() << std::endl
+ << " Iteration: " << iteration << std::endl;
+ return false;
+ }
+ }
+ catch(...){
+ delete []((typename boost::remove_volatile<value_type>::type*)memory);
+ throw;
       }
+ delete []((typename boost::remove_volatile<value_type>::type*)memory);
    }
 
    return true;

Modified: branches/release/libs/interprocess/test/file_mapping_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/file_mapping_test.cpp (original)
+++ branches/release/libs/interprocess/test/file_mapping_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -12,7 +12,6 @@
 #include <ios> //std::streamoff
 #include <fstream> //std::ofstream, std::ifstream
 #include <iostream>
-#include <ios>
 #include <boost/interprocess/file_mapping.hpp>
 #include <boost/interprocess/mapped_region.hpp>
 #include <memory> //std::auto_ptr
@@ -123,6 +122,13 @@
             }
          }
       }
+ {
+ //Now test move semantics
+ file_mapping mapping(test::get_process_id_name(), read_only);
+ file_mapping move_ctor(detail::move_impl(mapping));
+ file_mapping move_assign;
+ move_assign = detail::move_impl(move_ctor);
+ }
    }
    catch(std::exception &exc){
       std::remove(test::get_process_id_name());

Modified: branches/release/libs/interprocess/test/iset_index_allocation_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/iset_index_allocation_test.cpp (original)
+++ branches/release/libs/interprocess/test/iset_index_allocation_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -7,7 +7,6 @@
 // See http://www.boost.org/libs/interprocess for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/indexes/iset_index.hpp>
 #include "named_allocation_test_template.hpp"

Modified: branches/release/libs/interprocess/test/list_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/list_test.cpp (original)
+++ branches/release/libs/interprocess/test/list_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -26,6 +26,9 @@
 typedef allocator<int, managed_shared_memory::segment_manager> ShmemAllocator;
 typedef list<int, ShmemAllocator> MyList;
 
+typedef allocator<volatile int, managed_shared_memory::segment_manager> ShmemVolatileAllocator;
+typedef list<volatile int, ShmemVolatileAllocator> MyVolatileList;
+
 typedef allocator<test::movable_int, managed_shared_memory::segment_manager> ShmemMoveAllocator;
 typedef list<test::movable_int, ShmemMoveAllocator> MyMoveList;
 
@@ -37,6 +40,9 @@
    if(test::list_test<managed_shared_memory, MyList, true>())
       return 1;
 
+ if(test::list_test<managed_shared_memory, MyVolatileList, true>())
+ return 1;
+
    if(test::list_test<managed_shared_memory, MyMoveList, true>())
       return 1;
 

Modified: branches/release/libs/interprocess/test/list_test.hpp
==============================================================================
--- branches/release/libs/interprocess/test/list_test.hpp (original)
+++ branches/release/libs/interprocess/test/list_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -36,7 +36,7 @@
       typedef typename MyShmList::value_type IntType;
       for(int i = 0; i < max; ++i){
          IntType move_me(i);
- shmlist->push_back(move(move_me));
+ shmlist->push_back(detail::move_impl(move_me));
          stdlist->push_back(i);
       }
       if(!CheckEqualContainers(shmlist, stdlist))
@@ -54,7 +54,7 @@
       typedef typename MyShmList::value_type IntType;
       for(int i = 0; i < max; ++i){
          IntType move_me(i);
- shmlist->push_front(move(move_me));
+ shmlist->push_front(detail::move_impl(move_me));
          stdlist->push_front(i);
       }
       if(!CheckEqualContainers(shmlist, stdlist))
@@ -136,7 +136,7 @@
          IntType aux_vect[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
          }
          int aux_vect2[50];
          for(int i = 0; i < 50; ++i){
@@ -166,7 +166,7 @@
          IntType aux_vect[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
          }
          int aux_vect2[50];
          for(int i = 0; i < 50; ++i){

Modified: branches/release/libs/interprocess/test/managed_mapped_file_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/managed_mapped_file_test.cpp (original)
+++ branches/release/libs/interprocess/test/managed_mapped_file_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -89,6 +89,44 @@
    }
 
    {
+ {
+ //Map preexisting file again in copy-on-write
+ managed_mapped_file mfile(open_copy_on_write, FileName);
+
+ //Check vector is still there
+ MyVect *mfile_vect = mfile.find<MyVect>("MyVector").first;
+ if(!mfile_vect)
+ return -1;
+
+ //Erase vector
+ mfile.destroy_ptr(mfile_vect);
+
+ //Make sure vector is erased
+ mfile_vect = mfile.find<MyVect>("MyVector").first;
+ if(mfile_vect)
+ return -1;
+ }
+ //Now check vector is still in the file
+ {
+ //Map preexisting file again in copy-on-write
+ managed_mapped_file mfile(open_copy_on_write, FileName);
+
+ //Check vector is still there
+ MyVect *mfile_vect = mfile.find<MyVect>("MyVector").first;
+ if(!mfile_vect)
+ return -1;
+ }
+ }
+ {
+ //Map preexisting file again in copy-on-write
+ managed_mapped_file mfile(open_read_only, FileName);
+
+ //Check vector is still there
+ MyVect *mfile_vect = mfile.find<MyVect>("MyVector").first;
+ if(!mfile_vect)
+ return -1;
+ }
+ {
       std::size_t old_free_memory;
       {
          //Map preexisting file again in memory
@@ -162,6 +200,13 @@
          if(next_file_size <= final_file_size)
             return -1;
       }
+ {
+ //Now test move semantics
+ managed_mapped_file original(open_only, FileName);
+ managed_mapped_file move_ctor(detail::move_impl(original));
+ managed_mapped_file move_assign;
+ move_assign = detail::move_impl(move_ctor);
+ }
    }
 
    std::remove(FileName);

Modified: branches/release/libs/interprocess/test/managed_shared_memory_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/managed_shared_memory_test.cpp (original)
+++ branches/release/libs/interprocess/test/managed_shared_memory_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -84,7 +84,44 @@
       if(!shmem_vect)
          return -1;
    }
+ {
+ {
+ //Map preexisting shmem again in copy-on-write
+ managed_shared_memory shmem(open_copy_on_write, ShmemName);
+
+ //Check vector is still there
+ MyVect *shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(!shmem_vect)
+ return -1;
 
+ //Erase vector
+ shmem.destroy_ptr(shmem_vect);
+
+ //Make sure vector is erased
+ shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(shmem_vect)
+ return -1;
+ }
+ //Now check vector is still in the shmem
+ {
+ //Map preexisting shmem again in copy-on-write
+ managed_shared_memory shmem(open_copy_on_write, ShmemName);
+
+ //Check vector is still there
+ MyVect *shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(!shmem_vect)
+ return -1;
+ }
+ }
+ {
+ //Map preexisting shmem again in copy-on-write
+ managed_shared_memory shmem(open_read_only, ShmemName);
+
+ //Check vector is still there
+ MyVect *shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(!shmem_vect)
+ return -1;
+ }
    {
       std::size_t old_free_memory;
       {
@@ -159,6 +196,13 @@
          if(next_shmem_size <= final_shmem_size)
             return -1;
       }
+ {
+ //Now test move semantics
+ managed_shared_memory original(open_only, ShmemName);
+ managed_shared_memory move_ctor(detail::move_impl(original));
+ managed_shared_memory move_assign;
+ move_assign = detail::move_impl(move_ctor);
+ }
    }
 
    shared_memory_object::remove(ShmemName);

Modified: branches/release/libs/interprocess/test/managed_windows_shared_memory_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/managed_windows_shared_memory_test.cpp (original)
+++ branches/release/libs/interprocess/test/managed_windows_shared_memory_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -72,20 +72,68 @@
       //Construct a vector in the shared memory
       w_shm_vect = w_shm.construct<MyVect> ("MyVector") (myallocator);
 
- //Map preexisting segment again in memory
- managed_windows_shared_memory w_shm_new(open_only, MemName);
-
- //Check vector is still there
- w_shm_vect = w_shm_new.find<MyVect>("MyVector").first;
- if(!w_shm_vect)
- return -1;
-
- if(w_shm_new.get_size() != w_shm.get_size())
- return 1;
- //Destroy and check it is not present
- w_shm_new.destroy_ptr(w_shm_vect);
- if(0 != w_shm_new.find<MyVect>("MyVector").first)
- return 1;
+ {
+ //Map preexisting segment again in memory
+ managed_windows_shared_memory w_shm_new(open_only, MemName);
+
+ //Check vector is still there
+ w_shm_vect = w_shm_new.find<MyVect>("MyVector").first;
+ if(!w_shm_vect)
+ return -1;
+
+ if(w_shm_new.get_size() != w_shm.get_size())
+ return 1;
+
+ {
+ {
+ //Map preexisting shmem again in copy-on-write
+ managed_windows_shared_memory shmem(open_copy_on_write, MemName);
+
+ //Check vector is still there
+ MyVect *shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(!shmem_vect)
+ return -1;
+
+ //Erase vector
+ shmem.destroy_ptr(shmem_vect);
+
+ //Make sure vector is erased
+ shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(shmem_vect)
+ return -1;
+ }
+ //Now check vector is still in the s
+ {
+ //Map preexisting shmem again in copy-on-write
+ managed_windows_shared_memory shmem(open_copy_on_write, MemName);
+
+ //Check vector is still there
+ MyVect *shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(!shmem_vect)
+ return -1;
+ }
+ }
+ {
+ //Map preexisting shmem again in copy-on-write
+ managed_windows_shared_memory shmem(open_read_only, MemName);
+
+ //Check vector is still there
+ MyVect *shmem_vect = shmem.find<MyVect>("MyVector").first;
+ if(!shmem_vect)
+ return -1;
+ }
+
+ //Destroy and check it is not present
+ w_shm_new.destroy_ptr(w_shm_vect);
+ if(0 != w_shm_new.find<MyVect>("MyVector").first)
+ return 1;
+
+ //Now test move semantics
+ managed_windows_shared_memory original(open_only, MemName);
+ managed_windows_shared_memory move_ctor(detail::move_impl(original));
+ managed_windows_shared_memory move_assign;
+ move_assign = detail::move_impl(move_ctor);
+ }
    }
 
    return 0;

Modified: branches/release/libs/interprocess/test/map_test.hpp
==============================================================================
--- branches/release/libs/interprocess/test/map_test.hpp (original)
+++ branches/release/libs/interprocess/test/map_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -115,9 +115,9 @@
 
       int i, j;
       for(i = 0; i < max; ++i){
- shmmap->insert(move(IntPairType (move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(detail::move_impl(IntPairType (detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmap->insert(StdPairType(i, i));
- shmmultimap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmultimap->insert(StdPairType(i, i));
       }
 
@@ -232,9 +232,9 @@
       }
 
       for(i = 0; i < max; ++i){
- shmmap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmap->insert(StdPairType(i, i));
- shmmultimap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmultimap->insert(StdPairType(i, i));
       }
 
@@ -242,10 +242,10 @@
       if(!CheckEqualPairContainers(shmmultimap, stdmultimap)) return 1;
 
       for(i = 0; i < max; ++i){
- shmmap->insert(shmmap->begin(), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(shmmap->begin(), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmap->insert(stdmap->begin(), StdPairType(i, i));
          //PrintContainers(shmmap, stdmap);
- shmmultimap->insert(shmmultimap->begin(), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(shmmultimap->begin(), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmultimap->insert(stdmultimap->begin(), StdPairType(i, i));
          //PrintContainers(shmmultimap, stdmultimap);
          if(!CheckEqualPairContainers(shmmap, stdmap))
@@ -253,29 +253,29 @@
          if(!CheckEqualPairContainers(shmmultimap, stdmultimap))
             return 1;
 
- shmmap->insert(shmmap->end(), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(shmmap->end(), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmap->insert(stdmap->end(), StdPairType(i, i));
- shmmultimap->insert(shmmultimap->end(), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(shmmultimap->end(), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmultimap->insert(stdmultimap->end(), StdPairType(i, i));
          if(!CheckEqualPairContainers(shmmap, stdmap))
             return 1;
          if(!CheckEqualPairContainers(shmmultimap, stdmultimap))
             return 1;
 
- shmmap->insert(shmmap->lower_bound(IntType(i)), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(shmmap->lower_bound(IntType(i)), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmap->insert(stdmap->lower_bound(i), StdPairType(i, i));
          //PrintContainers(shmmap, stdmap);
- shmmultimap->insert(shmmultimap->lower_bound(IntType(i)), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(shmmultimap->lower_bound(IntType(i)), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmultimap->insert(stdmultimap->lower_bound(i), StdPairType(i, i));
          //PrintContainers(shmmultimap, stdmultimap);
          if(!CheckEqualPairContainers(shmmap, stdmap))
             return 1;
          if(!CheckEqualPairContainers(shmmultimap, stdmultimap))
             return 1;
- shmmap->insert(shmmap->upper_bound(IntType(i)), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(shmmap->upper_bound(IntType(i)), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmap->insert(stdmap->upper_bound(i), StdPairType(i, i));
          //PrintContainers(shmmap, stdmap);
- shmmultimap->insert(shmmultimap->upper_bound(IntType(i)), move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(shmmultimap->upper_bound(IntType(i)), detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          stdmultimap->insert(stdmultimap->upper_bound(i), StdPairType(i, i));
          //PrintContainers(shmmultimap, stdmultimap);
          if(!CheckEqualPairContainers(shmmap, stdmap))
@@ -303,8 +303,8 @@
 
       for(j = 0; j < 3; ++j)
       for(i = 0; i < 100; ++i){
- shmmap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
- shmmultimap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
+ shmmultimap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
          if(shmmap->count(IntType(i)) != typename MyShmMultiMap::size_type(1))
             return 1;
          if(shmmultimap->count(IntType(i)) != typename MyShmMultiMap::size_type(j+1))
@@ -367,9 +367,9 @@
 
    int i;
    for(i = 0; i < max; ++i){
- shmmap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
       stdmap->insert(StdPairType(i, i));
- shmmultimap->insert(move(IntPairType(move(IntType(i)), move(IntType(i)))));
+ shmmultimap->insert(detail::move_impl(IntPairType(detail::move_impl(IntType(i)), detail::move_impl(IntType(i)))));
       stdmultimap->insert(StdPairType(i, i));
    }
    if(!CheckEqualContainers(shmmap, stdmap)) return 1;

Modified: branches/release/libs/interprocess/test/mapped_file_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/mapped_file_test.cpp (original)
+++ branches/release/libs/interprocess/test/mapped_file_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -74,6 +74,11 @@
 
       //Overwrite all memory
       std::memset(file1.get_user_address(), 0, file1.get_user_size());
+
+ //Now test move semantics
+ mapped_file move_ctor(detail::move_impl(file1));
+ mapped_file move_assign;
+ move_assign = detail::move_impl(move_ctor);
    }
    std::remove(FileName);
    return 0;

Modified: branches/release/libs/interprocess/test/node_allocator_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/node_allocator_test.cpp (original)
+++ branches/release/libs/interprocess/test/node_allocator_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/containers/list.hpp>
+#include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/node_allocator.hpp>
 #include "print_container.hpp"
 #include "dummy_test_allocator.hpp"
@@ -30,6 +31,8 @@
 //Explicit instantiations to catch compilation errors
 template class node_allocator<int, managed_shared_memory::segment_manager>;
 template class detail::node_allocator_v1<int, managed_shared_memory::segment_manager>;
+template class node_allocator<void, managed_shared_memory::segment_manager>;
+template class detail::node_allocator_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, shmem_node_allocator_t> MyShmList;

Modified: branches/release/libs/interprocess/test/node_pool_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/node_pool_test.cpp (original)
+++ branches/release/libs/interprocess/test/node_pool_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -11,14 +11,15 @@
 #include "node_pool_test.hpp"
 #include <boost/interprocess/allocators/detail/node_pool.hpp>
 
+using namespace boost::interprocess;
+typedef managed_shared_memory::segment_manager segment_manager_t;
+template class detail::private_node_pool_impl<segment_manager_t>;
 
 
 int main ()
 {
- using namespace boost::interprocess;
- typedef managed_shared_memory::segment_manager segment_manager;
    typedef detail::private_node_pool
- <segment_manager, 4, 64> node_pool_t;
+ <segment_manager_t, 4, 64> node_pool_t;
 
    if(!test::test_all_node_pool<node_pool_t>())
       return 1;

Modified: branches/release/libs/interprocess/test/node_pool_test.hpp
==============================================================================
--- branches/release/libs/interprocess/test/node_pool_test.hpp (original)
+++ branches/release/libs/interprocess/test/node_pool_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -25,7 +25,7 @@
 struct test_node_pool
 {
    static bool allocate_then_deallocate(NodePool &pool);
- static bool deallocate_free_chunks(NodePool &pool);
+ static bool deallocate_free_blocks(NodePool &pool);
 };
 
 template <class NodePool>
@@ -60,7 +60,7 @@
       return false;
    }
    
- pool.deallocate_free_chunks();
+ pool.deallocate_free_blocks();
 
    if(0 != pool.num_free_nodes()){
       return false;
@@ -70,11 +70,11 @@
 }
 
 template <class NodePool>
-bool test_node_pool<NodePool>::deallocate_free_chunks(NodePool &pool)
+bool test_node_pool<NodePool>::deallocate_free_blocks(NodePool &pool)
 {
- const std::size_t max_chunks = 10;
- const std::size_t max_nodes = max_chunks*pool.get_real_num_node();
- const std::size_t nodes_per_chunk = pool.get_real_num_node();
+ const std::size_t max_blocks = 10;
+ const std::size_t max_nodes = max_blocks*pool.get_real_num_node();
+ const std::size_t nodes_per_block = pool.get_real_num_node();
 
    std::vector<void*> nodes;
 
@@ -93,25 +93,25 @@
       return false;
    }
    
- //Now deallocate one of each chunk per iteration
- for(std::size_t node_i = 0; node_i < nodes_per_chunk; ++node_i){
- //Deallocate a node per chunk
- for(std::size_t i = 0; i < max_chunks; ++i){
- pool.deallocate_node(nodes[i*nodes_per_chunk + node_i]);
+ //Now deallocate one of each block per iteration
+ for(std::size_t node_i = 0; node_i < nodes_per_block; ++node_i){
+ //Deallocate a node per block
+ for(std::size_t i = 0; i < max_blocks; ++i){
+ pool.deallocate_node(nodes[i*nodes_per_block + node_i]);
       }
 
       //Check that the free count is correct
- if(max_chunks*(node_i+1) != pool.num_free_nodes()){
+ if(max_blocks*(node_i+1) != pool.num_free_nodes()){
          return false;
       }
       
- //Now try to deallocate free chunks
- pool.deallocate_free_chunks();
+ //Now try to deallocate free blocks
+ pool.deallocate_free_blocks();
 
- //Until we don't deallocate the last node of every chunk
+ //Until we don't deallocate the last node of every block
       //no node should be deallocated
- if(node_i != (nodes_per_chunk - 1)){
- if(max_chunks*(node_i+1) != pool.num_free_nodes()){
+ if(node_i != (nodes_per_block - 1)){
+ if(max_blocks*(node_i+1) != pool.num_free_nodes()){
             return false;
          }
       }
@@ -136,7 +136,7 @@
    typedef boost::interprocess::test::test_node_pool<node_pool_t> test_node_pool_t;
    shared_memory_object::remove(test::get_process_id_name());
    {
- managed_shared_memory shm(create_only, test::get_process_id_name(), 16*1024);
+ managed_shared_memory shm(create_only, test::get_process_id_name(), 4*1024*sizeof(void*));
 
       typedef deleter<node_pool_t, segment_manager> deleter_t;
       typedef unique_ptr<node_pool_t, deleter_t> unique_ptr_t;
@@ -149,7 +149,7 @@
       //Now call each test
       if(!test_node_pool_t::allocate_then_deallocate(*p))
          return false;
- if(!test_node_pool_t::deallocate_free_chunks(*p))
+ if(!test_node_pool_t::deallocate_free_blocks(*p))
          return false;
    }
    shared_memory_object::remove(test::get_process_id_name());

Modified: branches/release/libs/interprocess/test/private_adaptive_pool_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/private_adaptive_pool_test.cpp (original)
+++ branches/release/libs/interprocess/test/private_adaptive_pool_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/containers/list.hpp>
+#include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/private_adaptive_pool.hpp>
 #include "print_container.hpp"
 #include "dummy_test_allocator.hpp"
@@ -30,6 +31,8 @@
 //Explicit instantiations to catch compilation errors
 template class private_adaptive_pool<int, managed_shared_memory::segment_manager>;
 template class detail::private_adaptive_pool_v1<int, managed_shared_memory::segment_manager>;
+template class private_adaptive_pool<void, managed_shared_memory::segment_manager>;
+template class detail::private_adaptive_pool_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, priv_node_allocator_t> MyShmList;

Modified: branches/release/libs/interprocess/test/private_node_allocator_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/private_node_allocator_test.cpp (original)
+++ branches/release/libs/interprocess/test/private_node_allocator_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -11,6 +11,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/containers/list.hpp>
+#include <boost/interprocess/containers/vector.hpp>
 #include <boost/interprocess/allocators/private_node_allocator.hpp>
 #include "print_container.hpp"
 #include "dummy_test_allocator.hpp"
@@ -30,6 +31,8 @@
 //Explicit instantiations to catch compilation errors
 template class private_node_allocator<int, managed_shared_memory::segment_manager>;
 template class detail::private_node_allocator_v1<int, managed_shared_memory::segment_manager>;
+template class private_node_allocator<void, managed_shared_memory::segment_manager>;
+template class detail::private_node_allocator_v1<void, managed_shared_memory::segment_manager>;
 
 //Alias list types
 typedef list<int, priv_node_allocator_t> MyShmList;

Modified: branches/release/libs/interprocess/test/set_test.hpp
==============================================================================
--- branches/release/libs/interprocess/test/set_test.hpp (original)
+++ branches/release/libs/interprocess/test/set_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -63,7 +63,7 @@
          IntType aux_vect[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(i/2);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
          }
          int aux_vect2[50];
          for(int i = 0; i < 50; ++i){
@@ -72,7 +72,7 @@
          IntType aux_vect3[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(i/2);
- aux_vect3[i] = move(move_me);
+ aux_vect3[i] = detail::move_impl(move_me);
          }
 
          MyShmSet *shmset2 =
@@ -108,20 +108,20 @@
       int i, j;
       for(i = 0; i < max; ++i){
          IntType move_me(i);
- shmset->insert(move(move_me));
+ shmset->insert(detail::move_impl(move_me));
          stdset->insert(i);
          IntType move_me2(i);
- shmmultiset->insert(move(move_me2));
+ shmmultiset->insert(detail::move_impl(move_me2));
          stdmultiset->insert(i);
       }
 
       if(!CheckEqualContainers(shmset, stdset)){
- std::cout << "Error in shmset->insert(move(move_me)" << std::endl;
+ std::cout << "Error in shmset->insert(detail::move_impl(move_me)" << std::endl;
          return 1;
       }
 
       if(!CheckEqualContainers(shmmultiset, stdmultiset)){
- std::cout << "Error in shmmultiset->insert(move(move_me)" << std::endl;
+ std::cout << "Error in shmmultiset->insert(detail::move_impl(move_me)" << std::endl;
          return 1;
       }
 
@@ -183,7 +183,7 @@
          IntType aux_vect[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
          }
          int aux_vect2[50];
          for(int i = 0; i < 50; ++i){
@@ -192,7 +192,7 @@
          IntType aux_vect3[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect3[i] = move(move_me);
+ aux_vect3[i] = detail::move_impl(move_me);
          }
 
          shmset->insert(detail::make_move_iterator(&aux_vect[0]), detail::make_move_iterator(aux_vect + 50));
@@ -228,7 +228,7 @@
          IntType aux_vect[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect[i] = move(move_me);
+ aux_vect[i] = detail::move_impl(move_me);
          }
          int aux_vect2[50];
          for(int i = 0; i < 50; ++i){
@@ -237,19 +237,19 @@
          IntType aux_vect3[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect3[i] = move(move_me);
+ aux_vect3[i] = detail::move_impl(move_me);
          }
 
          IntType aux_vect4[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect4[i] = move(move_me);
+ aux_vect4[i] = detail::move_impl(move_me);
          }
 
          IntType aux_vect5[50];
          for(int i = 0; i < 50; ++i){
             IntType move_me(-1);
- aux_vect5[i] = move(move_me);
+ aux_vect5[i] = detail::move_impl(move_me);
          }
 
          shmset->insert(detail::make_move_iterator(&aux_vect[0]), detail::make_move_iterator(aux_vect + 50));
@@ -285,88 +285,88 @@
 
       for(i = 0; i < max; ++i){
          IntType move_me(i);
- shmset->insert(move(move_me));
+ shmset->insert(detail::move_impl(move_me));
          stdset->insert(i);
          IntType move_me2(i);
- shmmultiset->insert(move(move_me2));
+ shmmultiset->insert(detail::move_impl(move_me2));
          stdmultiset->insert(i);
       }
 
       if(!CheckEqualContainers(shmset, stdset)){
- std::cout << "Error in shmset->insert(move(move_me)) try 2" << std::endl;
+ std::cout << "Error in shmset->insert(detail::move_impl(move_me)) try 2" << std::endl;
          return 1;
       }
       if(!CheckEqualContainers(shmmultiset, stdmultiset)){
- std::cout << "Error in shmmultiset->insert(move(move_me2)) try 2" << std::endl;
+ std::cout << "Error in shmmultiset->insert(detail::move_impl(move_me2)) try 2" << std::endl;
          return 1;
       }
 
       for(i = 0; i < max; ++i){
          IntType move_me(i);
- shmset->insert(shmset->begin(), move(move_me));
+ shmset->insert(shmset->begin(), detail::move_impl(move_me));
          stdset->insert(stdset->begin(), i);
          //PrintContainers(shmset, stdset);
          IntType move_me2(i);
- shmmultiset->insert(shmmultiset->begin(), move(move_me2));
+ shmmultiset->insert(shmmultiset->begin(), detail::move_impl(move_me2));
          stdmultiset->insert(stdmultiset->begin(), i);
          //PrintContainers(shmmultiset, stdmultiset);
          if(!CheckEqualContainers(shmset, stdset)){
- std::cout << "Error in shmset->insert(shmset->begin(), move(move_me))" << std::endl;
+ std::cout << "Error in shmset->insert(shmset->begin(), detail::move_impl(move_me))" << std::endl;
             return 1;
          }
          if(!CheckEqualContainers(shmmultiset, stdmultiset)){
- std::cout << "Error in shmmultiset->insert(shmmultiset->begin(), move(move_me2))" << std::endl;
+ std::cout << "Error in shmmultiset->insert(shmmultiset->begin(), detail::move_impl(move_me2))" << std::endl;
             return 1;
          }
 
          IntType move_me3(i);
- shmset->insert(shmset->end(), move(move_me3));
+ shmset->insert(shmset->end(), detail::move_impl(move_me3));
          stdset->insert(stdset->end(), i);
          IntType move_me4(i);
- shmmultiset->insert(shmmultiset->end(), move(move_me4));
+ shmmultiset->insert(shmmultiset->end(), detail::move_impl(move_me4));
          stdmultiset->insert(stdmultiset->end(), i);
          if(!CheckEqualContainers(shmset, stdset)){
- std::cout << "Error in shmset->insert(shmset->end(), move(move_me3))" << std::endl;
+ std::cout << "Error in shmset->insert(shmset->end(), detail::move_impl(move_me3))" << std::endl;
             return 1;
          }
          if(!CheckEqualContainers(shmmultiset, stdmultiset)){
- std::cout << "Error in shmmultiset->insert(shmmultiset->end(), move(move_me4))" << std::endl;
+ std::cout << "Error in shmmultiset->insert(shmmultiset->end(), detail::move_impl(move_me4))" << std::endl;
             return 1;
          }
          {
          IntType move_me(i);
- shmset->insert(shmset->upper_bound(move_me), move(move_me));
+ shmset->insert(shmset->upper_bound(move_me), detail::move_impl(move_me));
          stdset->insert(stdset->upper_bound(i), i);
          //PrintContainers(shmset, stdset);
          IntType move_me2(i);
- shmmultiset->insert(shmmultiset->upper_bound(move_me2), move(move_me2));
+ shmmultiset->insert(shmmultiset->upper_bound(move_me2), detail::move_impl(move_me2));
          stdmultiset->insert(stdmultiset->upper_bound(i), i);
          //PrintContainers(shmmultiset, stdmultiset);
          if(!CheckEqualContainers(shmset, stdset)){
- std::cout << "Error in shmset->insert(shmset->upper_bound(move_me), move(move_me))" << std::endl;
+ std::cout << "Error in shmset->insert(shmset->upper_bound(move_me), detail::move_impl(move_me))" << std::endl;
             return 1;
          }
          if(!CheckEqualContainers(shmmultiset, stdmultiset)){
- std::cout << "Error in shmmultiset->insert(shmmultiset->upper_bound(move_me2), move(move_me2))" << std::endl;
+ std::cout << "Error in shmmultiset->insert(shmmultiset->upper_bound(move_me2), detail::move_impl(move_me2))" << std::endl;
             return 1;
          }
 
          }
          {
          IntType move_me(i);
- shmset->insert(shmset->lower_bound(move_me), move(move_me2));
+ shmset->insert(shmset->lower_bound(move_me), detail::move_impl(move_me2));
          stdset->insert(stdset->lower_bound(i), i);
          //PrintContainers(shmset, stdset);
          IntType move_me2(i);
- shmmultiset->insert(shmmultiset->lower_bound(move_me2), move(move_me2));
+ shmmultiset->insert(shmmultiset->lower_bound(move_me2), detail::move_impl(move_me2));
          stdmultiset->insert(stdmultiset->lower_bound(i), i);
          //PrintContainers(shmmultiset, stdmultiset);
          if(!CheckEqualContainers(shmset, stdset)){
- std::cout << "Error in shmset->insert(shmset->lower_bound(move_me), move(move_me2))" << std::endl;
+ std::cout << "Error in shmset->insert(shmset->lower_bound(move_me), detail::move_impl(move_me2))" << std::endl;
             return 1;
          }
          if(!CheckEqualContainers(shmmultiset, stdmultiset)){
- std::cout << "Error in shmmultiset->insert(shmmultiset->lower_bound(move_me2), move(move_me2))" << std::endl;
+ std::cout << "Error in shmmultiset->insert(shmmultiset->lower_bound(move_me2), detail::move_impl(move_me2))" << std::endl;
             return 1;
          }
          }
@@ -392,9 +392,9 @@
       for(j = 0; j < 3; ++j)
       for(i = 0; i < 100; ++i){
          IntType move_me(i);
- shmset->insert(move(move_me));
+ shmset->insert(detail::move_impl(move_me));
          IntType move_me2(i);
- shmmultiset->insert(move(move_me2));
+ shmmultiset->insert(detail::move_impl(move_me2));
          IntType count_me(i);
          if(shmset->count(count_me) != typename MyShmMultiSet::size_type(1)){
             std::cout << "Error in shmset->count(count_me)" << std::endl;
@@ -461,10 +461,10 @@
       int i;
       for(i = 0; i < max; ++i){
          IntType move_me(i);
- shmset->insert(move(move_me));
+ shmset->insert(detail::move_impl(move_me));
          stdset->insert(i);
          IntType move_me2(i);
- shmmultiset->insert(move(move_me2));
+ shmmultiset->insert(detail::move_impl(move_me2));
          stdmultiset->insert(i);
       }
       if(!CheckEqualContainers(shmset, stdset)) return 1;

Modified: branches/release/libs/interprocess/test/shared_memory_mapping_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/shared_memory_mapping_test.cpp (original)
+++ branches/release/libs/interprocess/test/shared_memory_mapping_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -13,6 +13,7 @@
 #include <iostream>
 #include <boost/interprocess/shared_memory_object.hpp>
 #include <boost/interprocess/mapped_region.hpp>
+#include <boost/interprocess/anonymous_shared_memory.hpp>
 #include <string>
 #include "get_process_id_name.hpp"
 
@@ -113,6 +114,35 @@
             }
          }
       }
+ {
+ //Now check anonymous mapping
+ mapped_region region(anonymous_shared_memory(FileSize));
+
+ //Write pattern
+ unsigned char *pattern = static_cast<unsigned char*>(region.get_address());
+ for(std::size_t i = 0
+ ;i < FileSize
+ ;++i, ++pattern){
+ *pattern = static_cast<unsigned char>(i);
+ }
+
+ //Check pattern
+ pattern = static_cast<unsigned char*>(region.get_address());
+ for(std::size_t i = 0
+ ;i < FileSize
+ ;++i, ++pattern){
+ if(*pattern != static_cast<unsigned char>(i)){
+ return 1;
+ }
+ }
+ }
+ {
+ //Now test move semantics
+ shared_memory_object mapping(open_only, test::get_process_id_name(), read_write);
+ shared_memory_object move_ctor(detail::move_impl(mapping));
+ shared_memory_object move_assign;
+ move_assign = detail::move_impl(move_ctor);
+ }
    }
    catch(std::exception &exc){
       shared_memory_object::remove(test::get_process_id_name());

Modified: branches/release/libs/interprocess/test/shared_memory_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/shared_memory_test.cpp (original)
+++ branches/release/libs/interprocess/test/shared_memory_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -74,6 +74,11 @@
 
          //Overwrite all memory
          std::memset(shm1.get_user_address(), 0, shm1.get_user_size());
+
+ //Now test move semantics
+ shared_memory move_ctor(detail::move_impl(shm1));
+ shared_memory move_assign;
+ move_assign = detail::move_impl(move_ctor);
       }
    }
    catch(std::exception &ex){

Modified: branches/release/libs/interprocess/test/shared_ptr_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/shared_ptr_test.cpp (original)
+++ branches/release/libs/interprocess/test/shared_ptr_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,7 +1,7 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Peter Dimov 2002-2005.
-// (C) Copyright Ion Gaztanaga 2006-2007.
+// (C) Copyright Peter Dimov 2002-2005, 2007.
+// (C) Copyright Ion Gaztanaga 2006-2008.
 // 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)
@@ -168,6 +168,8 @@
          //Now fill a shared memory vector of shared_ptrs to a string
          string_shared_ptr_vector_t my_sharedptr_vector(string_shared_ptr_allocator);
          my_sharedptr_vector.insert(my_sharedptr_vector.begin(), NumElements, string_shared_ptr);
+ //Insert in the middle to test movability
+ my_sharedptr_vector.insert(my_sharedptr_vector.begin() + my_sharedptr_vector.size()/2, NumElements, string_shared_ptr);
          //Now check the shared count is the objects contained in the
          //vector plus string_shared_ptr
          if(string_shared_ptr.use_count() != static_cast<long>(my_sharedptr_vector.size()+1)){
@@ -536,6 +538,81 @@
    return boost::report_errors();
 }
 
+struct alias_tester
+{
+ int v_;
+
+ explicit alias_tester( int v ): v_( v )
+ {
+ }
+
+ ~alias_tester()
+ {
+ v_ = 0;
+ }
+};
+
+void test_alias()
+{
+ typedef allocator<void, managed_shared_memory::segment_manager>
+ v_allocator_t;
+
+ typedef deleter<alias_tester, managed_shared_memory::segment_manager>
+ alias_tester_deleter_t;
+
+ typedef deleter<int, managed_shared_memory::segment_manager>
+ int_deleter_t;
+
+ typedef shared_ptr<alias_tester, v_allocator_t, alias_tester_deleter_t> alias_tester_shared_ptr;
+
+ typedef shared_ptr<int, v_allocator_t, int_deleter_t> int_shared_ptr;
+ typedef shared_ptr<const int, v_allocator_t, int_deleter_t> const_int_shared_ptr;
+ typedef shared_ptr<volatile int, v_allocator_t, int_deleter_t> volatile_int_shared_ptr;
+
+ std::string process_name;
+ test::get_process_id_name(process_name);
+
+ shared_memory_object::remove(process_name.c_str());
+ {
+ managed_shared_memory shmem(create_only, process_name.c_str(), 10000);
+
+ {
+ int m = 0;
+ int_shared_ptr p;
+ int_shared_ptr p2( p, &m );
+
+ BOOST_TEST( detail::get_pointer(p2.get()) == &m );
+ BOOST_TEST( p2? true: false );
+ BOOST_TEST( !!p2 );
+ BOOST_TEST( p2.use_count() == p.use_count() );
+ BOOST_TEST( !( p < p2 ) && !( p2 < p ) );
+
+ p2.reset( p, (int*)0 );
+
+ BOOST_TEST( p2.get() == 0 );
+
+ BOOST_TEST( p2? false: true );
+ BOOST_TEST( !p2 );
+ BOOST_TEST( p2.use_count() == p.use_count() );
+ BOOST_TEST( !( p < p2 ) && !( p2 < p ) );
+ }
+
+ {
+ int m = 0;
+ int_shared_ptr p(make_managed_shared_ptr
+ (shmem.construct<int>(anonymous_instance)(), shmem));
+ const_int_shared_ptr p2( p, &m );
+
+ BOOST_TEST( detail::get_pointer(p2.get()) == &m );
+ BOOST_TEST( p2? true: false );
+ BOOST_TEST( !!p2 );
+ BOOST_TEST( p2.use_count() == p.use_count() );
+ BOOST_TEST( !( p < p2 ) && !( p2 < p ) );
+ }
+ }
+ shared_memory_object::remove(process_name.c_str());
+}
+
 
 int main()
 {
@@ -548,6 +625,8 @@
    if(0 != basic_shared_ptr_test())
       return 1;
 
+ test_alias();
+
    return 0;
 }
 

Modified: branches/release/libs/interprocess/test/string_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/string_test.cpp (original)
+++ branches/release/libs/interprocess/test/string_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -127,7 +127,7 @@
          std::sprintf(buffer, "%i", i);
          auxShmString += buffer;
          auxStdString += buffer;
- shmStringVect->push_back(move(auxShmString));
+ shmStringVect->push_back(detail::move_impl(auxShmString));
          stdStringVect->push_back(auxStdString);
       }
 
@@ -157,7 +157,7 @@
          std::sprintf(buffer, "%i", i);
          auxShmString += buffer;
          auxStdString += buffer;
- shmStringVect->insert(shmStringVect->begin(), move(auxShmString));
+ shmStringVect->insert(shmStringVect->begin(), detail::move_impl(auxShmString));
          stdStringVect->insert(stdStringVect->begin(), auxStdString);
       }
 

Modified: branches/release/libs/interprocess/test/tree_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/tree_test.cpp (original)
+++ branches/release/libs/interprocess/test/tree_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -61,7 +61,7 @@
 //Customize managed_shared_memory class
 typedef basic_managed_shared_memory
    <char,
- simple_seq_fit<mutex_family, void*>,
+ simple_seq_fit<mutex_family, offset_ptr<void> >,
     map_index
> my_managed_shared_memory;
 

Modified: branches/release/libs/interprocess/test/unique_ptr_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/unique_ptr_test.cpp (original)
+++ branches/release/libs/interprocess/test/unique_ptr_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -70,14 +70,14 @@
 
       //Test some copy constructors
       my_unique_ptr_class my_ptr3(0, segment.get_deleter<MyClass>());
- my_unique_ptr_class my_ptr4(move(my_ptr3));
+ my_unique_ptr_class my_ptr4(detail::move_impl(my_ptr3));
 
       //Construct a list and fill
       MyList list(segment.get_segment_manager());
 
       //Insert from my_unique_ptr_class
- list.push_front(move(my_ptr));
- list.push_back(move(my_ptr2));
+ list.push_front(detail::move_impl(my_ptr));
+ list.push_back(detail::move_impl(my_ptr2));
 
       //Check pointers
       assert(my_ptr.get() == 0);
@@ -85,9 +85,9 @@
       assert(list.begin()->get() == ptr1);
       assert(list.rbegin()->get() == ptr2);
    
- //MyList list2(move(list));
- //list2.swap(move(MyList(segment.get_segment_manager())));
- //list.swap(move(MyList(segment.get_segment_manager())));
+ //MyList list2(detail::move_impl(list));
+ //list2.swap(detail::move_impl(MyList(segment.get_segment_manager())));
+ //list.swap(detail::move_impl(MyList(segment.get_segment_manager())));
 
       assert(list.begin()->get() == ptr1);
       assert(list.rbegin()->get() == ptr2);
@@ -97,8 +97,8 @@
       MySet set(set_less_t(), segment.get_segment_manager());
 
       //Insert in set from list passing ownership
- set.insert(move(*list.begin()));
- set.insert(move(*list.rbegin()));
+ set.insert(detail::move_impl(*list.begin()));
+ set.insert(detail::move_impl(*list.rbegin()));
 
       //Check pointers
       assert(list.begin()->get() == 0);
@@ -120,12 +120,12 @@
 
       //Insert from my_unique_ptr_class
       if(ptr1 < ptr2){
- vector.insert(vector.begin(), move(*set.begin()));
- vector.insert(vector.end(), move(*set.rbegin()));
+ vector.insert(vector.begin(), detail::move_impl(*set.begin()));
+ vector.insert(vector.end(), detail::move_impl(*set.rbegin()));
       }
       else{
- vector.insert(vector.begin(), move(*set.rbegin()));
- vector.insert(vector.end(), move(*set.begin()));
+ vector.insert(vector.begin(), detail::move_impl(*set.rbegin()));
+ vector.insert(vector.end(), detail::move_impl(*set.begin()));
       }
 
       //Check pointers
@@ -134,14 +134,14 @@
       assert(vector.begin()->get() == ptr1);
       assert(vector.rbegin()->get() == ptr2);
 
- MyVector vector2(move(vector));
+ MyVector vector2(detail::move_impl(vector));
       vector2.swap(vector);
 
       assert(vector.begin()->get() == ptr1);
       assert(vector.rbegin()->get() == ptr2);
 
       my_unique_ptr_class a(0, segment.get_deleter<MyClass>()), b(0, segment.get_deleter<MyClass>());
- a = move(b);
+ a = detail::move_impl(b);
    }
    shared_memory_object::remove(process_name.c_str());
    return 0;

Modified: branches/release/libs/interprocess/test/upgradable_mutex_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/upgradable_mutex_test.cpp (original)
+++ branches/release/libs/interprocess/test/upgradable_mutex_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -35,135 +35,135 @@
       //Conversions to scoped_lock
       {
          scoped_lock<Mutex> lock(mut);
- scoped_lock<Mutex> e_lock(move(lock));
- lock.swap(move(e_lock));
+ scoped_lock<Mutex> e_lock(detail::move_impl(lock));
+ lock.swap(detail::move_impl(e_lock));
       }
       {
          scoped_lock<Mutex> lock(mut);
          scoped_lock<Mutex> e_lock(mut2);
- e_lock = move(lock);
+ e_lock = detail::move_impl(lock);
       }
       {
          upgradable_lock<Mutex> u_lock(mut);
          //This calls unlock_upgradable_and_lock()
- scoped_lock<Mutex> e_lock(move(u_lock));
+ scoped_lock<Mutex> e_lock(detail::move_impl(u_lock));
       }
       {
          upgradable_lock<Mutex> u_lock(mut);
          //This calls unlock_upgradable_and_lock()
          scoped_lock<Mutex> e_lock(mut2);
- scoped_lock<Mutex> moved(move(u_lock));
- e_lock = move(moved);
+ scoped_lock<Mutex> moved(detail::move_impl(u_lock));
+ e_lock = detail::move_impl(moved);
       }
       {
          upgradable_lock<Mutex> u_lock(mut);
          //This calls try_unlock_upgradable_and_lock()
- scoped_lock<Mutex> e_lock(move(u_lock), try_to_lock);
+ scoped_lock<Mutex> e_lock(detail::move_impl(u_lock), try_to_lock);
       }
       {
          upgradable_lock<Mutex> u_lock(mut);
          //This calls try_unlock_upgradable_and_lock()
          scoped_lock<Mutex> e_lock(mut2);
- scoped_lock<Mutex> moved(move(u_lock), try_to_lock);
- e_lock = move(moved);
+ scoped_lock<Mutex> moved(detail::move_impl(u_lock), try_to_lock);
+ e_lock = detail::move_impl(moved);
       }
       {
          boost::posix_time::ptime t = test::delay(100);
          upgradable_lock<Mutex> u_lock(mut);
          //This calls timed_unlock_upgradable_and_lock()
- scoped_lock<Mutex> e_lock(move(u_lock), t);
+ scoped_lock<Mutex> e_lock(detail::move_impl(u_lock), t);
       }
       {
          boost::posix_time::ptime t = test::delay(100);
          upgradable_lock<Mutex> u_lock(mut);
          //This calls timed_unlock_upgradable_and_lock()
          scoped_lock<Mutex> e_lock(mut2);
- scoped_lock<Mutex> moved(move(u_lock), t);
- e_lock = move(moved);
+ scoped_lock<Mutex> moved(detail::move_impl(u_lock), t);
+ e_lock = detail::move_impl(moved);
       }
       {
          sharable_lock<Mutex> s_lock(mut);
          //This calls try_unlock_sharable_and_lock()
- scoped_lock<Mutex> e_lock(move(s_lock), try_to_lock);
+ scoped_lock<Mutex> e_lock(detail::move_impl(s_lock), try_to_lock);
       }
       {
          sharable_lock<Mutex> s_lock(mut);
          //This calls try_unlock_sharable_and_lock()
          scoped_lock<Mutex> e_lock(mut2);
- scoped_lock<Mutex> moved(move(s_lock), try_to_lock);
- e_lock = move(moved);
+ scoped_lock<Mutex> moved(detail::move_impl(s_lock), try_to_lock);
+ e_lock = detail::move_impl(moved);
       }
       //Conversions to upgradable_lock
       {
          upgradable_lock<Mutex> lock(mut);
- upgradable_lock<Mutex> u_lock(move(lock));
- lock.swap(move(u_lock));
+ upgradable_lock<Mutex> u_lock(detail::move_impl(lock));
+ lock.swap(detail::move_impl(u_lock));
       }
       {
          upgradable_lock<Mutex> lock(mut);
          upgradable_lock<Mutex> u_lock(mut2);
- upgradable_lock<Mutex> moved(move(lock));
- u_lock = move(moved);
+ upgradable_lock<Mutex> moved(detail::move_impl(lock));
+ u_lock = detail::move_impl(moved);
       }
       {
          sharable_lock<Mutex> s_lock(mut);
          //This calls unlock_sharable_and_lock_upgradable()
- upgradable_lock<Mutex> u_lock(move(s_lock), try_to_lock);
+ upgradable_lock<Mutex> u_lock(detail::move_impl(s_lock), try_to_lock);
       }
       {
          sharable_lock<Mutex> s_lock(mut);
          //This calls unlock_sharable_and_lock_upgradable()
          upgradable_lock<Mutex> u_lock(mut2);
- upgradable_lock<Mutex> moved(move(s_lock), try_to_lock);
- u_lock = move(moved);
+ upgradable_lock<Mutex> moved(detail::move_impl(s_lock), try_to_lock);
+ u_lock = detail::move_impl(moved);
       }
       {
          scoped_lock<Mutex> e_lock(mut);
          //This calls unlock_and_lock_upgradable()
- upgradable_lock<Mutex> u_lock(move(e_lock));
+ upgradable_lock<Mutex> u_lock(detail::move_impl(e_lock));
       }
       {
          scoped_lock<Mutex> e_lock(mut);
          //This calls unlock_and_lock_upgradable()
          upgradable_lock<Mutex> u_lock(mut2);
- upgradable_lock<Mutex> moved(move(e_lock));
- u_lock = move(moved);
+ upgradable_lock<Mutex> moved(detail::move_impl(e_lock));
+ u_lock = detail::move_impl(moved);
       }
       //Conversions to sharable_lock
       {
          sharable_lock<Mutex> lock(mut);
- sharable_lock<Mutex> s_lock(move(lock));
- lock.swap(move(s_lock));
+ sharable_lock<Mutex> s_lock(detail::move_impl(lock));
+ lock.swap(detail::move_impl(s_lock));
       }
       {
          sharable_lock<Mutex> lock(mut);
          sharable_lock<Mutex> s_lock(mut2);
- sharable_lock<Mutex> moved(move(lock));
- s_lock = move(moved);
+ sharable_lock<Mutex> moved(detail::move_impl(lock));
+ s_lock = detail::move_impl(moved);
       }
       {
          upgradable_lock<Mutex> u_lock(mut);
          //This calls unlock_upgradable_and_lock_sharable()
- sharable_lock<Mutex> s_lock(move(u_lock));
+ sharable_lock<Mutex> s_lock(detail::move_impl(u_lock));
       }
       {
          upgradable_lock<Mutex> u_lock(mut);
          //This calls unlock_upgradable_and_lock_sharable()
          sharable_lock<Mutex> s_lock(mut2);
- sharable_lock<Mutex> moved(move(u_lock));
- s_lock = move(moved);
+ sharable_lock<Mutex> moved(detail::move_impl(u_lock));
+ s_lock = detail::move_impl(moved);
       }
       {
          scoped_lock<Mutex> e_lock(mut);
          //This calls unlock_and_lock_sharable()
- sharable_lock<Mutex> s_lock(move(e_lock));
+ sharable_lock<Mutex> s_lock(detail::move_impl(e_lock));
       }
       {
          scoped_lock<Mutex> e_lock(mut);
          //This calls unlock_and_lock_sharable()
          sharable_lock<Mutex> s_lock(mut2);
- sharable_lock<Mutex> moved(move(e_lock));
- s_lock = move(moved);
+ sharable_lock<Mutex> moved(detail::move_impl(e_lock));
+ s_lock = detail::move_impl(moved);
       }
    }
 

Modified: branches/release/libs/interprocess/test/user_buffer_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/user_buffer_test.cpp (original)
+++ branches/release/libs/interprocess/test/user_buffer_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -62,6 +62,18 @@
    //Named new capable heap mem allocator
    wmanaged_heap_memory heap_buffer(memsize);
 
+ //Test move semantics
+ {
+ wmanaged_external_buffer user_default;
+ wmanaged_external_buffer temp_external(detail::move_impl(user_buffer));
+ user_default = detail::move_impl(temp_external);
+ user_buffer = detail::move_impl(user_default);
+ wmanaged_heap_memory heap_default;
+ wmanaged_heap_memory temp_heap(detail::move_impl(heap_buffer));
+ heap_default = detail::move_impl(temp_heap);
+ heap_buffer = detail::move_impl(heap_default);
+ }
+
    //Initialize memory
    user_buffer.reserve_named_objects(100);
    heap_buffer.reserve_named_objects(100);

Modified: branches/release/libs/interprocess/test/vector_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/vector_test.cpp (original)
+++ branches/release/libs/interprocess/test/vector_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -44,7 +44,16 @@
 
    if(!test::test_all_expand_bwd<int_vector>())
       return 1;
+/*
+ //First raw volatile ints
+ typedef test::expand_bwd_test_allocator<volatile int>
+ volatile_int_allocator_type;
+ typedef vector<volatile int, volatile_int_allocator_type>
+ volatile_int_vector;
 
+ if(!test::test_all_expand_bwd<volatile_int_vector>())
+ return 1;
+*/
    //Now user defined wrapped int
    typedef test::expand_bwd_test_allocator<test::int_holder>
       int_holder_allocator_type;
@@ -72,6 +81,9 @@
    typedef allocator<int, managed_shared_memory::segment_manager> ShmemAllocator;
    typedef vector<int, ShmemAllocator> MyVector;
 
+ //typedef allocator<volatile int, managed_shared_memory::segment_manager> ShmemVolatileAllocator;
+ //typedef vector<volatile int, ShmemVolatileAllocator> MyVolatileVector;
+
    typedef allocator<test::movable_int, managed_shared_memory::segment_manager> ShmemMoveAllocator;
    typedef vector<test::movable_int, ShmemMoveAllocator> MyMoveVector;
 
@@ -81,6 +93,9 @@
    if(test::vector_test<managed_shared_memory, MyVector>())
       return 1;
 
+ //if(test::vector_test<managed_shared_memory, MyVolatileVector>())
+ //return 1;
+
    if(test::vector_test<managed_shared_memory, MyMoveVector>())
       return 1;
 

Modified: branches/release/libs/interprocess/test/vector_test.hpp
==============================================================================
--- branches/release/libs/interprocess/test/vector_test.hpp (original)
+++ branches/release/libs/interprocess/test/vector_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -15,9 +15,6 @@
 #include <iostream>
 #include <functional>
 
-#include <boost/interprocess/managed_shared_memory.hpp>
-#include <boost/interprocess/containers/vector.hpp>
-#include <boost/interprocess/indexes/flat_map_index.hpp>
 #include <boost/interprocess/exceptions.hpp>
 #include <boost/interprocess/detail/move_iterator.hpp>
 #include <boost/interprocess/detail/move.hpp>
@@ -25,6 +22,7 @@
 #include "check_equal_containers.hpp"
 #include "movable_int.hpp"
 #include <string>
+#include <vector>
 #include "get_process_id_name.hpp"
 
 namespace boost{
@@ -50,18 +48,18 @@
    {
    IntType move_me(1);
    stdvector->insert(stdvector->begin()+size/2, 50, 1);
- shmvector->insert(shmvector->begin()+size/2, 50, move(move_me));
+ shmvector->insert(shmvector->begin()+size/2, 50, detail::move_impl(move_me));
    if(!test::CheckEqualContainers(shmvector, stdvector)) return false;
    }
    {
    IntType move_me(2);
- shmvector->assign(shmvector->size()/2, move(move_me));
+ shmvector->assign(shmvector->size()/2, detail::move_impl(move_me));
    stdvector->assign(stdvector->size()/2, 2);
    if(!test::CheckEqualContainers(shmvector, stdvector)) return false;
    }
    {
    IntType move_me(3);
- shmvector->assign(shmvector->size()*3-1, move(move_me));
+ shmvector->assign(shmvector->size()*3-1, detail::move_impl(move_me));
    stdvector->assign(stdvector->size()*3-1, 3);
    if(!test::CheckEqualContainers(shmvector, stdvector)) return false;
    }
@@ -111,7 +109,7 @@
 
          for(int i = 0; i < max; ++i){
             IntType new_int(i);
- shmvector->insert(shmvector->end(), move(new_int));
+ shmvector->insert(shmvector->end(), detail::move_impl(new_int));
             stdvector->insert(stdvector->end(), i);
          }
          if(!test::CheckEqualContainers(shmvector, stdvector)) return 1;
@@ -133,7 +131,7 @@
             IntType aux_vect[50];
             for(int i = 0; i < 50; ++i){
                IntType new_int(-1);
- aux_vect[i] = move(new_int);
+ aux_vect[i] = detail::move_impl(new_int);
             }
             int aux_vect2[50];
             for(int i = 0; i < 50; ++i){
@@ -156,7 +154,7 @@
             IntType aux_vect[50];
             for(int i = 0; i < 50; ++i){
                IntType new_int(-1);
- aux_vect[i] = move(new_int);
+ aux_vect[i] = detail::move_impl(new_int);
             }
             int aux_vect2[50];
             for(int i = 0; i < 50; ++i){
@@ -174,7 +172,7 @@
          if(!test::CheckEqualContainers(shmvector, stdvector)) return 1;
 
          IntType push_back_this(1);
- shmvector->push_back(move(push_back_this));
+ shmvector->push_back(detail::move_impl(push_back_this));
          stdvector->push_back(int(1));
          if(!test::CheckEqualContainers(shmvector, stdvector)) return 1;
 
@@ -189,7 +187,7 @@
 
          for(int i = 0; i < max; ++i){
             IntType insert_this(i);
- shmvector->insert(shmvector->begin(), move(insert_this));
+ shmvector->insert(shmvector->begin(), detail::move_impl(insert_this));
             stdvector->insert(stdvector->begin(), i);
          }
          if(!test::CheckEqualContainers(shmvector, stdvector)) return 1;

Modified: branches/release/libs/interprocess/test/windows_shared_memory_mapping_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/windows_shared_memory_mapping_test.cpp (original)
+++ branches/release/libs/interprocess/test/windows_shared_memory_mapping_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -23,98 +23,93 @@
 
 int main ()
 {
- std::string process_name;
- test::get_process_id_name(process_name);
-
    try{
- const std::size_t FileSize = 99999*2;
- //Create shared memory and file mapping
- windows_shared_memory mapping(create_only, process_name.c_str(), read_write, FileSize);
-
+ const char *names[2] = { test::get_process_id_name(), 0 };
+ for(unsigned int i = 0; i < sizeof(names)/sizeof(names[0]); ++i)
       {
+ const std::size_t FileSize = 99999*2;
          //Create a file mapping
- windows_shared_memory mapping(open_only, process_name.c_str(), read_write);
+ windows_shared_memory mapping
+ (create_only, names[i], read_write, FileSize);
 
- //Create two mapped regions, one half of the file each
- mapped_region region (mapping
- ,read_write
- ,0
- ,FileSize/2
- ,0);
-
- mapped_region region2(mapping
- ,read_write
- ,FileSize/2
- ,FileSize - FileSize/2
- ,0);
-
- //Fill two regions with a pattern
- unsigned char *filler = static_cast<unsigned char*>(region.get_address());
- for(std::size_t i = 0
- ;i < FileSize/2
- ;++i){
- *filler++ = static_cast<unsigned char>(i);
- }
+ {
 
- filler = static_cast<unsigned char*>(region2.get_address());
- for(std::size_t i = FileSize/2
- ;i < FileSize
- ;++i){
- *filler++ = static_cast<unsigned char>(i);
- }
- }
+ //Create two mapped regions, one half of the file each
+ mapped_region region (mapping
+ ,read_write
+ ,0
+ ,FileSize/2
+ ,0);
+
+ mapped_region region2(mapping
+ ,read_write
+ ,FileSize/2
+ ,FileSize - FileSize/2
+ ,0);
+
+ //Fill two regions with a pattern
+ unsigned char *filler = static_cast<unsigned char*>(region.get_address());
+ for(std::size_t i = 0
+ ;i < FileSize/2
+ ;++i){
+ *filler++ = static_cast<unsigned char>(i);
+ }
 
- //See if the pattern is correct in the file using two mapped regions
- {
- //Create a file mapping
- windows_shared_memory mapping(open_only, process_name.c_str(), read_write);
- mapped_region region(mapping, read_write, 0, FileSize/2, 0);
- mapped_region region2(mapping, read_write, FileSize/2, 0/*FileSize - FileSize/2*/, 0);
-
- unsigned char *checker = (unsigned char*)region.get_address();
- //Check pattern
- for(std::size_t i = 0
- ;i < FileSize/2
- ;++i){
- if(*checker++ != static_cast<unsigned char>(i)){
- return 1;
+ filler = static_cast<unsigned char*>(region2.get_address());
+ for(std::size_t i = FileSize/2
+ ;i < FileSize
+ ;++i){
+ *filler++ = static_cast<unsigned char>(i);
             }
          }
 
- //Check second half
- checker = (unsigned char *)region2.get_address();
+ //See if the pattern is correct in the file using two mapped regions
+ {
+ mapped_region region (mapping, read_only, 0, FileSize/2, 0);
+ mapped_region region2(mapping, read_only, FileSize/2, FileSize - FileSize/2, 0);
+
+ unsigned char *checker = (unsigned char*)region.get_address();
+ //Check pattern
+ for(std::size_t i = 0
+ ;i < FileSize/2
+ ;++i){
+ if(*checker++ != static_cast<unsigned char>(i)){
+ return 1;
+ }
+ }
+
+ //Check second half
+ checker = (unsigned char *)region2.get_address();
 
- //Check pattern
- for(std::size_t i = FileSize/2
- ;i < FileSize
- ;++i){
- if(*checker++ != static_cast<unsigned char>(i)){
- return 1;
+ //Check pattern
+ for(std::size_t i = FileSize/2
+ ;i < FileSize
+ ;++i){
+ if(*checker++ != static_cast<unsigned char>(i)){
+ return 1;
+ }
             }
          }
- }
-
- //Now check the pattern mapping a single read only mapped_region
- {
- //Create a file mapping
- windows_shared_memory mapping(open_only, process_name.c_str(), read_only);
 
- //Create a single regions, mapping all the file
- mapped_region region (mapping
- ,read_only);
-
- //Check pattern
- unsigned char *pattern = static_cast<unsigned char*>(region.get_address());
- for(std::size_t i = 0
- ;i < FileSize
- ;++i, ++pattern){
- if(*pattern != static_cast<unsigned char>(i)){
- return 1;
+ //Now check the pattern mapping a single read only mapped_region
+ {
+ //Create a single regions, mapping all the file
+ mapped_region region (mapping, read_only);
+
+ //Check pattern
+ unsigned char *pattern = static_cast<unsigned char*>(region.get_address());
+ for(std::size_t i = 0
+ ;i < FileSize
+ ;++i, ++pattern){
+ if(*pattern != static_cast<unsigned char>(i)){
+ return 1;
+ }
             }
          }
       }
    }
    catch(std::exception &exc){
+ //shared_memory_object::remove(test::get_process_id_name());
       std::cout << "Unhandled exception: " << exc.what() << std::endl;
       return 1;
    }

Modified: branches/release/libs/interprocess/test/windows_shared_memory_test.cpp
==============================================================================
--- branches/release/libs/interprocess/test/windows_shared_memory_test.cpp (original)
+++ branches/release/libs/interprocess/test/windows_shared_memory_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -68,6 +68,7 @@
       std::cout << ex.what() << std::endl;
       return 1;
    }
+
    return 0;
 }
 

Modified: branches/release/libs/intrusive/doc/Jamfile.v2
==============================================================================
--- branches/release/libs/intrusive/doc/Jamfile.v2 (original)
+++ branches/release/libs/intrusive/doc/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 # Boost.Intrusive library documentation Jamfile
 #
-# Copyright Ion Gaztañaga 2006.
+# Copyright Ion Gaztanaga 2006.
 # 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)

Modified: branches/release/libs/intrusive/doc/intrusive.qbk
==============================================================================
--- branches/release/libs/intrusive/doc/intrusive.qbk (original)
+++ branches/release/libs/intrusive/doc/intrusive.qbk 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -127,7 +127,7 @@
 
 [section:properties_of_intrusive Properties of Boost.Intrusive containers]
 
-Semantically, a [*Boost.Intrusive] container is similar to an STL container
+Semantically, a [*Boost.Intrusive] container is similar to a STL container
 holding pointers to objects. That is, if you have an intrusive list holding
 objects of type `T`, then `std::list<T*>` would allow you to do quite the
 same operations (maintaining and navigating a set of objects of type T and
@@ -141,7 +141,7 @@
 
 * The use of dynamic allocation to create copies of passed values can be a performance
    and size bottleneck in some applications. Normally, dynamic allocation imposes
- a size overhead for each allocation to store bookeeping information and a
+ a size overhead for each allocation to store bookkeeping information and a
    synchronization to protected concurrent allocation from different threads.
 
 * Only copies of objects are stored in non-intrusive containers. Hence copy
@@ -160,7 +160,7 @@
    equivalent container of pointers: iteration is faster.
 
 * Intrusive containers offer better exception guarantees than non-intrusive containers.
- In some situation intrusives containers offer a no-throw guarantee that can't be
+ In some situations intrusive containers offer a no-throw guarantee that can't be
    achieved with non-intrusive containers.
 
 * The computation of an iterator to an element from a pointer or reference to that element
@@ -168,19 +168,19 @@
    linear complexity).
 
 * Intrusive containers offer predictability when inserting and erasing objects since no
- memory managed is done with intrusive containers. Memory management usually is not a predicable
+ memory management is done with intrusive containers. Memory management usually is not a predictable
    operation so complexity guarantees from non-intrusive containers are looser than the guarantees
    offered by intrusive containers.
 
 Intrusive containers have also downsides:
 
 * Each type stored in an intrusive container needs additional memory holding the
- maintenance information needed by the container. Hence, whenever a certain type shall
+ maintenance information needed by the container. Hence, whenever a certain type will
    be stored in an intrusive container [*you have to change the definition of that type]
    appropriately. Although this task is easy with [*Boost.Intrusive], touching the
    definition of a type is sometimes a crucial issue.
 
-* In intrusive containers you don't store a copy of an object, [*but they rather the original object
+* In intrusive containers you don't store a copy of an object, [*but rather the original object
    is linked with other objects in the container]. Objects don't need copy-constructors or assignment
    operators to be stored in intrusive containers. But you have to take care of possible side effects,
    whenever you change the contents of an object (this is especially important for
@@ -194,14 +194,14 @@
    can be disposed before is erased from the container.
 
 * [*Boost.Intrusive] containers are [*non-copyable and non-assignable]. Since intrusive
- containers don't have allocation capabilities, these operations have no sense. However,
- swapping can be used to implement move-capabilities. To ease the implementation of
+ containers don't have allocation capabilities, these operations make no sense. However,
+ swapping can be used to implement move capabilities. To ease the implementation of
    copy constructors and assignment operators of classes storing [*Boost.Intrusive]
    containers, [*Boost.Intrusive] offers special cloning functions. See
    [link intrusive.clone_from Cloning [*Boost.Intrusive] containers] section for more information.
 
-* Analyzing thread-safety of a program that uses containers is harder with intrusive containers, becuase
- the container might be modified indirectly without an explicitly call to a container member.
+* Analyzing the thread safety of a program that uses containers is harder with intrusive containers, because
+ the container might be modified indirectly without an explicit call to a container member.
 
 [table Summay of intrusive containers advantages and disadvantages
     [[Issue] [Intrusive] [Non-intrusive]]
@@ -233,8 +233,8 @@
 If you plan to insert a class in an intrusive container, you have to make some decisions
 influencing the class definition itself. Each class that will be used in an intrusive
 container needs some appropriate data members storing the information needed by the
-container. We will take a simple intrusive container, like an intrusive list
-([classref boost::intrusive::list boost::intrusive::list]) for the following
+container. We will take a simple intrusive container, the intrusive list
+([classref boost::intrusive::list boost::intrusive::list]), for the following
 examples, but all [*Boost.Intrusive] containers are very similar. To compile
 the example using [classref boost::intrusive::list boost::intrusive::list],
 just include:
@@ -312,7 +312,7 @@
    [link intrusive.value_traits Containers with custom ValueTraits] section.
    [*If no option is specified, the container will be configured to use the base
    hook with the default tag].
- Some options configured for the hook (the type of the pointers, link mode...)
+ Some options configured for the hook (the type of the pointers, link mode, etc.)
    will be propagated to the container.
 
 * [*`constant_time_size<bool Enabled>`]: Specifies if a constant time `size()`
@@ -326,7 +326,7 @@
    is requested.
    The user normally will not need to change this type, but some
    containers can have a `size_type` that might be different from `std::size_t`
- (for example, STL-like containers, use the `size_type` defined by their allocator).
+ (for example, STL-like containers use the `size_type` defined by their allocator).
    [*Boost.Intrusive] can be used to implement such containers specifying the
    the type of the size. By default the type is `std::size_t`.
 
@@ -428,8 +428,8 @@
 
 [section:usage_both_hooks Using both hooks]
 
-You can insert the same object in several intrusive containers at the same time, just
-using one hook for each container. This is a full example using base and member hooks:
+You can insert the same object in several intrusive containers at the same time,
+using one hook per container. This is a full example using base and member hooks:
 
 [import ../example/doc_how_to_use.cpp]
 [doc_how_to_use_code]
@@ -456,7 +456,7 @@
 [section:usage_when When to use?]
 
 Intrusive containers can be used for highly optimized algorithms, where speed is a crucial
-issue and...
+issue and:
 
 * additional memory management should be avoided.
 * the programmer needs to efficiently track the construction and destruction of objects.
@@ -467,24 +467,24 @@
 * localization of data (e.g. for cache hit optimization) leads to measureable effects.
 
 The last point is important if you have a lot of containers over a set of elements. E.g. if
-you have a vector of objects (say, `std::vector<Object>`) and you also have a list
+you have a vector of objects (say, `std::vector<Object>`), and you also have a list
 storing a subset of those objects (`std::list<Object*>`), then operating on an Object
-from the list iterator (`std::list<Object*>::iterator`) needs two steps:
+from the list iterator (`std::list<Object*>::iterator`) requires two steps:
 
 * Access from the iterator (usually on the stack) to the list node storing a pointer to `Object`.
 * Access from the pointer to `Object` to the Object stored in the vector.
 
 While the objects themselves are tightly packed in the memory of the vector
-(vector's memory is guaranteed to be contiguous), and form something
-like a data block, list nodes can stay dispersed in the heap memory.
-Hence depending on your system you can get a lot of cache misses. The same doesn't hold
-for an intrusive list. Indeed, dereferencing an an iterator from an intrusive list is performed in
+(a vector's memory is guaranteed to be contiguous), and form something
+like a data block, list nodes may be dispersed in the heap memory.
+Hence depending on your system you might get a lot of cache misses. The same doesn't hold
+for an intrusive list. Indeed, dereferencing an iterator from an intrusive list is performed in
 the same two steps as described above. But the list node is already embedded in the Object, so
 the memory is directly tracked from the iterator to the Object.
 
 It's also possible to use intrusive containers when the objects to be stored can
 have different or unknown size. This allows storing base and derived objects
-in the same container as shown in the following example:
+in the same container, as shown in the following example:
 
 [import ../example/doc_window.cpp]
 [doc_window_code]
@@ -493,7 +493,7 @@
 they are often more difficult to use than their STL-counterparts. That's why you
 should avoid them in public interfaces of libraries. Classes to be stored in intrusive
 containers must change their implementation to store the hook and this is not always
-posible or desirable.
+possible or desirable.
 
 [endsect]
 
@@ -504,13 +504,13 @@
 
 [variablelist Brief Concepts Summary
 [[Node Algorithms][A class containing typedefs and static functions that define
- basic operations that can be applied to a groups of nodes. It's independent
- from the node definition, and it's configured taking a NodeTraits template
+ basic operations that can be applied to a group of nodes. It's independent
+ from the node definition and configured using a NodeTraits template
    parameter that describes the node.]]
-[[Node Traits][A class that stores basic information and operations to insert a node in a group of nodes.]]
+[[Node Traits][A class that stores basic information and operations to insert a node into a group of nodes.]]
 [[Hook][A class that a user must add as a base class or as a member to make the user class compatible with intrusive containers.]]
 [[Intrusive Container][A class that stores user classes that have the needed hooks. It takes a ValueTraits template parameter as configuration information.]]
-[[Pseudo-Intrusive Container][Similar to an intrusive container but a pseudo-intrusive container needs additional memory (e.g. an auxiliary array) to work.]]
+[[Semi-Intrusive Container][Similar to an intrusive container but a semi-intrusive container needs additional memory (e.g. an auxiliary array) to work.]]
 [[Value Traits][A class containing typedefs and operations to obtain the node to be used by Node Algorithms from the user class and the inverse.]]
 ]
 
@@ -528,27 +528,45 @@
    small for user classes (usually the size of two pointers). Many operations have
    constant time complexity.
 
-* [*set/multiset]: A `std::set/std::multiset` like intrusive associative containers.
+* [*set/multiset/rbtree]: `std::set/std::multiset` like intrusive associative containers
+ based on red-black trees.
    The size overhead is moderate for user classes (usually the size of three pointers).
    Many operations have logarithmic time complexity.
 
-[*Boost.Intrusive] also offers pseudo-intrusive containers:
+* [*avl_set/avl_multiset/avltree]: A `std::set/std::multiset` like intrusive associative
+ containers based on AVL trees.
+ The size overhead is moderate for user classes (usually the size of three pointers).
+ Many operations have logarithmic time complexity.
+
+* [*splay_set/splay_multiset/splaytree]: `std::set/std::multiset` like intrusive associative
+ containers based on splay trees. Splay trees have no constant operations, but they
+ have some interesting caching properties.
+ The size overhead is moderate for user classes (usually the size of three pointers).
+ Many operations have logarithmic time complexity.
+
+* [*sg_set/sg_multiset/sgtree]: A `std::set/std::multiset` like intrusive associative
+ containers based on scapegoat trees. Scapegoat can be configured with the desired
+ balance factor to achieve the desired rebalancing frequency/search time compromise.
+ The size overhead is moderate for user classes (usually the size of three pointers).
+ Many operations have logarithmic time complexity.
+
+[*Boost.Intrusive] also offers semi-intrusive containers:
 
-* [*unordered_set/unordered_multiset]: A `std::tr1::unordered_set/std::tr1::unordered_multiset`
+* [*unordered_set/unordered_multiset]: `std::tr1::unordered_set/std::tr1::unordered_multiset`
    like intrusive unordered associative containers.
    The size overhead is moderate for user classes (an average of two pointers per element).
- Many operations have an amortized constant time complexity.
+ Many operations have amortized constant time complexity.
 
-Each of these intrusive containers can be configured with constant or linear time
+Most of these intrusive containers can be configured with constant or linear time
 size:
 
-* [*Linear time size]: The intrusive container doesn't hold a size member that it's
-updated with every insertion/erasure. This implies that the `size()` function has not constant
+* [*Linear time size]: The intrusive container doesn't hold a size member that is
+updated with every insertion/erasure. This implies that the `size()` function doesn't have constant
 time complexity. On the other hand, the container is smaller, and some operations, like
-`splice()` taking a range of iterators in linked lists have constant time complexity
+`splice()` taking a range of iterators in linked lists, have constant time complexity
 instead of linear complexity.
 
-* [*Constant time size]: The intrusive container holds a size member that it's updated
+* [*Constant time size]: The intrusive container holds a size member that is updated
 with every insertion/erasure. This implies that the `size()` function has constant time
 complexity. On the other hand, increases the size of the container, and some operations,
 like `splice()` taking a range of iterators, have linear time complexity in linked lists.
@@ -566,19 +584,19 @@
    safe state and intrusive containers check that state before inserting a value in the
    container. When erasing an element from the container, the container puts the hook
    in the safe state again. This allows a safer use mode and it can be used to detect
- programming errors. It implies an slight performance overhead in some operations
- and can convert some constant time operations in linear time operations.
+ programming errors. It implies a slight performance overhead in some operations
+ and can convert some constant time operations to linear time operations.
 
 * [*Auto-unlink hooks]: The hook destructor removes the object from the container
    automatically and the user can safely unlink the object from the container without
- having any reference to the container.
+ referring to the container.
 
 * [*Non-raw pointers]: If the user wants to use smart pointers instead of raw pointers,
    [*Boost.Intrusive] hooks can
- be configured to use any type of pointers. This configuration information is also
+ be configured to use any type of pointer. This configuration information is also
    transmitted to the containers, so all the internal pointers used by intrusive containers
    configured with these hooks will be smart pointers. As an example,
- [*Boost.Interprocess] defines an smart pointer compatible with shared memory,
+ [*Boost.Interprocess] defines an mart pointer compatible with shared memory,
    called `offset_ptr`. [*Boost.Intrusive] can be configured to use this smart pointer
    to allow shared memory intrusive containers.
 
@@ -593,19 +611,19 @@
 
 [c++]
 
- //Configuring explicity the safe mode
+ //Configuring the safe mode explicitly
    class Foo : public list_base_hook< link_mode<safe_link> >
    {};
 
-Thanks to the safe-mode the user can detect without any external reference, if the object
-is actually inserted in a container. Let's review the basic features of the safe-mode:
+With the safe mode the user can detect if the object
+is actually inserted in a container without any external reference. Let's review the basic features of the safe mode:
 
-* Hooks' constructor puts the hook in a well-known default state.
+* Hook's constructor puts the hook in a well-known default state.
 
-* Hooks' destructor checks if the hook is in the well-known default state. If not,
+* Hook's destructor checks if the hook is in the well-known default state. If not,
    an assertion is raised.
 
-* Every time an object is being inserted in the intrusive container, the container
+* Every time an object is inserted in the intrusive container, the container
    checks if the hook is in the well-known default state. If not,
    an assertion is raised.
 
@@ -613,9 +631,9 @@
    puts the erased object in the well-known default state.
 
 With these features, without any external reference the user can know if the object
-has been inserted in a container calling the `is_linked()` member function.
+has been inserted in a container by calling the `is_linked()` member function.
 If the object is not actually inserted
-in a container, the hook is in the default state and if it's inserted in a container, the
+in a container, the hook is in the default state, and if it is inserted in a container, the
 hook is not in the default state.
 
 [endsect]
@@ -637,7 +655,7 @@
 * `BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT`: This assertion will be
    used in hooks' destructors to check that the hook is in a default state.
 
-If any of these macros is not redefined, the assertion will be defaul to `BOOST_ASSERT`.
+If any of these macros is not redefined, the assertion will default to `BOOST_ASSERT`.
 
 [endsect]
 
@@ -652,17 +670,17 @@
 * When the destructor of the hook is called, the hook checks if the node is inserted
    in a container. If so, the hook removes the node from the container.
 * The hook has a member function called `unlink()` that can be used to unlink the
- node from the container at any moment, without having any reference to the container,
- if the user want to do so.
+ node from the container at any time, without having any reference to the container,
+ if the user wants to do so.
 
-These hooks have exactly the same size overhead as their analogue non auto-unlinking
+These hooks have exactly the same size overhead as their analog non auto-unlinking
 hooks, but they have a restriction: they can only be used with
 [link intrusive.presenting_containers non-constant time containers].
 There is a reason for this:
 
 * Auto-unlink hooks don't store any reference to the container where they are inserted.
 * Only containers with non constant-time `size()` allow removing an object from the container
- without using any reference to the container.
+ without referring to the container.
 
 This auto-unlink feature is useful in certain applications
 but it must be used [*very carefuly]:
@@ -678,11 +696,11 @@
 
 * Hooks' constructors put the hook in a well-known default state.
 
-* Every time an object is being inserted in the intrusive container, the container
- checks if the hook is the well-known default state. If not,
+* Every time an object is inserted in the intrusive container, the container
+ checks if the hook is in the well-known default state. If not,
    an assertion is raised.
 
-* Every time an object is being erased from the intrusive container, the container
+* Every time an object is erased from an intrusive container, the container
    puts the erased object in the well-known default state.
 
 [endsect]
@@ -700,7 +718,7 @@
 
 As explained, [*Boost.Intrusive] auto-unlink hooks are incompatible with containers
 that have constant-time `size()`, so if you try to define such container with an
-auto-unlink hook's value_traits, you will get an static assertion:
+auto-unlink hook's value_traits, you will get a static assertion:
 
 [c++]
    
@@ -745,17 +763,17 @@
 
 [classref boost::intrusive::slist slist] is the simplest intrusive container of
 [*Boost.Intrusive]: a singly linked list. The memory overhead
-that imposes is 1 pointer per node. The size of an empty, non constant-time size
-[classref boost::intrusive::slist slist], is the size of 1 pointer. This
-lightweight memory overhead comes with its drawbacks, though: many operations have
+it imposes is 1 pointer per node. The size of an empty, non constant-time size
+[classref boost::intrusive::slist slist] is the size of 1 pointer. This
+lightweight memory overhead comes with drawbacks, though: many operations have
 linear time complexity, even some that usually are constant time, like
 [classref boost::intrusive::slist::swap swap]. [classref boost::intrusive::slist slist]
 only provides forward iterators.
 
 For most cases, a doubly linked list is preferrable because it offers more
-constant-time functions with a slightly bigger overhead.
+constant-time functions with a slightly bigger size overhead.
 However, for some applications like
-constructing more elaborated containers, singly linked lists are essential
+constructing more elaborate containers, singly linked lists are essential
 because of their low size overhead.
 
 [section:slist_hooks slist hooks]
@@ -784,7 +802,8 @@
    it [classref boost::intrusive::slist slist]-compatible.
 
 [classref boost::intrusive::slist_base_hook slist_base_hook] and
-[classref boost::intrusive::slist_member_hook slist_member_hook] receive the same options explained in
+[classref boost::intrusive::slist_member_hook slist_member_hook]
+receive the same options explained in
 the section [link intrusive.usage How to use Boost.Intrusive]:
 
 * [*`tag<class Tag>`] (for base hooks only): This argument serves as a tag,
@@ -807,25 +826,41 @@
    template <class T, class ...Options>
    class slist;
 
-[classref boost::intrusive::slist slist] receives the same options explained in
+[classref boost::intrusive::slist slist] receives the options explained in
 the section [link intrusive.usage How to use Boost.Intrusive]:
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`constant_time_size<bool Enabled>`]: To activate the constant-time `size()` operation.
    Default: `constant_time_size<true>`
 
 * [*`size_type<bool Enabled>`]: To specify the type that will be used to store the size
- of the container. Default: `size_type<std::size_t>`
+ of the container. Default: `size_type<std::size_t>`.
+
+[classref boost::intrusive::slist slist] can receive additional options:
+
+* [*`linear<bool Enable>`]: the singly linked list is implemented as a
+ null-terminated list instead of a circular list. This allows `O(1)` swap,
+ but losses some operations like `container_from_end_iterator`.
+* [*`cache_last<bool Enable>`]: the singly linked also stores a pointer to the
+ last element of the singly linked list. This allows `O(1)` swap,
+ `splice_after(iterator, slist &)` and makes the list offer new functions
+ like `push_back(reference)` and `back()`. Logically, the size an empty list is
+ increased in `sizeof(void_pointer)` and the the cached last node pointer must
+ be updated in every operation, and that might incur in a slight performance impact.
+
+`auto_unlink` hooks are not usable if `linear<true>` and/or `cache_last<true>` options are
+used. If `auto_unlink` hooks are used and those options are specified, a static
+assertion will be raised.
 
 [endsect]
 
 [section:slist_example Example]
 
-Now let's see an small example using both hooks:
+Now let's see a small example using both hooks:
 
 [import ../example/doc_slist.cpp]
 [doc_slist_code]
@@ -837,10 +872,10 @@
 [section:list Intrusive doubly linked list: list]
 
 [classref boost::intrusive::list list] is a doubly linked list. The memory overhead
-that imposes is 2 pointers per node. An empty, non constant-time size [classref boost::intrusive::list list]
-has also the size of 2 pointers. [classref boost::intrusive::list list]
+it imposes is 2 pointers per node. An empty, non constant-time size [classref boost::intrusive::list list]
+also has the size of 2 pointers. [classref boost::intrusive::list list]
 has many more constant-time operations than [classref boost::intrusive::slist slist]
-and provides bidirectional iterator. It's recommendable to use use
+and provides a bidirectional iterator. It is recommended to use
 [classref boost::intrusive::list list] instead of
 [classref boost::intrusive::slist slist] if the size overhead is acceptable:
 
@@ -898,8 +933,8 @@
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`constant_time_size<bool Enabled>`]: To activate the constant-time `size()` operation.
    Default: `constant_time_size<true>`
@@ -911,7 +946,7 @@
 
 [section:list_example Example]
 
-Now let's see an small example using both hooks:
+Now let's see a small example using both hooks:
 
 [import ../example/doc_list.cpp]
 [doc_list_code]
@@ -939,7 +974,7 @@
 has also the size of 3 pointers and an integer (3 pointers when optimized for size).
 These containers have logarithmic complexity in many
 operations like
-searches, insertions, erasures, etc... [classref boost::intrusive::set set] and
+searches, insertions, erasures, etc. [classref boost::intrusive::set set] and
 [classref boost::intrusive::multiset multiset] are the
 intrusive equivalents of standard `std::set` and `std::multiset` containers.
 
@@ -1021,8 +1056,8 @@
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`constant_time_size<bool Enabled>`]: To activate the constant-time `size()` operation.
    Default: `constant_time_size<true>`
@@ -1040,7 +1075,7 @@
 
 [section:set_multiset_example Example]
 
-Now let's see an small example using both hooks and both containers:
+Now let's see a small example using both hooks and both containers:
 
 [import ../example/doc_set.cpp]
 [doc_set_code]
@@ -1049,17 +1084,17 @@
 
 [endsect]
 
-[section:unordered_set_unordered_multiset Pseudo-Intrusive unordered associative containers: unordered_set, unordered_multiset]
+[section:unordered_set_unordered_multiset Semi-Intrusive unordered associative containers: unordered_set, unordered_multiset]
 
 [*Boost.Intrusive] also offers hashed containers that can be very useful to implement
 fast-lookup containers. These containers
 ([classref boost::intrusive::unordered_set unordered_set] and [classref boost::intrusive::unordered_multiset unordered_multiset])
-are pseudo-intrusive containers: they need additional memory apart from the hook
+are semi-intrusive containers: they need additional memory apart from the hook
 stored in the `value_type`. This additional
 memory must be passed in the constructor of the container.
 
 Unlike C++ TR1 unordered associative containers (which are also hashed containers),
-the contents of these pseudo-intrusive containers are not rehashed to maintain a
+the contents of these semi-intrusive containers are not rehashed to maintain a
 load factor: that would require memory management and intrusive containers don't
 implement any memory management at all. However, the user can request an explicit
 rehashing passing a new bucket array.
@@ -1151,6 +1186,11 @@
    rehashing is frequent or hashing the value is a slow operation.
    Default: `store_hash<false>`.
 
+* [*`optimize_multikey<bool Enabled>`]: This option reserves additional space in
+ the hook that will be used to group equal elements in unordered multisets,
+ improving significantly the performance when many equal values are inserted
+ in these containers. Default: `optimize_multikey<false>`.
+
 [endsect]
 
 [section:unordered_set_unordered_multiset_containers unordered_set and unordered_multiset containers]
@@ -1201,8 +1241,8 @@
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`constant_time_size<bool Enabled>`]: To activate the constant-time `size()` operation.
    Default: `constant_time_size<true>`
@@ -1210,7 +1250,7 @@
 * [*`size_type<bool Enabled>`]: To specify the type that will be used to store the size
    of the container. Default: `size_type<std::size_t>`
 
-And they also can receive two additional options:
+And they also can receive additional options:
 
 * [*`equal<class Equal>`]: Equality function for the objects to be inserted
    in containers. Default: `equal< std::equal_to<T> >`
@@ -1228,13 +1268,31 @@
    modulo operations and for some applications modulo operations can impose
    a considerable overhead. In debug mode an assertion will be raised if the user
    provides a bucket length that is not power of two.
- Default: `constant_time_size<false>`.
+ Default: `power_2_buckets<false>`.
+
+* [*`cache_begin<bool Enabled>`]: Due to its internal structure, finding the first
+ element of an unordered container (`begin()` operation) is
+ amortized constant-time. It's possible to speed up `begin()` and other operations
+ related to it (like `clear()`) if the container caches internally the position
+ of the first element. This imposes the overhead of one pointer to the size
+ of the container. Default: `cache_begin<false>`.
+
+* [*`compare_hash<bool Enabled>`]:
+ [*Note: this option requires `store_hash<true>` option in the hook].
+ When the comparison function is expensive,
+ (e.g. strings with a long common predicate) sometimes (specially when the
+ load factor is high or we have many equivalent elements in an
+ [classref boost::intrusive::unordered_multiset unordered_multiset] and
+ no `optimize_multikey<>` is activatedin the hook)
+ the equality function is a performance problem. Two equal values must have
+ equal hashes, so comparing the hash values of two elements before using the
+ comparison functor can speed up some implementations.
 
 [endsect]
 
 [section:unordered_set_unordered_multiset_example Example]
 
-Now let's see an small example using both hooks and both containers:
+Now let's see a small example using both hooks and both containers:
 
 [import ../example/doc_unordered_set.cpp]
 [doc_unordered_set_code]
@@ -1277,9 +1335,9 @@
 Boost.Intrusive associative containers). However, there are other interesting data
 structures that offer some advantages (and also disadvantages).
 
-Splay trees are self-adjusting binary search trees used tipically in caches, memory
+Splay trees are self-adjusting binary search trees used typically in caches, memory
 allocators and other applications, because splay trees have a "caching effect": recently
-accessed elements have better access times that elements accessed less frequently.
+accessed elements have better access times than elements accessed less frequently.
 For more information on splay trees see [@http://en.wikipedia.org/wiki/Splay_tree Wikipedia entry].
 
 [*Boost.Intrusive] offers 3 containers based on splay trees:
@@ -1291,23 +1349,23 @@
 that offers functions both to insert unique and multiple keys.
 
 The memory overhead of these containers with Boost.Intrusive hooks is usually 3 pointers.
-An empty, non constant-time size splay container has also the size of 3 pointers.
+An empty, non constant-time size splay container has also a size of 3 pointers.
 
 [section:splay_set_multiset_disadvantages Advantages and disadvantages of splay tree based containers]
 
 Splay tree based intrusive containers have logarithmic complexity in many
-operations like searches, insertions, erasures, etc... but if some elements are
+operations like searches, insertions, erasures, etc., but if some elements are
 more frequently accessed than others, splay trees perform faster searches than equivalent
 balanced binary trees (such as red-black trees).
 
 The caching effect offered by splay trees comes with a cost: the tree must be
-rebalanced when a element is searched. This disallows const versions of search
+rebalanced when an element is searched. This disallows const versions of search
 functions like `find()`, `lower_bound()`, `upper_bound()`, `equal_range()`,
-`count()`...
+`count()`, etc.
 
 Because of this, splay-tree based associative containers are not drop-in
 replacements of [classref boost::intrusive::set set]/
-[classref boost::intrusive::splay_set splay_set].
+[classref boost::intrusive::multiset multiset].
 
 Apart from this, if element searches are randomized, the tree will be rebalanced
 without taking advantage of the cache effect, so splay trees can offer worse
@@ -1376,8 +1434,8 @@
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`constant_time_size<bool Enabled>`]: To activate the constant-time `size()` operation.
    Default: `constant_time_size<true>`
@@ -1401,11 +1459,11 @@
 These hooks can be used by other intrusive containers like
 intrusive scapegoat containers
 [classref boost::intrusive::sg_set sg_set] and
-[classref boost::intrusive::sg_multiset sg_multiset] so a programmer
+[classref boost::intrusive::sg_multiset sg_multiset]. A programmer
 might prefer using a binary search tree hook so that the same type
-can be introduced in some situations in an splay container but that
-can also be introduced in other compatible containers as well when
-the hook is not being used in an splay container.
+can be inserted in some situations in a splay container but
+also inserted in other compatible containers when
+the hook is not being used in a splay container.
 
 [classref boost::intrusive::bs_set_base_hook bs_set_base_hook] and
 [classref boost::intrusive::bs_set_base_hook bs_set_member_hook] admit
@@ -1415,7 +1473,7 @@
 
 [section:splay_set_multiset_example Example]
 
-Now let's see an small example using both splay hooks,
+Now let's see a small example using both splay hooks,
 binary search tree hooks and
 [classref boost::intrusive::splay_set splay_set]/
 [classref boost::intrusive::splay_multiset splay_multiset]
@@ -1432,7 +1490,7 @@
 
 Similar to red-black trees, AVL trees are balanced binary trees.
 AVL trees are often compared with red-black trees because they support the same set of operations
-and because red-black trees also take O(log n) time for the basic operations.
+and because both take O(log n) time for basic operations.
 AVL trees are more rigidly balanced than Red-Black trees, leading to slower insertion and
 removal but faster retrieval, so AVL trees perform better
 than red-black trees for lookup-intensive applications.
@@ -1453,7 +1511,7 @@
 An empty, non constant-time size [classref boost::intrusive::avl_set avl_set],
 [classref boost::intrusive::avl_multiset avl_multiset] or
 [classref boost::intrusive::avltree avltree]
-has also the size of 3 pointers and an integer (3 pointers when optimized for size).
+also has a size of 3 pointers and an integer (3 pointers when optimized for size).
 
 [section:avl_set_multiset_hooks avl_set, avl_multiset and avltree hooks]
 
@@ -1524,8 +1582,8 @@
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`constant_time_size<bool Enabled>`]: To activate the constant-time `size()` operation.
    Default: `constant_time_size<true>`
@@ -1543,7 +1601,7 @@
 
 [section:avl_set_multiset_example Example]
 
-Now let's see an small example using both hooks and
+Now let's see a small example using both hooks and
 [classref boost::intrusive::avl_set avl_set]/
 [classref boost::intrusive::avl_multiset avl_multiset]
 containers:
@@ -1565,22 +1623,22 @@
 search tree.
 
 A binary search tree is said to be weight balanced if half the nodes are on the left
-of the root, and half on the right. An α-height-balanced tree is defined with defined
+of the root, and half on the right. An a-height-balanced tree is defined with defined
 with the following equation:
 
-[*['height(tree) <= log1/α(tree.size())]]
+[*['height(tree) <= log1/a(tree.size())]]
 
-* [*['α == 1]]: A tree forming a linked list is considered balanced.
-* [*['α == 0.5]]: Only a perfectly balanced binary is considered balanced.
+* [*['a == 1]]: A tree forming a linked list is considered balanced.
+* [*['a == 0.5]]: Only a perfectly balanced binary is considered balanced.
 
-Scapegoat trees are loosely ['α-height-balanced] so:
+Scapegoat trees are loosely ['a-height-balanced] so:
 
-[*['height(tree) <= log1/α(tree.size()) + 1]]
+[*['height(tree) <= log1/a(tree.size()) + 1]]
 
-Scapegoat trees support any α between 0.5 and 1. If α is higher, the tree is rebalanced
+Scapegoat trees support any a between 0.5 and 1. If a is higher, the tree is rebalanced
 less often, obtaining quicker insertions but slower searches. Lower
-α values improve search times. Scapegoat-trees implemented in [*Boost.Intrusive] offer the possibility of
-[*changing α at run-time] taking advantage of the flexibility of scapegoat trees.
+a values improve search times. Scapegoat-trees implemented in [*Boost.Intrusive] offer the possibility of
+[*changing a at run-time] taking advantage of the flexibility of scapegoat trees.
 For more information on scapegoat trees see [@http://en.wikipedia.org/wiki/Scapegoat_tree Wikipedia entry].
 
 Scapegoat trees also have downsides:
@@ -1591,7 +1649,7 @@
    tree is also considerably increased.
 
 * The operations needed to determine if the tree is unbalanced require floating-point
- operations like ['log1/α]. If the system has no floating point operations (like some
+ operations like ['log1/a]. If the system has no floating point operations (like some
    embedded systems), scapegoat tree operations might become slow.
 
 [*Boost.Intrusive] offers 3 containers based on scapegoat trees:
@@ -1675,8 +1733,8 @@
 
 * [*`base_hook<class Hook>`] / [*`member_hook<class T, class Hook, Hook T::* PtrToMember>`] /
    [*`value_traits<class ValueTraits>`]: To specify the hook type or value traits used
- to configure the container (to know about value traits go to the section
- titled [link intrusive.value_traits Containers with custom ValueTraits].
+ to configure the container. (To learn about value traits go to the section
+ [link intrusive.value_traits Containers with custom ValueTraits].)
 
 * [*`size_type<bool Enabled>`]: To specify the type that will be used to store the size
    of the container. Default: `size_type<std::size_t>`
@@ -1689,16 +1747,16 @@
 
 * [*`floating_point<bool Enable>`]:
    When this option is deactivated, the scapegoat tree loses the ability to change
- the balance factor α at run-time, but the size of an empty container is reduced
+ the balance factor a at run-time, but the size of an empty container is reduced
    and no floating point operations are performed, normally increasing container
- performance. The fixed α factor that is used when this option is activated
+ performance. The fixed a factor that is used when this option is activated
    is ['1/sqrt(2) ~ 0,70711]. Default: `floating_point<true>`
 
 [endsect]
 
 [section:sg_set_multiset_example Example]
 
-Now let's see an small example using both hooks and
+Now let's see a small example using both hooks and
 [classref boost::intrusive::sg_set sg_set]/
 [classref boost::intrusive::sg_multiset sg_multiset]
 containers:
@@ -1739,9 +1797,9 @@
 have some inefficiencies caused by the interface: the user can only operate with `value_type`
 objects. When using these containers we must use `iterator find(const value_type &value)`
 to find a value. The same happens in other functions
-like `equal_range`, `lower_bound`, `upper_bound`...
+like `equal_range`, `lower_bound`, `upper_bound`, etc.
 
-However, sometimes the object to be searched it's quite expensive to construct:
+However, sometimes the object to be searched is quite expensive to construct:
 
 [import ../example/doc_assoc_optimized_code.cpp]
 [doc_assoc_optimized_code_normal_find]
@@ -1758,7 +1816,7 @@
 
 Sometimes this interface limitation is severe, because
 we [*might not have enough information to construct the object] but we might
-[*have enough information to find the object]. In this case, a name it's enough
+[*have enough information to find the object]. In this case, a name is enough
 to search `Expensive` in the container but constructing an `Expensive`
 might require more information that the user might not have.
 
@@ -1815,7 +1873,7 @@
 `insert_check` is similar to a normal `insert` but:
 
 * `insert_check` can be used with arbitrary keys
-* if the insertion is possible (there is no equivalent value) collects all the needed information
+* if the insertion is possible (there is no equivalent value) `insert_check` collects all the needed information
 in an `insert_commit_data` structure, so that `insert_commit`:
    * [*does not execute] further comparisons
    * can be executed with [*constant-time complexity]
@@ -1824,7 +1882,7 @@
 These functions must be used with care, since
 no other insertion or erasure must be executed between an `insert_check` and an `insert_commit`
 pair. Otherwise, the behaviour is undefined.
-`insert_check` and `insert_commit` will come handy
+`insert_check` and `insert_commit` will come in handy
 for developers programming efficient non-intrusive associative containers.
 See [classref boost::intrusive::set set]
 and [classref boost::intrusive::unordered_set unordered_set] reference for more information about
@@ -1870,13 +1928,13 @@
 
 With this function the user can efficiently remove and destroy elements if the disposer
 function destroys an object: `remove_and_dispose_if`
-will call "disposer" function object for every removed element. [classref boost::intrusive::list list] offers
+will call the "disposer" function object for every removed element. [classref boost::intrusive::list list] offers
 more functions taking a disposer function object as argument, like `erase_and_dispose`, `clear_and_dispose`,
-`remove_and_dispose`...
+`remove_and_dispose`, etc.
 
 Note that the disposing function does not need to just destroy the object. It can
 implement any other operation like inserting the remove object in another container.
-Let's see an small example:
+Let's see a small example:
 
 [import ../example/doc_erasing_and_disposing.cpp]
 [doc_erasing_and_disposing]
@@ -1893,13 +1951,13 @@
 As previously mentioned, [*Boost.Intrusive] containers are [*non-copyable and non-assignable], because
 intrusive containers don't allocate memory at all. To implement a copy-constructor or assignment operator,
 the user must clone one by one all the elements of the container and insert them in another intrusive container.
-However, cloning by hand is usually more inefficient than a member cloning function and an specialized cloning
+However, cloning by hand is usually more inefficient than a member cloning function and a specialized cloning
 function can offer more guarantees than the manual cloning (better exception safety guarantees, for example).
 
 To ease the implementation of copy constructors and assignment operators of classes containing [*Boost.Intrusive]
-containers, all [*Boost.Intrusive] containers offer an special cloning function called `clone_from`.
+containers, all [*Boost.Intrusive] containers offer a special cloning function called `clone_from`.
 
-Apart from the container to be cloned, `clone_from` takes two function objects as arguments. For example, the
+Apart from the container to be cloned, `clone_from` takes two function objects as arguments. For example, consider the
 `clone_from` member function of [classref boost::intrusive::list list]:
 
 [c++]
@@ -1918,8 +1976,8 @@
    
 The cloning function works as follows:
 
-* First clears and disposes all the elements from *this using the disposer function object.
-* After that starts cloning all the elements of the source container using the cloner function object.
+* First it clears and disposes all the elements from *this using the disposer function object.
+* After that it starts cloning all the elements of the source container using the cloner function object.
 * If any operation in the cloning function (for example, the cloner function object) throws,
    all the constructed elements are disposed using the disposer function object.
 
@@ -1934,9 +1992,9 @@
 [section:using_smart_pointers Using smart pointers with Boost.Intrusive containers]
 
 [*Boost.Intrusive] hooks can be configured to use other pointers than raw pointers.
-When a [*Boost.Intrusive] hook is configured with an smart pointer as an argument,
+When a [*Boost.Intrusive] hook is configured with a smart pointer as an argument,
 this pointer configuration is passed to the containers. For example, if the following
-hook is configured with an smart pointer (for example, an offset pointer from
+hook is configured with a smart pointer (for example, an offset pointer from
 [*Boost.Interprocess]):
 
 [import ../example/doc_offset_ptr.cpp]
@@ -1951,7 +2009,7 @@
 
 [section:smart_pointers_requirements Requirements for smart pointers compatible with Boost.Intrusive]
 
-Not every smart pointer is compatible with [*Boost.Intrusive], the smart pointer must
+Not every smart pointer is compatible with [*Boost.Intrusive]; the smart pointer must
 have the following features:
 
 * It must support the same operations as a raw pointer, except casting.
@@ -1961,7 +2019,7 @@
 
 The conversion from the smart pointer to a raw pointer must be implemented following
 Boost smart pointer `detail::get_pointer()` function. This function will be found using
-ADL. For example, for `boost::interprocess::offset_ptr` `detail::get_pointer` is defined
+ADL. For example, for `boost::interprocess::offset_ptr`, `detail::get_pointer` is defined
 as follows:
 
 [c++]
@@ -2009,11 +2067,11 @@
 have their `s_local_iterator_to` static alternatives.
 
 Alternative static functions are available under certain circunstances
-explained in the [link intrusive.value_traits.stateful_value_traits Stateful value traits] section,
-but the programmer uses hooks provided by [*Boost.Intrusive], those functions
+explained in the [link intrusive.value_traits.stateful_value_traits Stateful value traits] section;
+if the programmer uses hooks provided by [*Boost.Intrusive], those functions
 will be available.
 
-Let's see an small function that shows the use of `iterator_to` and
+Let's see a small function that shows the use of `iterator_to` and
 `local_iterator_to`:
 
 [import ../example/doc_iterator_from_value.cpp]
@@ -2021,6 +2079,51 @@
 
 [endsect]
 
+[section:any_hooks Any Hooks: A single hook for any Intrusive container]
+
+Sometimes, a class programmer wants to place a class in several intrusive
+containers but no at the same time. In this case, the programmer might
+decide to insert two hooks in the same class.
+
+[c++]
+
+ class MyClass
+ : public list_base_hook<>, public slist_base_hook<> //...
+ {};
+
+However, there is a more size-efficient alternative in [*Boost.Intrusive]: "any" hooks
+([classref boost::intrusive::any_base_hook any_base_hook] and
+[classref boost::intrusive::any_member_hook any_member_hook].
+These hooks can be used to store a type in several containers
+offered by [*Boost.Intrusive] minimizing the size of the class.
+
+These hooks support these options:
+
+* [*`tag<class Tag>`] (for base hooks only): This argument serves as a tag,
+ so you can derive from more than one slist hook.
+ Default: `tag<default_tag>`.
+
+* [*`link_mode<link_mode_type LinkMode>`]: The linking policy.
+ `link_mode<auto_unlink>` is [*not] supported and `link_mode<safe_mode>`
+ might offer weaker error detection in any hooks than in other hooks.
+ Default: `link_mode<safe_link>`.
+
+* [*`void_pointer<class VoidPointer>`]: The pointer type to be used
+ internally in the hook and propagated to the container.
+ Default: `void_pointer<void*>`.
+
+`auto_unlink` can't be supported because the hook does not know in which type of might
+be inserted container. Additionally, these hooks don't support `unlink()` and
+`swap_nodes()` operations for the same reason.
+
+Here's an example that creates a class with two any hooks, and uses one to insert the
+class in a [classref slist] and the other one in a [classref list].
+
+[import ../example/doc_any_hook.cpp]
+[doc_any_hook]
+
+[endsect]
+
 [section:concepts Concepts explained]
 
 This section will expand the explanation of previously presented basic concepts
@@ -2028,11 +2131,11 @@
 
 * [*Node Algorithms]: A set of static functions that implement basic operations
    on a group of nodes: initialize a node, link_mode_type a node to a group of nodes,
- unlink a node from another group of nodes... For example, a circular
+ unlink a node from another group of nodes, etc. For example, a circular
    singly linked list is a group of nodes, where each node has a pointer to the
    next node. [*Node Algorithms] just require a [*NodeTraits]
    template parameter and they can work with any [*NodeTraits] class that fulfills
- the needed interface. As an example, here is a class that implements algorithms
+ the needed interface. As an example, here is a class that implements operations7'
    to manage a group of nodes forming a circular singly linked list:
 
 [c++]
@@ -2069,11 +2172,11 @@
    };
 
 * [*Node Traits]: A class that encapsulates the basic information and
- operations on a node that forms a group of nodes:
- the type of the node, a function to obtain the pointer to the next node...
- [*Node Traits] are the configuration information [*Node Algorithms]
- need. Each type of [*Node Algorithms] expects an interface that compatible
- [*Node Traits] must implement.
+ operations on a node within a group of nodes:
+ the type of the node, a function to obtain the pointer to the next node, etc.
+ [*Node Traits] specify the configuration information [*Node Algorithms]
+ need. Each type of [*Node Algorithm] expects an interface that compatible
+ [*Node Traits] classes must implement.
    As an example, this is the definition of a [*Node Traits] class that
    is compatible with the previously presented `my_slist_algorithms`:
 
@@ -2102,7 +2205,7 @@
 
 * [*Hook]: A class that the user must add as a base class or as a member to his own
    class to make that class insertable in an intrusive container. Usually the hook
- contains a node object, that will be used to form the group of nodes:
+ contains a node object that will be used to form the group of nodes:
    For example, the following class is a [*Hook] that the user can add as a base class,
    to make the user class compatible with a singly linked list container:
 
@@ -2140,11 +2243,11 @@
       int value_;
    };
 
-* [*Intrusive Container]: A container that offers an STL-like interface to store
+* [*Intrusive Container]: A container that offers a STL-like interface to store
    user objects. An intrusive container can be templatized to store different
- value types that use different hooks. An intrusive container is also more elaborated
+ value types that use different hooks. An intrusive container is also more elaborate
    than a group of nodes: it can store the number of elements to achieve constant-time
- size information, it can offer debugging facilities...
+ size information, it can offer debugging facilities, etc.
    For example, an [classref boost::intrusive::slist slist] container
    (intrusive singly linked list) should
    be able to hold `MyClass` objects that might have decided to store the hook
@@ -2176,7 +2279,7 @@
       // ...
    };
 
-* [*Pseudo-Intrusive Container]: A pseudo-intrusive container is similar to an
+* [*Semi-Intrusive Container]: A semi-intrusive container is similar to an
    intrusive container, but apart from the values to be inserted in the container,
    it needs additional memory (for example, auxiliary arrays or indexes).
 
@@ -2336,7 +2439,7 @@
 
 
 An empty tree is formed by a node whose pointer to the parent node is null,
-the pointers to the left and right nodes to itself and whose color is red.
+the left and right node pointers point to itself, and whose color is red.
 [classref boost::intrusive::rbtree_algorithms rbtree_algorithms]
 is configured with a NodeTraits class, which encapsulates
 the information about the node to be manipulated. NodeTraits must support the
@@ -2407,7 +2510,7 @@
 
 
 An empty tree is formed by a node whose pointer to the parent node is null,
-the pointers to the left and right nodes to itself.
+and whose left and right nodes pointers point to itself.
 [classref boost::intrusive::splaytree_algorithms splaytree_algorithms]
 is configured with a NodeTraits class, which encapsulates
 the information about the node to be manipulated. NodeTraits must support the
@@ -2523,6 +2626,63 @@
 
 [endsect]
 
+[/
+/
+/[section:sgtree_algorithms Intrusive sg tree algorithms]
+/
+/
+/[classref boost::intrusive::sgtree_algorithms sgtree_algorithms] have the same
+/interface as [classref boost::intrusive::rbtree_algorithms rbtree_algorithms].
+/
+/[c++]
+/
+/ template<class NodeTraits>
+/ struct sgtree_algorithms;
+/
+/[classref boost::intrusive::sgtree_algorithms sgtree_algorithms]
+/is configured with a NodeTraits class, which encapsulates
+/the information about the node to be manipulated. NodeTraits must support the
+/following interface:
+/
+/[*Typedefs]:
+/
+/* `node`: The type of the node that forms the circular sgtree
+/
+/* `node_ptr`: The type of a pointer to a node (usually node*)
+/
+/* `const_node_ptr`: The type of a pointer to a const node (usually const node*)
+/
+/[*Static functions]:
+/
+/* `static node_ptr get_parent(const_node_ptr n);`:
+/ Returns a pointer to the parent node stored in "n".
+/
+/* `static void set_parent(node_ptr n, node_ptr p);`:
+/ Sets the pointer to the parent node stored in "n" to "p".
+/
+/* `static node_ptr get_left(const_node_ptr n);`:
+/ Returns a pointer to the left node stored in "n".
+/
+/* `static void set_left(node_ptr n, node_ptr l);`:
+/ Sets the pointer to the left node stored in "n" to "l".
+/
+/* `static node_ptr get_right(const_node_ptr n);`:
+/ Returns a pointer to the right node stored in "n".
+/
+/* `static void set_right(node_ptr n, node_ptr r);`:
+/ Sets the pointer to the right node stored in "n" to "r".
+/
+/Once we have a node traits configuration we can use [*Boost.Intrusive] algorithms
+/with our nodes:
+/
+/[import ../example/doc_sgtree_algorithms.cpp]
+/[doc_sgtree_algorithms_code]
+/
+/For a complete list of functions see
+/[classref boost::intrusive::sgtree_algorithms sgtree_algorithms reference].
+/
+/[endsect]
+/]
 [endsect]
 
 [section:value_traits Containers with custom ValueTraits]
@@ -2534,11 +2694,11 @@
 `ValueTraits` contains
 all the information to glue the `value_type` of the containers and the node to be
 used in node algorithms, since these types can be different. Apart from this,
-`ValueTraits` also store information about the link policy of the values to be inserted.
+`ValueTraits` also stores information about the link policy of the values to be inserted.
 
 Instead of using [*Boost.Intrusive] predefined hooks
 a user might want to develop customized containers, for example, using nodes that are
-optimized for an specific
+optimized for a specific
 application or that are compatible with a a legacy ABI. A user might want
 to have only two additional pointers in his class and insert the class in a doubly
 linked list sometimes and in a singly linked list in other situations. You can't
@@ -2548,7 +2708,7 @@
 
 [section:value_traits_interface ValueTraits interface]
 
-`ValueTraits` have the following interface:
+`ValueTraits` has the following interface:
 
 [c++]
 
@@ -2574,9 +2734,9 @@
 
 Let's explain each type and function:
 
-* [*['node_traits]]: The node configuration that it's needed by node algorithms.
+* [*['node_traits]]: The node configuration that is needed by node algorithms.
    These node traits and algorithms are
- described in the previous chapter: [link intrusive.node_algorithms Nodes Algorithms].
+ described in the previous chapter: [link intrusive.node_algorithms Node Algorithms].
 
    * If my_value_traits is meant to be used with [classref boost::intrusive::slist slist],
       `node_traits` should follow
@@ -2604,13 +2764,13 @@
    same type, the `to_node_ptr` and `to_value_ptr` functions are trivial.
    
 * [*['pointer]]: The type of a pointer to a `value_type`. It must be the same pointer type
- as `node_ptr`: If `node_ptr` is `node *` `pointer` must be `value_type*`. If
+ as `node_ptr`: If `node_ptr` is `node*`, `pointer` must be `value_type*`. If
    `node_ptr` is `smart_ptr<node_traits::node>`, `pointer` must be `smart_ptr<value_type>`.
    This can be generically achieved using `boost::pointer_to_other` utility from [*Boost SmartPointers]
    defined in `<boost/pointer_to_other.hpp>`.
    
 * [*['const_pointer]]: The type of a pointer to a `const value_type`. It must be the same pointer type
- as `node_ptr`: If `node_ptr` is `node *` `const_pointer` must be `const value_type*`. If
+ as `node_ptr`: If `node_ptr` is `node*`, `const_pointer` must be `const value_type*`. If
    `node_ptr` is `smart_ptr<node_traits::node>`, `const_pointer` must be `smart_ptr<const value_type>`
    This can be generically achieved using `boost::pointer_to_other` utility from [*Boost SmartPointers]
    defined in `<boost/pointer_to_other.hpp>`.
@@ -2620,32 +2780,31 @@
    These are the possible types:
 
    * [*`normal_link`]: If this linking policy is specified in a `ValueTraits` class
- as the link, containers
+ as the link mode, containers
       configured with such `ValueTraits` won't set the hooks
       of the erased values to a default state. Containers also won't
       check that the hooks of the new values are default initialized.
- normal_link,
 
- * [*`safe_link`]: If this linking policy is specified in a `ValueTraits` class
- as the link, containers
- configured with such `ValueTraits` will set the hooks
+ * [*`safe_link`]: If this linking policy is specified as the link mode
+ in a `ValueTraits` class, containers
+ configured with this `ValueTraits` will set the hooks
       of the erased values to a default state. Containers also will
       check that the hooks of the new values are default initialized.
 
    * [*`auto_unlink`]: Same as "safe_link" but containers with
       constant-time size features won't be
       compatible with `ValueTraits` configured with this policy.
- Containers also know that the a value can be silently erased from
+ Containers also know that a value can be silently erased from
       the container without using any function provided by the containers.
 
 * [*['static node_ptr to_node_ptr (value_type &value)]] and
    [*['static const_node_ptr to_node_ptr (const value_type &value)]]:
- These function take a reference to a value_type and return a pointer to the node
+ These functions take a reference to a value_type and return a pointer to the node
    to be used with node algorithms.
 
 * [*['static pointer to_value_ptr (node_ptr n)]] and
    [*['static const_pointer to_value_ptr (const_node_ptr n)]]:
- These function take a pointer to a node and return a pointer to the value
+ These functions take a pointer to a node and return a pointer to the value
    that contains the node.
 
 [endsect]
@@ -2657,7 +2816,7 @@
 That legacy type has two pointers that can be used to build singly and doubly linked
 lists: in singly linked lists we only need a pointer, whereas in doubly
 linked lists, we need two pointers. Since we only have two pointers, we can't insert
-the object in a singly and doubly linked list at the same time.
+the object in both a singly and a doubly linked list at the same time.
 This is the definition of the old node:
 
 [import ../example/doc_value_traits.cpp]
@@ -2669,7 +2828,7 @@
 
 [doc_value_traits_value_traits]
 
-Defining a value traits class that just defines `value_type` as
+Defining a value traits class that simply defines `value_type` as
 `legacy_node_traits::node` is a common approach when defining customized
 intrusive containers, so [*Boost.Intrusive] offers a templatized
 [classref boost::intrusive::trivial_value_traits trivial_value_traits] class
@@ -2690,7 +2849,7 @@
 [doc_value_traits_test]
 
 As seen, several key elements of [*Boost.Intrusive] can be reused with custom user types,
-if the user does not want to use provided [*Boost.Intrusive] facilities.
+if the user does not want to use the provided [*Boost.Intrusive] facilities.
 
 [endsect]
 
@@ -2701,7 +2860,7 @@
 to have several `ValueTraits` defining the same `node_traits` type (and thus, the same `node_traits::node`).
 This reduces the number of node algorithm instantiations, but
 now `ValueTraits::to_node_ptr` and `ValueTraits::to_value_ptr` functions need to offer
-conversions between both types. Let's see an small example:
+conversions between both types. Let's see a small example:
 
 First, we'll define the node to be used in the algorithms. For a linked list,
 we just need a node that stores two pointers:
@@ -2710,7 +2869,7 @@
 [doc_advanced_value_traits_code]
 
 Now we'll define two different types that will be inserted in intrusive lists and
-we'll define a templatized `ValueTraits` that will work for both types:
+a templatized `ValueTraits` that will work for both types:
 
 [doc_advanced_value_traits_value_traits]
 
@@ -2721,7 +2880,7 @@
 [doc_advanced_value_traits_containers]
 
 All [*Boost.Intrusive] containers using predefined hooks use this technique to minimize code size:
-all the possible [classref boost::intrusive::list list] containers
+all possible [classref boost::intrusive::list list] containers
 created with predefined hooks that define the same `VoidPointer` type
 share the same list algorithms.
 
@@ -2729,7 +2888,7 @@
 
 [section:simplifying_value_traits Simplifying value traits definition]
 
-The previous example can be further simplified using
+The previous example can be further simplified using the
 [classref boost::intrusive::derivation_value_traits derivation_value_traits]
 class to define a value traits class with a value that stores the
 `simple_node` as a base class:
@@ -2765,8 +2924,8 @@
 
 Until now all shown custom value traits are stateless, that is, [*the transformation between nodes
 and values is implemented in terms of static functions]. It's possible to use [*stateful] value traits
-so that we can even separate nodes and values and [*avoid modifying types to insert nodes].
-[*Boost.Intrusive] differentiates between stateful and stateless value traits checking if the ValueTraits
+so that we can separate nodes and values and [*avoid modifying types to insert nodes].
+[*Boost.Intrusive] differentiates between stateful and stateless value traits by checking if the ValueTraits
 class is empty:
 
 * If the class is empty, a [*stateless] value traits is assumed.
@@ -2776,20 +2935,20 @@
 
 Using stateful value traits it's possible to create containers of non-copyable/moveble objects [*without modifying]
 the definition of the class to be inserted. This interesting property is achieved without using global variables
-(stateless value traits could use global variables to achieve the same property), so:
+(stateless value traits could use global variables to achieve the same goal), so:
 
 * [*Thread-safety guarantees]: Better thread-safety guarantees can be achieved with stateful
- value traits, since accessing to global resources might require syncronization primitives that
- can be avoided when using the internal state.
+ value traits, since accessing global resources might require syncronization primitives that
+ can be avoided when using internal state.
 * [*Flexibility]: A stateful value traits type can be configured at run-time.
-* [*Run-time polimorphism]: A value traits might implement node <-> value
+* [*Run-time polymorphism]: A value traits might implement node <-> value
    transformations as virtual functions. A single container type could be
    configured at run-time to use different node <-> value relatioships.
 
 Stateful value traits have many advantages but also some downsides:
 
 * [*Performance]: Value traits operations should be very efficient since they are basic operations used by containers.
- [*A heavy node <-> value transformation can downgrade intrusive containers' performance].
+ [*A heavy node <-> value transformation will hurt intrusive containers' performance].
 * [*Exception guarantees]: The stateful ValueTraits must maintain no-throw guarantees, otherwise, the
    container invariants won't be preserved.
 * [*Static functions]: Some static functions offered by intrusive containers are not
@@ -2810,31 +2969,31 @@
 
 [section:thread_safety Thread safety guarantees]
 
-Intrusive containers have similar same thread-safety guarantees than STL containers.
+Intrusive containers have thread safety guarantees similar to STL containers.
 
-* Several threads can have read or write access to different instances is safe as long as inserted
+* Several threads having read or write access to different instances is safe as long as inserted
    objects are different.
 * Concurrent read-only access to the same container is safe.
 
 Some Intrusive hooks (auto-unlink hooks, for example) modify containers without
 having a reference to them: this is considered a write access to the container.
 
-Other functions, like checking if an objects is already inserted in a containers using the `is_linked()`
-member of safe hooks is a read-access to the container without having a reference to them, so no other
+Other functions, like checking if an object is already inserted in a container using the `is_linked()`
+member of safe hooks, constitute read access on the container without having a reference to it, so no other
 thread should have write access (direct or indirect) to that container.
 
 Since the same object can be inserted in several containers at the same time using different hooks,
-the thread safety of [*Boost.Intrusive] is related to the containers and also the object whose lifetime
+the thread safety of [*Boost.Intrusive] is related to the containers and also to the object whose lifetime
 is manually managed by the user.
 
 As we can see, the analysis of the thread-safety of a program using [*Boost.Intrusive] is harder
 than with non-intrusive containers.
 
-To analyze the thread-safety, take in care the following points:
+To analyze the thread safety, consider the following points:
 
-* Auto-unlink hook's destructor and `unlink()` functions modify the container indirectly.
-* Safe mode and auto-unlink hook's `is_linked()` function is a read access to the container.
-* Inserting an object in several containers that will be modified by different threads has no thread-safety
+* The auto-unlink hook's destructor and `unlink()` functions modify the container indirectly.
+* The safe mode and auto-unlink hooks' `is_linked()` functions are a read access to the container.
+* Inserting an object in containers that will be modified by different threads has no thread safety
    guarantee, although in most platforms it will be thread-safe without locking.
 
 [endsect]
@@ -2842,12 +3001,12 @@
 [section:obtaining_same_type_reducing_space Obtaining the same types and reducing symbol length]
 
 The flexible option specification mechanism used by [*Boost.Intrusive] for hooks and containers
-has also a couple of downsides:
+has a couple of downsides:
 
-* If a user specifies the same options in different order or specifies some options and lefts the
- rest as defaults the type of the created container/hook will be different. Sometimes
- this is annoying, because two programmers specifying the same options might end with incompatible
- types. For example, the following two lists, although they're using the same options, have not
+* If a user specifies the same options in different order or specifies some options and leaves the
+ rest as defaults, the type of the created container/hook will be different. Sometimes
+ this is annoying, because two programmers specifying the same options might end up with incompatible
+ types. For example, the following two lists, although using the same options, do not have
    the same type:
 
 [c++]
@@ -2865,12 +3024,12 @@
 * Option specifiers lead to long template symbols for classes and functions. Option specifiers themselves
    are verbose and without variadic templates, several default template parameters are assigned for
    non-specified options. Object and debugging information files can grow and compilation times
- might suffer a bit if long names are produced.
+ may suffer if long names are produced.
 
-To solve these issues [*Boost.Intrusive] offers some helper metafunctions that that reduce symbol lengths
-and create the same type if the same options (either explicitly or implicitly) are used. This also
-improves compilation times. All containers and hooks have their respective `make_xxx` versions.
-Previous shown example can be rewritten like this to obtain the same list type:
+To solve these issues [*Boost.Intrusive] offers some helper metafunctions that reduce symbol lengths
+and create the same type if the same options (either explicitly or implicitly) are used. These also
+improve compilation times. All containers and hooks have their respective `make_xxx` versions.
+The previously shown example can be rewritten like this to obtain the same list type:
 
 [c++]
 
@@ -2888,8 +3047,8 @@
    //Implicitly specify constant-time size and size type
    typedef make_list<T>::type List2;
 
-Produced symbol lengths and compilation times are usually shorter and object/debug files are smaller.
-If you are a programmer concerned with file sizes and compilation times, this option is your choice.
+Produced symbol lengths and compilation times will usually be shorter and object/debug files smaller.
+If you are concerned with file sizes and compilation times, this option is your best choice.
 
 [endsect]
 
@@ -2918,26 +3077,26 @@
 and intrusive containers to avoid instantiating node algorithms for each
 user type. For example, a single class of red-black algorithms will be instantiated
 to implement all set and multiset containers using raw pointers. This way,
-[*Boost.Intrusive] wants to avoid any code size overhead associated with templates.
+[*Boost.Intrusive] seeks to avoid any code size overhead associated with templates.
 
 Apart from that, [*Boost.Intrusive] implements some size improvements: for example,
 red-black trees embed the color bit in the parent pointer lower bit, if nodes
-are two-byte aligned. The possibility to avoid constant-time size operations can
-save some size on containers, and this extra size optimization is noticeable
+are two-byte aligned. The option to forgo constant-time size operations can
+reduce container size, and this extra size optimization is noticeable
 when the container is empty or contains few values.
 
 [endsect]
 
-[section: Boost.Intrusive as basic building block]
+[section: Boost.Intrusive as a basic building block]
 
-[*Boost.Intrusive] should be a basic building block to build more complex containers
-and this guideline has motivated many design decisions. For example, the possibility
-to have more than one hook per user type opens the possibility to implement multi-index
+[*Boost.Intrusive] can be a basic building block to build more complex containers
+and this potential has motivated many design decisions. For example, the ability
+to have more than one hook per user type opens the opportunity to implement multi-index
 containers on top of [*Boost.Intrusive].
 
 [*Boost.Intrusive] containers implement advanced functions taking function objects
-as arguments (`clone_from`, `erase_and_dispose`, `insert_check`...). These
-functions come handy when implementing non-intrusive containers
+as arguments (`clone_from`, `erase_and_dispose`, `insert_check`, etc.). These
+functions come in handy when implementing non-intrusive containers
 (for example, STL-like containers) on top of intrusive containers.
 
 [endsect]
@@ -2947,9 +3106,9 @@
 [*Boost.Intrusive] offers a wide range of containers but also allows the
 construction of custom containers reusing [*Boost.Intrusive] elements.
 The programer might want to use node algorithms directly or
-build special hooks that take advantage of its application environment.
+build special hooks that take advantage of an application environment.
 
-For example, the programmer can use can customize parts of [*Boost.Intrusive]
+For example, the programmer can customize parts of [*Boost.Intrusive]
 to manage old data structures whose definition can't be changed.
 
 [endsect]
@@ -2958,25 +3117,25 @@
 
 [section:performance Performance]
 
-[*Boost.Intrusive] containers offer speed improvements comparing to non-intrusive containers,
-basically because:
+[*Boost.Intrusive] containers offer speed improvements compared to non-intrusive containers
+primarily because:
 
-* We can minimize memory allocation/deallocation calls.
-* We obtain better memory locality.
+* They minimize memory allocation/deallocation calls.
+* They obtain better memory locality.
 
-This section will show some performance tests comparing some operations on
+This section will show performance tests comparing some operations on
 `boost::intrusive::list` and `std::list`:
 
 * Insertions using `push_back` and container destruction will show the
    overhead associated with memory allocation/deallocation.
-* `reverse` member function will show the advantages of the compact
+* The `reverse` member function will show the advantages of the compact
    memory representation that can be achieved with intrusive containers.
-* `sort` and `write access` tests will show the advantage of intrusive containers
- minimizing the memory accesses when comparing them with containers of pointers.
+* The `sort` and `write access` tests will show the advantage of intrusive containers
+ minimizing memory accesses compared to containers of pointers.
 
 Given an object of type `T`, [classref boost::intrusive::list boost::intrusive::list<T>]
 can replace `std::list<T>` to avoid memory allocation overhead,
-or it can replace `std::list<T*>` when the user wants to obtain containers with
+or it can replace `std::list<T*>` when the user wants containers with
 polymorphic values or wants to share values between several containers.
 Because of this versatility, the performance tests will be executed for 6 different
 list types:
@@ -3008,7 +3167,7 @@
 and also derives from `test_class`.
 
 `func_ptr_adaptor` is just a functor adaptor to convert function objects taking
-`test_list` objects to funtion objects taking pointers to them.
+`test_list` objects to function objects taking pointers to them.
 
 You can find the full test code code in the
 [@../../libs/intrusive/perf/perf_list.cpp perf_list.cpp] source file.
@@ -3016,9 +3175,9 @@
 [section:performance_results_push_back Back insertion and destruction]
 
 The first test will measure the benefits we can obtain with intrusive containers
-avoiding memory allocations and deallocations . All the objects to be
+avoiding memory allocations and deallocations. All the objects to be
 inserted in intrusive containers are allocated in a single allocation call,
-whereas `std::list` will need to allocate memory for every and deallocate it
+whereas `std::list` will need to allocate memory for each object and deallocate it
 for every erasure (or container destruction).
 
 Let's compare the code to be executed for each container type for different insertion tests:
@@ -3076,35 +3235,35 @@
 
 The results are logical: intrusive lists just need one allocation. The destruction
 time of the `normal_link` intrusive container is trivial (complexity: `O(1)`),
-whereas `safe_link` and `auto_unlink` intrusive containers need to put the hook of
-erased values' in the default state (complexity: `O(NumElements)`). That's why
+whereas `safe_link` and `auto_unlink` intrusive containers need to put the hooks of
+erased values in the default state (complexity: `O(NumElements)`). That's why
 `normal_link` intrusive list shines in this test.
 
-Non-intrusive containers need to make much more allocations and that's why they are
-lagging behind. The `disperse pointer list` needs to make `NumElements*2` allocations,
+Non-intrusive containers need to make many more allocations and that's why they
+lag behind. The `disperse pointer list` needs to make `NumElements*2` allocations,
 so the result is not surprising.
 
-Linux test shows that standard containers perform very well against intrusive containers
-with big objects. Nearly the same GCC version in MinGW performs worse, so maybe the
-a good memory allocator is the reason for these excelent results.
+The Linux test shows that standard containers perform very well against intrusive containers
+with big objects. Nearly the same GCC version in MinGW performs worse, so maybe
+a good memory allocator is the reason for these excellent results.
 
 [endsect]
 
 [section:performance_results_reversing Reversing]
 
 The next test measures the time needed to complete calls to the member function `reverse()`.
-Values (`test_class` and `itest_class`) and lists are created like explained in the
+Values (`test_class` and `itest_class`) and lists are created as explained in the
 previous section.
 
 Note that for pointer lists, `reverse` [*does not need to access `test_class` values
 stored in another list or vector],
-since this function just needs to adjust internal pointers, so in theory, all tested
+since this function just needs to adjust internal pointers, so in theory all tested
 lists need to perform the same operations.
 
 These are the results:
 
 [table Reverse times for Visual C++ 7.1 / Windows XP
- [[Container] [Time in us/iteration (small object / big object)] [Normalized time (small object / big object) (small object / big object)]]
+ [[Container] [Time in us/iteration (small object / big object)] [Normalized time (small object / big object)]]
     [[`normal_link` intrusive list] [2656 / 10625] [1 / 1.83]]
     [[`safe_link` intrusive list] [2812 / 10937] [1.05 / 1.89]]
     [[`auto_unlink` intrusive list] [2710 / 10781] [1.02 / 1.86]]
@@ -3156,18 +3315,18 @@
       l.push_back(&objects.back());
    }
 
-For big values the compact pointer list wins because when reversing doesn't need access
-to the values stored in another container. Since all the allocations for nodes of
-this pointer list are likely to be near (since there is no other allocation in the
+For big objects the compact pointer list wins because the reversal test doesn't need access
+to values stored in another container. Since all the allocations for nodes of
+this pointer list are likely to be close (since there is no other allocation in the
 process until the pointer list is created) locality is better than with intrusive
-containers. The dispersed pointer list, like with small values, has poor locality.
+containers. The dispersed pointer list, as with small values, has poor locality.
 
 [endsect]
 
 [section:performance_results_sorting Sorting]
 
-The next test measures the time needed to complete calls the member function
-`sort(Pred pred)`. Values (`test_class` and `itest_class`) and lists are created like explained in the
+The next test measures the time needed to complete calls to the member function
+`sort(Pred pred)`. Values (`test_class` and `itest_class`) and lists are created as explained in the
 first section. The values will be sorted in ascending and descenting order each
 iteration. For example, if ['l] is a list:
 
@@ -3194,7 +3353,7 @@
 Note that for pointer lists, `sort` will take a function object that [*will access
 `test_class` values stored in another list or vector], so pointer lists will suffer
 an extra indirection: they will need to access the `test_class` values stored in
-another container to compare to elements.
+another container to compare two elements.
 
 These are the results:
 
@@ -3231,16 +3390,16 @@
 The results show that intrusive containers are faster than standard
 containers. We can see that the pointer
 list holding pointers to values stored in a vector is quite fast, so the extra
-indirection that needs to access the value is minimized because all the values
-are tightly stored, improving cache. The disperse list, on the other hand, is
-slower because the indirection to access to values stored in the object list is
-more expensive than the access to values stored in a vector.
+indirection that is needed to access the value is minimized because all the values
+are tightly stored, improving caching. The disperse list, on the other hand, is
+slower because the indirection to access values stored in the object list is
+more expensive than accessing values stored in a vector.
 
 [endsect]
 
 [section:performance_results_write_access Write access]
 
-The next test measures the time needed to iterate all the elements of a list, and
+The next test measures the time needed to iterate through all the elements of a list, and
 increment the value of the internal `i_` member:
 
 [c++]
@@ -3249,7 +3408,7 @@
    for(; it != end; ++it)
       ++(it->i_);
 
-Values (`test_class` and `itest_class`) and lists are created like explained in
+Values (`test_class` and `itest_class`) and lists are created as explained in
 the first section. Note that for pointer lists, the iteration will suffer
 an extra indirection: they will need to access the `test_class` values stored in
 another container:
@@ -3292,9 +3451,9 @@
     [[Standard disperse pointer list] [6118 / 12453] [2.67 / 1.62]]
 ]
 
-Like with the read access test, the results show that intrusive containers outperform
+As with the read access test, the results show that intrusive containers outperform
 all other containers if the values are tightly packed in a vector.
-The disperse list is again the slowest one.
+The disperse list is again the slowest.
 
 [endsect]
 
@@ -3302,7 +3461,7 @@
 
 Intrusive containers can offer performance benefits that can not be achieved with
 equivalent non-intrusive containers. Memory locality improvements are noticeable
-when objects to be inserted are small. Minimizing memory allocation/deallocation calls is also
+when the objects to be inserted are small. Minimizing memory allocation/deallocation calls is also
 an important factor and intrusive containers make this simple if the user allocates
 all the objects to be inserted in intrusive containers in containers like `std::vector` or `std::deque`.
 
@@ -3310,41 +3469,41 @@
 
 [endsect]
 
-[section:disabling_exceptions Disabling exceptions support]
+[section:release_notes Release Notes]
+
+[section:release_notes_boost_1_36_00 Boost 1.36 Release]
 
-[*Boost.Intrusive] might be useful in environments where exceptions are not available
-or recommendable (like embedded or real-time systems). [*Boost.Intrusive] uses the
-global Boost mechanism to disable exception handling, so that if the compiler
-configuration disables exceptions, `BOOST_NO_EXCEPTIONS` is defined and exception
-handling is disabled.
-
-This mechanism is a global mechanism to disable exceptions. If for any reason,
-the user wants to disable exception handling [*only] in [*Boost.Intrusive],
-`BOOST_INTRUSIVE_DISABLE_EXCEPTION_HANDLING` can be defined to disable
-exception handling in the library.
+* Added `linear<>` and `cache_last<>` options to singly linked lists.
+* Added `optimize_multikey<>` option to unordered container hooks.
+* Optimized unordered containers when `store_hash` option is used in the hook.
+* Implementation changed to be exception agnostic so that it can be used
+ in environments without exceptions.
+* Added `container_from_iterator` function to tree-based containers.
+
+[endsect]
 
 [endsect]
 
 [section:tested_compilers Tested compilers]
 
-[*Boost.Intrusive] has been tested in the following compilers/platforms:
+[*Boost.Intrusive] has been tested on the following compilers/platforms:
 
 * Visual 7.1/WinXP
 * Visual 8.0/WinXP
+* Visual 9.0/WinXP
 * GCC 4.1.1/MinGW
 * GCC 3.4.4/Cygwin
 * Intel 9.1/WinXP
 * GCC 4.1.2/Linux
 * GCC 3.4.3/Solaris 11
 * GCC 4.0/Mac Os 10.4.1
-* SunCC 5.8/Solaris 11
 
 [endsect]
 
 [section:references References]
 
 * SGI's [@http://www.sgi.com/tech/stl/ STL Programmer's Guide].
- [*Boost.Intrusive] is based on STL concepts and interface.
+ [*Boost.Intrusive] is based on STL concepts and interfaces.
 
 * Dr. Dobb's, September 1, 2005: [@http://www.ddj.com/architect/184402007 ['Implementing Splay Trees in C++] ].
    [*Boost.Intrusive] splay containers code is based on this article.
@@ -3369,16 +3528,16 @@
 
 * [*Olaf Krzikalla] for the permission to continue his great work.
 
-* [*Joaquín M. López Muñoz] for his thorough review, help, and ideas.
+* [*Joaquin M. Lopez Munoz] for his thorough review, help, and ideas.
 
 * [*Cory Nelson], [*Daniel James], [*Dave Harris], [*Guillaume Melquiond],
- [*Henri Bavestrello], [*Hervé Brönnimann], [*Kai Brüning], [*Kevin Sopp],
+ [*Henri Bavestrello], [*Hervé Bronnimann], [*Kai Bruning], [*Kevin Sopp],
    [*Paul Rose], [*Pavel Vozelinek], [*Howard Hinnant], [*Olaf Krzikalla],
    [*Samuel Debionne], [*Stjepan Rajko], [*Thorsten Ottosen], [*Tobias Schwinger],
    [*Tom Brinkman] and [*Steven Watanabe]
    for their comments and reviews in the Boost.Intrusive formal review.
 
-* Thanks to of [*Julienne Walker] and [*The EC Team] ([@http://eternallyconfuzzled.com])
+* Thanks to [*Julienne Walker] and [*The EC Team] ([@http://eternallyconfuzzled.com])
    for their great algorithms.
 
 * Thanks to [*Daniel K. O.] for his AVL tree rebalancing code.

Modified: branches/release/libs/intrusive/example/Jamfile.v2
==============================================================================
--- branches/release/libs/intrusive/example/Jamfile.v2 (original)
+++ branches/release/libs/intrusive/example/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 # Boost Intrusive Library Example Jamfile
 
-# (C) Copyright Ion Gaztañaga 2006-2007.
+# (C) Copyright Ion Gaztanaga 2006-2007.
 # Use, modification and distribution are subject to 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)

Modified: branches/release/libs/intrusive/index.html
==============================================================================
--- branches/release/libs/intrusive/index.html (original)
+++ branches/release/libs/intrusive/index.html 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -4,6 +4,6 @@
 </head>
 <body>
 Automatic redirection failed, please go to
-../../doc/html/intrusive.html
+../../doc/html/intrusive
 </body>
 </html>

Modified: branches/release/libs/intrusive/perf/Jamfile.v2
==============================================================================
--- branches/release/libs/intrusive/perf/Jamfile.v2 (original)
+++ branches/release/libs/intrusive/perf/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,6 +1,6 @@
 # Boost Intrusive Library Performance test Jamfile
 
-# (C) Copyright Ion Gaztañaga 2006-2007.
+# (C) Copyright Ion Gaztanaga 2006-2007.
 # Use, modification and distribution are subject to 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)

Modified: branches/release/libs/intrusive/perf/perf_list.cpp
==============================================================================
--- branches/release/libs/intrusive/perf/perf_list.cpp (original)
+++ branches/release/libs/intrusive/perf/perf_list.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -23,7 +23,7 @@
 //[perf_list_value_type
 //Iteration and element count defines
 const int NumIter = 100;
-const int NumElements = 100000;
+const int NumElements = 50000;
 
 using namespace boost::intrusive;
 

Modified: branches/release/libs/intrusive/proj/vc7ide/Intrusive.sln
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/Intrusive.sln (original)
+++ branches/release/libs/intrusive/proj/vc7ide/Intrusive.sln 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,175 +1,361 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "list", "list\list.vcproj", "{977B61B4-9968-497C-9F0B-24A8145473B8}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slist", "slist\slist.vcproj", "{5A02061D-3728-4C49-AFC8-0130C1F161C0}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multiset", "multiset\multiset.vcproj", "{961F0E06-C092-4AF7-ABC5-2A49999F3B79}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_intrusivelib", "_intrusivelib\_intrusivelib.vcproj", "{90F3C5BD-8E6C-4629-BC71-A1009EC88059}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "set", "set\set.vcproj", "{960E01F6-92C1-F74A-BCA5-2A9F3B994979}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_set", "unordered_set\unordered_set.vcproj", "{90E701E6-2C91-F4A7-BA6C-A9F3B0949279}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_multiset", "unordered_multiset\unordered_multiset.vcproj", "{9101EE76-BB6C-2C91-F4B7-A9F3B9490279}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_test", "perf_test\perf_test.vcproj", "{910E70E6-2C91-AA67-BF4C-A9C74A309927}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "default_hook", "default_hook\default_hook.vcproj", "{761A79B4-9968-CB81-F02B-2A4497345475}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stateful_value_traits", "stateful_value_traits\stateful_value_traits.vcproj", "{9571A7B4-9968-B9C1-17FB-134547B46975}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtual_base", "virtual_base\virtual_base.vcproj", "{3579B1A4-9894-02AB-CB81-297B46154345}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_functions", "make_functions\make_functions.vcproj", "{7679B41B-F2B4-9176-CB81-35449467B435}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_bucket_traits", "custom_bucket_traits\custom_bucket_traits.vcproj", "{31C77B84-0B2C-9481-CB81-27A149F33825}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external_value_traits", "external_value_traits\external_value_traits.vcproj", "{97B69A72-B9D3-7389-17FB-74612F4A9543}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splay_multiset", "splay_multiset\splay_multiset.vcproj", "{01E70176-B6C5-BF47-2C91-A949077BA323}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splay_set", "splay_set\splay_set.vcproj", "{1E6909E7-C971-F24A-6C7B-A92094B71B59}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avl_multiset", "avl_multiset\avl_multiset.vcproj", "{0AE70176-5B8C-4BC7-392C-A4A312B07893}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avl_set", "avl_set\avl_set.vcproj", "{16909EE7-24AF-97C1-C76B-204B971BA959}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sg_multiset", "sg_multiset\sg_multiset.vcproj", "{07022E76-6CB5-92C1-B47F-A10772A79B43}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sg_set", "sg_set\sg_set.vcproj", "{1690A9E7-DB57-971C-F24A-09B752A942F7}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectDependencies) = postSolution
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {977B61B4-9968-497C-9F0B-24A8145473B8}.Debug.ActiveCfg = Debug|Win32
- {977B61B4-9968-497C-9F0B-24A8145473B8}.Debug.Build.0 = Debug|Win32
- {977B61B4-9968-497C-9F0B-24A8145473B8}.Release.ActiveCfg = Release|Win32
- {977B61B4-9968-497C-9F0B-24A8145473B8}.Release.Build.0 = Release|Win32
- {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Debug.ActiveCfg = Debug|Win32
- {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Debug.Build.0 = Debug|Win32
- {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Release.ActiveCfg = Release|Win32
- {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Release.Build.0 = Release|Win32
- {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Debug.ActiveCfg = Debug|Win32
- {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Debug.Build.0 = Debug|Win32
- {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Release.ActiveCfg = Release|Win32
- {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Release.Build.0 = Release|Win32
- {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Debug.ActiveCfg = Debug|Win32
- {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Debug.Build.0 = Debug|Win32
- {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Release.ActiveCfg = Release|Win32
- {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Release.Build.0 = Release|Win32
- {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Debug.ActiveCfg = Debug|Win32
- {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Debug.Build.0 = Debug|Win32
- {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Release.ActiveCfg = Release|Win32
- {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Release.Build.0 = Release|Win32
- {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Debug.ActiveCfg = Debug|Win32
- {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Debug.Build.0 = Debug|Win32
- {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Release.ActiveCfg = Release|Win32
- {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Release.Build.0 = Release|Win32
- {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Debug.ActiveCfg = Debug|Win32
- {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Debug.Build.0 = Debug|Win32
- {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Release.ActiveCfg = Release|Win32
- {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Release.Build.0 = Release|Win32
- {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Debug.ActiveCfg = Debug|Win32
- {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Debug.Build.0 = Debug|Win32
- {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Release.ActiveCfg = Release|Win32
- {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Release.Build.0 = Release|Win32
- {761A79B4-9968-CB81-F02B-2A4497345475}.Debug.ActiveCfg = Debug|Win32
- {761A79B4-9968-CB81-F02B-2A4497345475}.Debug.Build.0 = Debug|Win32
- {761A79B4-9968-CB81-F02B-2A4497345475}.Release.ActiveCfg = Release|Win32
- {761A79B4-9968-CB81-F02B-2A4497345475}.Release.Build.0 = Release|Win32
- {9571A7B4-9968-B9C1-17FB-134547B46975}.Debug.ActiveCfg = Debug|Win32
- {9571A7B4-9968-B9C1-17FB-134547B46975}.Debug.Build.0 = Debug|Win32
- {9571A7B4-9968-B9C1-17FB-134547B46975}.Release.ActiveCfg = Release|Win32
- {9571A7B4-9968-B9C1-17FB-134547B46975}.Release.Build.0 = Release|Win32
- {3579B1A4-9894-02AB-CB81-297B46154345}.Debug.ActiveCfg = Debug|Win32
- {3579B1A4-9894-02AB-CB81-297B46154345}.Debug.Build.0 = Debug|Win32
- {3579B1A4-9894-02AB-CB81-297B46154345}.Release.ActiveCfg = Release|Win32
- {3579B1A4-9894-02AB-CB81-297B46154345}.Release.Build.0 = Release|Win32
- {7679B41B-F2B4-9176-CB81-35449467B435}.Debug.ActiveCfg = Debug|Win32
- {7679B41B-F2B4-9176-CB81-35449467B435}.Debug.Build.0 = Debug|Win32
- {7679B41B-F2B4-9176-CB81-35449467B435}.Release.ActiveCfg = Release|Win32
- {7679B41B-F2B4-9176-CB81-35449467B435}.Release.Build.0 = Release|Win32
- {31C77B84-0B2C-9481-CB81-27A149F33825}.Debug.ActiveCfg = Debug|Win32
- {31C77B84-0B2C-9481-CB81-27A149F33825}.Debug.Build.0 = Debug|Win32
- {31C77B84-0B2C-9481-CB81-27A149F33825}.Release.ActiveCfg = Release|Win32
- {31C77B84-0B2C-9481-CB81-27A149F33825}.Release.Build.0 = Release|Win32
- {97B69A72-B9D3-7389-17FB-74612F4A9543}.Debug.ActiveCfg = Debug|Win32
- {97B69A72-B9D3-7389-17FB-74612F4A9543}.Debug.Build.0 = Debug|Win32
- {97B69A72-B9D3-7389-17FB-74612F4A9543}.Release.ActiveCfg = Release|Win32
- {97B69A72-B9D3-7389-17FB-74612F4A9543}.Release.Build.0 = Release|Win32
- {01E70176-B6C5-BF47-2C91-A949077BA323}.Debug.ActiveCfg = Debug|Win32
- {01E70176-B6C5-BF47-2C91-A949077BA323}.Debug.Build.0 = Debug|Win32
- {01E70176-B6C5-BF47-2C91-A949077BA323}.Release.ActiveCfg = Release|Win32
- {01E70176-B6C5-BF47-2C91-A949077BA323}.Release.Build.0 = Release|Win32
- {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Debug.ActiveCfg = Debug|Win32
- {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Debug.Build.0 = Debug|Win32
- {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Release.ActiveCfg = Release|Win32
- {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Release.Build.0 = Release|Win32
- {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Debug.ActiveCfg = Debug|Win32
- {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Debug.Build.0 = Debug|Win32
- {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Release.ActiveCfg = Release|Win32
- {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Release.Build.0 = Release|Win32
- {16909EE7-24AF-97C1-C76B-204B971BA959}.Debug.ActiveCfg = Debug|Win32
- {16909EE7-24AF-97C1-C76B-204B971BA959}.Debug.Build.0 = Debug|Win32
- {16909EE7-24AF-97C1-C76B-204B971BA959}.Release.ActiveCfg = Release|Win32
- {16909EE7-24AF-97C1-C76B-204B971BA959}.Release.Build.0 = Release|Win32
- {07022E76-6CB5-92C1-B47F-A10772A79B43}.Debug.ActiveCfg = Debug|Win32
- {07022E76-6CB5-92C1-B47F-A10772A79B43}.Debug.Build.0 = Debug|Win32
- {07022E76-6CB5-92C1-B47F-A10772A79B43}.Release.ActiveCfg = Release|Win32
- {07022E76-6CB5-92C1-B47F-A10772A79B43}.Release.Build.0 = Release|Win32
- {1690A9E7-DB57-971C-F24A-09B752A942F7}.Debug.ActiveCfg = Debug|Win32
- {1690A9E7-DB57-971C-F24A-09B752A942F7}.Debug.Build.0 = Debug|Win32
- {1690A9E7-DB57-971C-F24A-09B752A942F7}.Release.ActiveCfg = Release|Win32
- {1690A9E7-DB57-971C-F24A-09B752A942F7}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
+<<<<<<< .working
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "list", "list\list.vcproj", "{977B61B4-9968-497C-9F0B-24A8145473B8}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slist", "slist\slist.vcproj", "{5A02061D-3728-4C49-AFC8-0130C1F161C0}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multiset", "multiset\multiset.vcproj", "{961F0E06-C092-4AF7-ABC5-2A49999F3B79}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_intrusivelib", "_intrusivelib\_intrusivelib.vcproj", "{90F3C5BD-8E6C-4629-BC71-A1009EC88059}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "set", "set\set.vcproj", "{960E01F6-92C1-F74A-BCA5-2A9F3B994979}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_set", "unordered_set\unordered_set.vcproj", "{90E701E6-2C91-F4A7-BA6C-A9F3B0949279}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_multiset", "unordered_multiset\unordered_multiset.vcproj", "{9101EE76-BB6C-2C91-F4B7-A9F3B9490279}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_test", "perf_test\perf_test.vcproj", "{910E70E6-2C91-AA67-BF4C-A9C74A309927}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "default_hook", "default_hook\default_hook.vcproj", "{761A79B4-9968-CB81-F02B-2A4497345475}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stateful_value_traits", "stateful_value_traits\stateful_value_traits.vcproj", "{9571A7B4-9968-B9C1-17FB-134547B46975}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtual_base", "virtual_base\virtual_base.vcproj", "{3579B1A4-9894-02AB-CB81-297B46154345}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_functions", "make_functions\make_functions.vcproj", "{7679B41B-F2B4-9176-CB81-35449467B435}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_bucket_traits", "custom_bucket_traits\custom_bucket_traits.vcproj", "{31C77B84-0B2C-9481-CB81-27A149F33825}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external_value_traits", "external_value_traits\external_value_traits.vcproj", "{97B69A72-B9D3-7389-17FB-74612F4A9543}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splay_multiset", "splay_multiset\splay_multiset.vcproj", "{01E70176-B6C5-BF47-2C91-A949077BA323}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splay_set", "splay_set\splay_set.vcproj", "{1E6909E7-C971-F24A-6C7B-A92094B71B59}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avl_multiset", "avl_multiset\avl_multiset.vcproj", "{0AE70176-5B8C-4BC7-392C-A4A312B07893}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avl_set", "avl_set\avl_set.vcproj", "{16909EE7-24AF-97C1-C76B-204B971BA959}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sg_multiset", "sg_multiset\sg_multiset.vcproj", "{07022E76-6CB5-92C1-B47F-A10772A79B43}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sg_set", "sg_set\sg_set.vcproj", "{1690A9E7-DB57-971C-F24A-09B752A942F7}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Debug.ActiveCfg = Debug|Win32
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Debug.Build.0 = Debug|Win32
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Release.ActiveCfg = Release|Win32
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Release.Build.0 = Release|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Debug.ActiveCfg = Debug|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Debug.Build.0 = Debug|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Release.ActiveCfg = Release|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Release.Build.0 = Release|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Debug.ActiveCfg = Debug|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Debug.Build.0 = Debug|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Release.ActiveCfg = Release|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Release.Build.0 = Release|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Debug.ActiveCfg = Debug|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Debug.Build.0 = Debug|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Release.ActiveCfg = Release|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Release.Build.0 = Release|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Debug.ActiveCfg = Debug|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Debug.Build.0 = Debug|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Release.ActiveCfg = Release|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Release.Build.0 = Release|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Debug.ActiveCfg = Debug|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Debug.Build.0 = Debug|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Release.ActiveCfg = Release|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Release.Build.0 = Release|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Debug.ActiveCfg = Debug|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Debug.Build.0 = Debug|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Release.ActiveCfg = Release|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Release.Build.0 = Release|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Debug.ActiveCfg = Debug|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Debug.Build.0 = Debug|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Release.ActiveCfg = Release|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Release.Build.0 = Release|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Debug.ActiveCfg = Debug|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Debug.Build.0 = Debug|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Release.ActiveCfg = Release|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Release.Build.0 = Release|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Debug.ActiveCfg = Debug|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Debug.Build.0 = Debug|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Release.ActiveCfg = Release|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Release.Build.0 = Release|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Debug.ActiveCfg = Debug|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Debug.Build.0 = Debug|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Release.ActiveCfg = Release|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Release.Build.0 = Release|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Debug.ActiveCfg = Debug|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Debug.Build.0 = Debug|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Release.ActiveCfg = Release|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Release.Build.0 = Release|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Debug.ActiveCfg = Debug|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Debug.Build.0 = Debug|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Release.ActiveCfg = Release|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Release.Build.0 = Release|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Debug.ActiveCfg = Debug|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Debug.Build.0 = Debug|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Release.ActiveCfg = Release|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Release.Build.0 = Release|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Debug.ActiveCfg = Debug|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Debug.Build.0 = Debug|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Release.ActiveCfg = Release|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Release.Build.0 = Release|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Debug.ActiveCfg = Debug|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Debug.Build.0 = Debug|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Release.ActiveCfg = Release|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Release.Build.0 = Release|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Debug.ActiveCfg = Debug|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Debug.Build.0 = Debug|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Release.ActiveCfg = Release|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Release.Build.0 = Release|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Debug.ActiveCfg = Debug|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Debug.Build.0 = Debug|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Release.ActiveCfg = Release|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Release.Build.0 = Release|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Debug.ActiveCfg = Debug|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Debug.Build.0 = Debug|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Release.ActiveCfg = Release|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Release.Build.0 = Release|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Debug.ActiveCfg = Debug|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Debug.Build.0 = Debug|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Release.ActiveCfg = Release|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
+=======
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "list", "list\list.vcproj", "{977B61B4-9968-497C-9F0B-24A8145473B8}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "slist", "slist\slist.vcproj", "{5A02061D-3728-4C49-AFC8-0130C1F161C0}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "multiset", "multiset\multiset.vcproj", "{961F0E06-C092-4AF7-ABC5-2A49999F3B79}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_intrusivelib", "_intrusivelib\_intrusivelib.vcproj", "{90F3C5BD-8E6C-4629-BC71-A1009EC88059}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "set", "set\set.vcproj", "{960E01F6-92C1-F74A-BCA5-2A9F3B994979}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_set", "unordered_set\unordered_set.vcproj", "{90E701E6-2C91-F4A7-BA6C-A9F3B0949279}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unordered_multiset", "unordered_multiset\unordered_multiset.vcproj", "{9101EE76-BB6C-2C91-F4B7-A9F3B9490279}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_test", "perf_test\perf_test.vcproj", "{910E70E6-2C91-AA67-BF4C-A9C74A309927}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "default_hook", "default_hook\default_hook.vcproj", "{761A79B4-9968-CB81-F02B-2A4497345475}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stateful_value_traits", "stateful_value_traits\stateful_value_traits.vcproj", "{9571A7B4-9968-B9C1-17FB-134547B46975}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "virtual_base", "virtual_base\virtual_base.vcproj", "{3579B1A4-9894-02AB-CB81-297B46154345}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_functions", "make_functions\make_functions.vcproj", "{7679B41B-F2B4-9176-CB81-35449467B435}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "custom_bucket_traits", "custom_bucket_traits\custom_bucket_traits.vcproj", "{31C77B84-0B2C-9481-CB81-27A149F33825}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "external_value_traits", "external_value_traits\external_value_traits.vcproj", "{97B69A72-B9D3-7389-17FB-74612F4A9543}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splay_multiset", "splay_multiset\splay_multiset.vcproj", "{01E70176-B6C5-BF47-2C91-A949077BA323}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "splay_set", "splay_set\splay_set.vcproj", "{1E6909E7-C971-F24A-6C7B-A92094B71B59}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avl_multiset", "avl_multiset\avl_multiset.vcproj", "{0AE70176-5B8C-4BC7-392C-A4A312B07893}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avl_set", "avl_set\avl_set.vcproj", "{16909EE7-24AF-97C1-C76B-204B971BA959}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sg_multiset", "sg_multiset\sg_multiset.vcproj", "{07022E76-6CB5-92C1-B47F-A10772A79B43}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sg_set", "sg_set\sg_set.vcproj", "{1690A9E7-DB57-971C-F24A-09B752A942F7}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "any_hook", "any_test\any_test.vcproj", "{97B61B24-4C97-9681-50BF-243175A813B6}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Debug.ActiveCfg = Debug|Win32
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Debug.Build.0 = Debug|Win32
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Release.ActiveCfg = Release|Win32
+ {977B61B4-9968-497C-9F0B-24A8145473B8}.Release.Build.0 = Release|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Debug.ActiveCfg = Debug|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Debug.Build.0 = Debug|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Release.ActiveCfg = Release|Win32
+ {5A02061D-3728-4C49-AFC8-0130C1F161C0}.Release.Build.0 = Release|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Debug.ActiveCfg = Debug|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Debug.Build.0 = Debug|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Release.ActiveCfg = Release|Win32
+ {961F0E06-C092-4AF7-ABC5-2A49999F3B79}.Release.Build.0 = Release|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Debug.ActiveCfg = Debug|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Debug.Build.0 = Debug|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Release.ActiveCfg = Release|Win32
+ {90F3C5BD-8E6C-4629-BC71-A1009EC88059}.Release.Build.0 = Release|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Debug.ActiveCfg = Debug|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Debug.Build.0 = Debug|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Release.ActiveCfg = Release|Win32
+ {960E01F6-92C1-F74A-BCA5-2A9F3B994979}.Release.Build.0 = Release|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Debug.ActiveCfg = Debug|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Debug.Build.0 = Debug|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Release.ActiveCfg = Release|Win32
+ {90E701E6-2C91-F4A7-BA6C-A9F3B0949279}.Release.Build.0 = Release|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Debug.ActiveCfg = Debug|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Debug.Build.0 = Debug|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Release.ActiveCfg = Release|Win32
+ {9101EE76-BB6C-2C91-F4B7-A9F3B9490279}.Release.Build.0 = Release|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Debug.ActiveCfg = Debug|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Debug.Build.0 = Debug|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Release.ActiveCfg = Release|Win32
+ {910E70E6-2C91-AA67-BF4C-A9C74A309927}.Release.Build.0 = Release|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Debug.ActiveCfg = Debug|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Debug.Build.0 = Debug|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Release.ActiveCfg = Release|Win32
+ {761A79B4-9968-CB81-F02B-2A4497345475}.Release.Build.0 = Release|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Debug.ActiveCfg = Debug|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Debug.Build.0 = Debug|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Release.ActiveCfg = Release|Win32
+ {9571A7B4-9968-B9C1-17FB-134547B46975}.Release.Build.0 = Release|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Debug.ActiveCfg = Debug|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Debug.Build.0 = Debug|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Release.ActiveCfg = Release|Win32
+ {3579B1A4-9894-02AB-CB81-297B46154345}.Release.Build.0 = Release|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Debug.ActiveCfg = Debug|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Debug.Build.0 = Debug|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Release.ActiveCfg = Release|Win32
+ {7679B41B-F2B4-9176-CB81-35449467B435}.Release.Build.0 = Release|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Debug.ActiveCfg = Debug|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Debug.Build.0 = Debug|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Release.ActiveCfg = Release|Win32
+ {31C77B84-0B2C-9481-CB81-27A149F33825}.Release.Build.0 = Release|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Debug.ActiveCfg = Debug|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Debug.Build.0 = Debug|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Release.ActiveCfg = Release|Win32
+ {97B69A72-B9D3-7389-17FB-74612F4A9543}.Release.Build.0 = Release|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Debug.ActiveCfg = Debug|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Debug.Build.0 = Debug|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Release.ActiveCfg = Release|Win32
+ {01E70176-B6C5-BF47-2C91-A949077BA323}.Release.Build.0 = Release|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Debug.ActiveCfg = Debug|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Debug.Build.0 = Debug|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Release.ActiveCfg = Release|Win32
+ {1E6909E7-C971-F24A-6C7B-A92094B71B59}.Release.Build.0 = Release|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Debug.ActiveCfg = Debug|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Debug.Build.0 = Debug|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Release.ActiveCfg = Release|Win32
+ {0AE70176-5B8C-4BC7-392C-A4A312B07893}.Release.Build.0 = Release|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Debug.ActiveCfg = Debug|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Debug.Build.0 = Debug|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Release.ActiveCfg = Release|Win32
+ {16909EE7-24AF-97C1-C76B-204B971BA959}.Release.Build.0 = Release|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Debug.ActiveCfg = Debug|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Debug.Build.0 = Debug|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Release.ActiveCfg = Release|Win32
+ {07022E76-6CB5-92C1-B47F-A10772A79B43}.Release.Build.0 = Release|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Debug.ActiveCfg = Debug|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Debug.Build.0 = Debug|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Release.ActiveCfg = Release|Win32
+ {1690A9E7-DB57-971C-F24A-09B752A942F7}.Release.Build.0 = Release|Win32
+ {97B61B24-4C97-9681-50BF-243175A813B6}.Debug.ActiveCfg = Debug|Win32
+ {97B61B24-4C97-9681-50BF-243175A813B6}.Debug.Build.0 = Debug|Win32
+ {97B61B24-4C97-9681-50BF-243175A813B6}.Release.ActiveCfg = Release|Win32
+ {97B61B24-4C97-9681-50BF-243175A813B6}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
+>>>>>>> .merge-right.r46629

Modified: branches/release/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -106,6 +106,9 @@
                         Filter="h;hpp;hxx;hm;inl;inc;xsd"
                         UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
                         <File
+ RelativePath="..\..\..\..\..\boost\intrusive\any_hook.hpp">
+ </File>
+ <File
                                 RelativePath="..\..\..\..\..\boost\intrusive\avl_set.hpp">
                         </File>
                         <File
@@ -154,10 +157,7 @@
                                 RelativePath="..\..\..\..\..\boost\intrusive\options.hpp">
                         </File>
                         <File
- RelativePath="..\..\..\..\..\boost\intrusive\pointer_plus_2_bits.hpp">
- </File>
- <File
- RelativePath="..\..\..\..\..\boost\intrusive\pointer_plus_bit.hpp">
+ RelativePath="..\..\..\..\..\boost\intrusive\pointer_plus_bits.hpp">
                         </File>
                         <File
                                 RelativePath="..\..\..\..\..\boost\intrusive\rbtree.hpp">
@@ -211,6 +211,9 @@
                                 Name="detail"
                                 Filter="">
                                 <File
+ RelativePath="..\..\..\..\..\boost\intrusive\detail\any_node_and_algorithms.hpp">
+ </File>
+ <File
                                         RelativePath="..\..\..\..\..\boost\intrusive\detail\assert.hpp">
                                 </File>
                                 <File
@@ -241,9 +244,6 @@
                                         RelativePath="..\..\..\..\..\boost\intrusive\detail\mpl.hpp">
                                 </File>
                                 <File
- RelativePath="..\..\..\..\..\boost\intrusive\detail\no_exceptions_support.hpp">
- </File>
- <File
                                         RelativePath="..\..\..\..\..\boost\intrusive\detail\parent_from_member.hpp">
                                 </File>
                                 <File
@@ -323,6 +323,9 @@
                                 RelativePath="..\..\..\example\doc_advanced_value_traits2.cpp">
                         </File>
                         <File
+ RelativePath="..\..\..\example\doc_any_hook.cpp">
+ </File>
+ <File
                                 RelativePath="..\..\..\example\doc_assoc_optimized_code.cpp">
                         </File>
                         <File

Modified: branches/release/libs/intrusive/proj/vc7ide/list/list.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/list/list.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/list/list.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -127,16 +127,6 @@
                                 RelativePath="..\..\..\test\list_test.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/multiset/multiset.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -121,16 +121,6 @@
                                 RelativePath="..\..\..\test\multiset_test.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/perf_test/perf_test.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -122,16 +122,6 @@
                                 RelativePath="..\..\..\perf\perf_list.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{68B017A6-F80D6A2-084c-06A6-8A323C1ABD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/proj/vc7ide/set/set.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/set/set.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/set/set.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -121,16 +121,6 @@
                                 RelativePath="..\..\..\test\set_test.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{68007AB6-FDA6800-084c-B78A-8121AA3BBD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/proj/vc7ide/slist/slist.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/slist/slist.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/slist/slist.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -121,16 +121,6 @@
                                 RelativePath="..\..\..\test\slist_test.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/unordered_multiset/unordered_multiset.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -122,16 +122,6 @@
                                 RelativePath="..\..\..\test\unordered_multiset_test.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{99954380-9C8D-084c-4b04-62E52E6FBBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{6A181B76-FDA6800-8E8B-0A66-813A3BB1AD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj
==============================================================================
--- branches/release/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj (original)
+++ branches/release/libs/intrusive/proj/vc7ide/unordered_set/unordered_set.vcproj 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -121,16 +121,6 @@
                                 RelativePath="..\..\..\test\unordered_set_test.cpp">
                         </File>
                 </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{68AB0076-FDA6800-084c-06A6-8121AA3BBD01}">
- </Filter>
         </Files>
         <Globals>
         </Globals>

Modified: branches/release/libs/intrusive/test/Jamfile.v2
==============================================================================
--- branches/release/libs/intrusive/test/Jamfile.v2 (original)
+++ branches/release/libs/intrusive/test/Jamfile.v2 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -1,5 +1,5 @@
 # Boost Intrusive Library Test Jamfile
-# (C) Copyright Ion Gaztañaga 2006.
+# (C) Copyright Ion Gaztanaga 2006.
 # Use, modification and distribution are subject to 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)

Modified: branches/release/libs/intrusive/test/avl_set_test.cpp
==============================================================================
--- branches/release/libs/intrusive/test/avl_set_test.cpp (original)
+++ branches/release/libs/intrusive/test/avl_set_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -108,7 +108,6 @@
 
 int main( int, char* [] )
 {
-
    test_main_template<void*, false>()();
    test_main_template<boost::intrusive::smart_ptr<void>, false>()();
    test_main_template<void*, true>()();

Modified: branches/release/libs/intrusive/test/common_functors.hpp
==============================================================================
--- branches/release/libs/intrusive/test/common_functors.hpp (original)
+++ branches/release/libs/intrusive/test/common_functors.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -41,6 +41,14 @@
    { return new T(t); }
 };
 
+template<class T>
+class new_default_factory
+{
+ public:
+ T *operator()()
+ { return new T(); }
+};
+
 } //namespace test {
 } //namespace intrusive {
 } //namespace boost {

Modified: branches/release/libs/intrusive/test/generic_assoc_test.hpp
==============================================================================
--- branches/release/libs/intrusive/test/generic_assoc_test.hpp (original)
+++ branches/release/libs/intrusive/test/generic_assoc_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -52,9 +52,38 @@
    static void test_rebalance(std::vector<value_type>& values);
    static void test_rebalance(std::vector<value_type>& values, boost::intrusive::detail::true_type);
    static void test_rebalance(std::vector<value_type>& values, boost::intrusive::detail::false_type);
+ static void test_container_from_iterator(std::vector<value_type>& values);
 };
 
 template<class ValueTraits, template <class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none> class ContainerDefiner>
+void test_generic_assoc<ValueTraits, ContainerDefiner>::
+ test_container_from_iterator(std::vector<value_type>& values)
+{
+ typedef typename ContainerDefiner
+ < value_type
+ , value_traits<ValueTraits>
+ , constant_time_size<value_type::constant_time_size>
+ >::type assoc_type;
+
+ assoc_type testset(values.begin(), values.end());
+ typedef typename assoc_type::iterator it_type;
+ typedef typename assoc_type::const_iterator cit_type;
+ typedef typename assoc_type::size_type sz_type;
+ sz_type sz = testset.size();
+ for(it_type b(testset.begin()), e(testset.end()); b != e; ++b)
+ {
+ assoc_type &s = assoc_type::container_from_iterator(b);
+ const assoc_type &cs = assoc_type::container_from_iterator(cit_type(b));
+ BOOST_TEST(&s == &cs);
+ BOOST_TEST(&s == &testset);
+ s.erase(b);
+ BOOST_TEST(testset.size() == (sz-1));
+ s.insert(*b);
+ BOOST_TEST(testset.size() == sz);
+ }
+}
+
+template<class ValueTraits, template <class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none> class ContainerDefiner>
 void test_generic_assoc<ValueTraits, ContainerDefiner>::test_insert_erase_burst()
 {
    typedef typename ValueTraits::value_type value_type;
@@ -103,12 +132,14 @@
 template<class ValueTraits, template <class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none> class ContainerDefiner>
 void test_generic_assoc<ValueTraits, ContainerDefiner>::test_all(std::vector<typename ValueTraits::value_type>& values)
 {
+ typedef typename ValueTraits::value_type value_type;
    test_clone(values);
    test_container_from_end(values);
    test_splay_up(values);
    test_splay_down(values);
    test_rebalance(values);
    test_insert_erase_burst();
+ test_container_from_iterator(values);
 }
 
 template<class ValueTraits, template <class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none> class ContainerDefiner>

Modified: branches/release/libs/intrusive/test/generic_set_test.hpp
==============================================================================
--- branches/release/libs/intrusive/test/generic_set_test.hpp (original)
+++ branches/release/libs/intrusive/test/generic_set_test.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -35,6 +35,7 @@
    static void test_impl();
 };
 
+
 template<class ValueTraits, template <class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none, class = ::boost::intrusive::none> class ContainerDefiner>
 void test_generic_set<ValueTraits, ContainerDefiner>::test_all()
 {

Modified: branches/release/libs/intrusive/test/itestvalue.hpp
==============================================================================
--- branches/release/libs/intrusive/test/itestvalue.hpp (original)
+++ branches/release/libs/intrusive/test/itestvalue.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -126,20 +126,30 @@
 struct uset_auto_base_hook_type
 {
    typedef unordered_set_base_hook
- < link_mode<auto_unlink>, void_pointer<VoidPointer>
- , tag<my_tag>, store_hash<true> > type;
+ < link_mode<auto_unlink>
+ , void_pointer<VoidPointer>
+ , tag<my_tag>
+ , store_hash<true>
+ > type;
 };
 
 template<class VoidPointer>
 struct uset_member_hook_type
-{ typedef unordered_set_member_hook<void_pointer<VoidPointer> > type; };
+{
+ typedef unordered_set_member_hook
+ < void_pointer<VoidPointer>
+ , optimize_multikey<true>
+ > type;
+};
 
 template<class VoidPointer>
 struct uset_auto_member_hook_type
 {
    typedef unordered_set_member_hook
       < link_mode<auto_unlink>, void_pointer<VoidPointer>
- , store_hash<true> > type;
+ , store_hash<true>
+ , optimize_multikey<true>
+ > type;
 };
 
 template<class VoidPointer, bool ConstantTimeSize>
@@ -318,6 +328,49 @@
       slist_auto_node_.swap_nodes(other.slist_auto_node_);
    }
 
+ bool is_linked() const
+ {
+ //Set
+ return set_base_hook_t::is_linked() ||
+ set_auto_base_hook_t::is_linked() ||
+ set_node_.is_linked() ||
+ set_auto_node_.is_linked() ||
+
+ //SplaySet
+ splay_set_base_hook_t::is_linked() ||
+ splay_set_auto_base_hook_t::is_linked() ||
+ splay_set_node_.is_linked() ||
+ splay_set_auto_node_.is_linked() ||
+
+ //ScapeoatSet
+ bs_set_base_hook_t::is_linked() ||
+ sg_set_node_.is_linked() ||
+
+ //AvlSet
+ avl_set_base_hook_t::is_linked() ||
+ avl_set_auto_base_hook_t::is_linked() ||
+ avl_set_node_.is_linked() ||
+ avl_set_auto_node_.is_linked() ||
+
+ //Unordered set
+ unordered_set_base_hook_t::is_linked() ||
+ unordered_set_auto_base_hook_t::is_linked() ||
+ unordered_set_node_.is_linked() ||
+ unordered_set_auto_node_.is_linked() ||
+
+ //List
+ list_base_hook_t::is_linked() ||
+ list_auto_base_hook_t::is_linked() ||
+ list_node_.is_linked() ||
+ list_auto_node_.is_linked() ||
+
+ //Slist
+ slist_base_hook_t::is_linked() ||
+ slist_auto_base_hook_t::is_linked() ||
+ slist_node_.is_linked() ||
+ slist_auto_node_.is_linked();
+ }
+
    ~testvalue()
    {}
 

Modified: branches/release/libs/intrusive/test/list_test.cpp
==============================================================================
--- branches/release/libs/intrusive/test/list_test.cpp (original)
+++ branches/release/libs/intrusive/test/list_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -229,6 +229,7 @@
       TEST_INTRUSIVE_SEQUENCE( init_values, const_testlist.begin() ); }
 }
 
+
 template<class ValueTraits>
 void test_list<ValueTraits>
    ::test_shift(std::vector<typename ValueTraits::value_type>& values)

Modified: branches/release/libs/intrusive/test/slist_test.cpp
==============================================================================
--- branches/release/libs/intrusive/test/slist_test.cpp (original)
+++ branches/release/libs/intrusive/test/slist_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -315,7 +315,7 @@
    testlist.erase (++testlist.begin(), testlist.end());
    BOOST_TEST (testlist.size() == 1);
    BOOST_TEST (testlist.front().value_ == 3);
-}
+}
 
 template<class ValueTraits, bool Linear, bool CacheLast>
 void test_slist<ValueTraits, Linear, CacheLast>

Modified: branches/release/libs/intrusive/test/smart_ptr.hpp
==============================================================================
--- branches/release/libs/intrusive/test/smart_ptr.hpp (original)
+++ branches/release/libs/intrusive/test/smart_ptr.hpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -12,8 +12,7 @@
 #define BOOST_INTRUSIVE_SMART_PTR_HPP
 
 #include <boost/iterator.hpp>
-#include <boost/intrusive/pointer_plus_bit.hpp>
-#include <boost/intrusive/pointer_plus_2_bits.hpp>
+#include <boost/intrusive/pointer_plus_bits.hpp>
 
 #if (defined _MSC_VER) && (_MSC_VER >= 1200)
 # pragma once
@@ -109,7 +108,7 @@
    public: //Public Functions
 
    //!Constructor from raw pointer (allows "0" pointer conversion). Never throws.
- smart_ptr(pointer ptr = 0)
+ explicit smart_ptr(pointer ptr = 0)
       : m_ptr(ptr)
    {}
 
@@ -351,67 +350,34 @@
 //for intrusive containers, saving space
 namespace intrusive {
 
-template<std::size_t N>
-struct has_pointer_plus_bit<smart_ptr<void>, N>
+template<std::size_t Alignment>
+struct max_pointer_plus_bits<smart_ptr<void>, Alignment>
 {
- static const bool value = has_pointer_plus_bit<void*, N>::value;
+ static const std::size_t value = max_pointer_plus_bits<void*, Alignment>::value;
 };
 
-//Specialization
-template<class T>
-struct pointer_plus_bit<smart_ptr<T> >
-{
- typedef smart_ptr<T> pointer;
-
- static pointer get_pointer(const pointer &n)
- { return pointer_plus_bit<T*>::get_pointer(n.get()); }
-
- static void set_pointer(pointer &n, pointer p)
- {
- T *raw_n = n.get();
- pointer_plus_bit<T*>::set_pointer(raw_n, p.get());
- n = raw_n;
- }
-
- static bool get_bit(const pointer &n)
- { return pointer_plus_bit<T*>::get_bit(n.get()); }
-
- static void set_bit(pointer &n, bool c)
- {
- T *raw_n = n.get();
- pointer_plus_bit<T*>::set_bit(raw_n, c);
- n = raw_n;
- }
-};
-
-template<std::size_t N>
-struct has_pointer_plus_2_bits<smart_ptr<void>, N>
-{
- static const bool value = has_pointer_plus_2_bits<void*, N>::value;
-};
-
-template<class T>
-struct pointer_plus_2_bits<smart_ptr<T> >
+template<class T, std::size_t NumBits>
+struct pointer_plus_bits<smart_ptr<T>, NumBits>
 {
    typedef smart_ptr<T> pointer;
 
    static pointer get_pointer(const pointer &n)
- { return pointer_plus_2_bits<T*>::get_pointer(n.get()); }
+ { return pointer_plus_bits<T*, NumBits>::get_pointer(n.get()); }
 
    static void set_pointer(pointer &n, pointer p)
    {
       T *raw_n = n.get();
- pointer_plus_2_bits<T*>::set_pointer(raw_n, p.get());
+ pointer_plus_bits<T*, NumBits>::set_pointer(raw_n, p.get());
       n = raw_n;
    }
 
    static std::size_t get_bits(const pointer &n)
- { return pointer_plus_2_bits<T*>::get_bits(n.get()); }
+ { return pointer_plus_bits<T*, NumBits>::get_bits(n.get()); }
 
    static void set_bits(pointer &n, std::size_t c)
    {
       T *raw_n = n.get();
- pointer_plus_2_bits<T*>::set_bits(raw_n, c);
+ pointer_plus_bits<T*, NumBits>::set_bits(raw_n, c);
       n = raw_n;
    }
 };

Modified: branches/release/libs/intrusive/test/unordered_multiset_test.cpp
==============================================================================
--- branches/release/libs/intrusive/test/unordered_multiset_test.cpp (original)
+++ branches/release/libs/intrusive/test/unordered_multiset_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -10,7 +10,6 @@
 // See http://www.boost.org/libs/intrusive for documentation.
 //
 /////////////////////////////////////////////////////////////////////////////
-
 #include <boost/intrusive/detail/config_begin.hpp>
 #include <boost/intrusive/unordered_set.hpp>
 #include <boost/intrusive/detail/pointer_to_other.hpp>
@@ -18,6 +17,7 @@
 #include "smart_ptr.hpp"
 #include "common_functors.hpp"
 #include <vector>
+#include <algorithm> //std::sort std::find
 #include <set>
 #include <boost/detail/lightweight_test.hpp>
 #include "test_macros.hpp"
@@ -27,7 +27,7 @@
 
 static const std::size_t BucketSize = 11;
 
-template<class ValueTraits>
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
 struct test_unordered_multiset
 {
    typedef typename ValueTraits::value_type value_type;
@@ -41,14 +41,16 @@
    static void test_clone(std::vector<value_type>& values);
 };
 
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_all (std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_all (std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
- <value_type
+ < value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    {
       typedef typename unordered_multiset_type::bucket_traits bucket_traits;
@@ -76,14 +78,16 @@
 }
 
 //test case due to an error in tree implementation:
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_impl()
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_impl()
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
 
@@ -106,14 +110,16 @@
 }
 
 //test: constructor, iterator, clear, reverse_iterator, front, back, size:
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_sort(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_sort(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
 
@@ -127,104 +133,190 @@
 }
   
 //test: insert, const_iterator, const_reverse_iterator, erase, iterator_to:
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_insert(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_insert(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
+ typedef typename unordered_multiset_type::iterator iterator;
+ {
+ typename unordered_multiset_type::bucket_type buckets [BucketSize];
+ unordered_multiset_type testset(bucket_traits(buckets, BucketSize));
 
- typename unordered_multiset_type::bucket_type buckets [BucketSize];
- unordered_multiset_type testset(bucket_traits(buckets, BucketSize));
-
- testset.insert(&values[0] + 2, &values[0] + 5);
-
- const unordered_multiset_type& const_testset = testset;
- { int init_values [] = { 1, 4, 5 };
- TEST_INTRUSIVE_SEQUENCE( init_values, const_testset.begin() ); }
+ testset.insert(&values[0] + 2, &values[0] + 5);
 
- typename unordered_multiset_type::iterator i = testset.begin();
- BOOST_TEST (i->value_ == 1);
+ const unordered_multiset_type& const_testset = testset;
+ { int init_values [] = { 1, 4, 5 };
+ TEST_INTRUSIVE_SEQUENCE( init_values, const_testset.begin() ); }
+
+ typename unordered_multiset_type::iterator i = testset.begin();
+ BOOST_TEST (i->value_ == 1);
+
+ i = testset.insert (values[0]);
+ BOOST_TEST (&*i == &values[0]);
+
+ i = testset.iterator_to (values[2]);
+ BOOST_TEST (&*i == &values[2]);
+ testset.erase(i);
 
- i = testset.insert (values[0]);
- BOOST_TEST (&*i == &values[0]);
-
- i = testset.iterator_to (values[2]);
- BOOST_TEST (&*i == &values[2]);
- testset.erase(i);
-
- { int init_values [] = { 1, 3, 5 };
- TEST_INTRUSIVE_SEQUENCE( init_values, const_testset.begin() ); }
- testset.clear();
- testset.insert(&values[0], &values[0] + values.size());
+ { int init_values [] = { 1, 3, 5 };
+ TEST_INTRUSIVE_SEQUENCE( init_values, const_testset.begin() ); }
+ testset.clear();
+ testset.insert(&values[0], &values[0] + values.size());
 
- { int init_values [] = { 1, 2, 2, 3, 4, 5 };
- TEST_INTRUSIVE_SEQUENCE( init_values, const_testset.begin() ); }
+ { int init_values [] = { 1, 2, 2, 3, 4, 5 };
+ TEST_INTRUSIVE_SEQUENCE( init_values, const_testset.begin() ); }
 
- BOOST_TEST (testset.erase(1) == 1);
- BOOST_TEST (testset.erase(2) == 2);
- BOOST_TEST (testset.erase(3) == 1);
- BOOST_TEST (testset.erase(4) == 1);
- BOOST_TEST (testset.erase(5) == 1);
- BOOST_TEST (testset.empty() == true);
-
- //Now with a single bucket
- typename unordered_multiset_type::bucket_type single_bucket[1];
- unordered_multiset_type testset2(bucket_traits(single_bucket, 1));
- testset2.insert(&values[0], &values[0] + values.size());
- BOOST_TEST (testset2.erase(5) == 1);
- BOOST_TEST (testset2.erase(2) == 2);
- BOOST_TEST (testset2.erase(1) == 1);
- BOOST_TEST (testset2.erase(4) == 1);
- BOOST_TEST (testset2.erase(3) == 1);
- BOOST_TEST (testset2.empty() == true);
+ BOOST_TEST (testset.erase(1) == 1);
+ BOOST_TEST (testset.erase(2) == 2);
+ BOOST_TEST (testset.erase(3) == 1);
+ BOOST_TEST (testset.erase(4) == 1);
+ BOOST_TEST (testset.erase(5) == 1);
+ BOOST_TEST (testset.empty() == true);
+
+ //Now with a single bucket
+ typename unordered_multiset_type::bucket_type single_bucket[1];
+ unordered_multiset_type testset2(bucket_traits(single_bucket, 1));
+ testset2.insert(&values[0], &values[0] + values.size());
+ BOOST_TEST (testset2.erase(5) == 1);
+ BOOST_TEST (testset2.erase(2) == 2);
+ BOOST_TEST (testset2.erase(1) == 1);
+ BOOST_TEST (testset2.erase(4) == 1);
+ BOOST_TEST (testset2.erase(3) == 1);
+ BOOST_TEST (testset2.empty() == true);
+ }
+ {
+ //Now erase just one per loop
+ const int random_init[] = { 3, 2, 4, 1, 5, 2, 2 };
+ const unsigned int random_size = sizeof(random_init)/sizeof(random_init[0]);
+ typename unordered_multiset_type::bucket_type single_bucket[1];
+ for(unsigned int i = 0, max = random_size; i != max; ++i){
+ std::vector<typename ValueTraits::value_type> data (random_size);
+ for (unsigned int j = 0; j < random_size; ++j)
+ data[j].value_ = random_init[j];
+ unordered_multiset_type testset_new(bucket_traits(single_bucket, 1));
+ testset_new.insert(&data[0], &data[0]+max);
+ testset_new.erase(testset_new.iterator_to(data[i]));
+ BOOST_TEST (testset_new.size() == (max -1));
+ }
+ }
+ {
+ typename unordered_multiset_type::bucket_type buckets [BucketSize];
+ const unsigned int NumBucketSize = BucketSize;
+ const unsigned int LoadFactor = 3;
+ const unsigned int NumIterations = NumBucketSize*LoadFactor;
+ std::vector<value_type> random_init(NumIterations);//Preserve memory
+ std::vector<value_type> set_tester;
+ set_tester.reserve(NumIterations);
+
+ //Initialize values
+ for (unsigned int i = 0; i < NumIterations; ++i){
+ random_init[i].value_ = i*2;//(i/LoadFactor)*LoadFactor;
+ }
+
+ for(unsigned int initial_pos = 0; initial_pos != (NumIterations+1); ++initial_pos){
+ for(unsigned int final_pos = initial_pos; final_pos != (NumIterations+1); ++final_pos){
+
+ //Create intrusive container inserting values
+ unordered_multiset_type testset
+ ( &random_init[0]
+ , &random_init[0] + random_init.size()
+ , bucket_traits(buckets, NumBucketSize));
+
+ BOOST_TEST (testset.size() == random_init.size());
+
+ //Obtain the iterator range to erase
+ iterator it_beg_pos = testset.begin();
+ for(unsigned int it_beg_pos_num = 0; it_beg_pos_num != initial_pos; ++it_beg_pos_num){
+ ++it_beg_pos;
+ }
+ iterator it_end_pos(it_beg_pos);
+ for(unsigned int it_end_pos_num = 0; it_end_pos_num != (final_pos - initial_pos); ++it_end_pos_num){
+ ++it_end_pos;
+ }
+
+ //Erase the same values in both the intrusive and original vector
+ std::size_t erased_cnt = std::distance(it_beg_pos, it_end_pos);
+
+ //Erase values from the intrusive container
+ testset.erase(it_beg_pos, it_end_pos);
+
+ BOOST_TEST (testset.size() == (random_init.size()-(final_pos - initial_pos)));
+
+ //Now test...
+ BOOST_TEST ((random_init.size() - erased_cnt) == testset.size());
+
+ //Create an ordered copy of the intrusive container
+ set_tester.insert(set_tester.end(), testset.begin(), testset.end());
+ std::sort(set_tester.begin(), set_tester.end());
+ {
+ typename std::vector<value_type>::iterator it = set_tester.begin(), itend = set_tester.end();
+ typename std::vector<value_type>::iterator random_init_it(random_init.begin());
+ for( ; it != itend; ++it){
+ while(!random_init_it->is_linked())
+ ++random_init_it;
+ BOOST_TEST(*it == *random_init_it);
+ ++random_init_it;
+ }
+ }
+ set_tester.clear();
+ }
+ }
+ }
 }
 
 //test: insert (seq-version), swap, erase (seq-version), size:
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_swap(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_swap(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
-
    typename unordered_multiset_type::bucket_type buckets [BucketSize];
- typename unordered_multiset_type::bucket_type buckets2 [BucketSize];
- unordered_multiset_type testset1(&values[0], &values[0] + 2, bucket_traits(buckets, BucketSize));
- unordered_multiset_type testset2(bucket_traits(buckets2, BucketSize));
-
- testset2.insert (&values[0] + 2, &values[0] + 6);
- testset1.swap (testset2);
+ {
+ typename unordered_multiset_type::bucket_type buckets2 [BucketSize];
+ unordered_multiset_type testset1(&values[0], &values[0] + 2, bucket_traits(buckets, BucketSize));
+ unordered_multiset_type testset2(bucket_traits(buckets2, BucketSize));
 
- { int init_values [] = { 1, 2, 4, 5 };
- TEST_INTRUSIVE_SEQUENCE( init_values, testset1.begin() ); }
+ testset2.insert (&values[0] + 2, &values[0] + 6);
+ testset1.swap (testset2);
 
- { int init_values [] = { 2, 3 };
- TEST_INTRUSIVE_SEQUENCE( init_values, testset2.begin() ); }
+ { int init_values [] = { 1, 2, 4, 5 };
+ TEST_INTRUSIVE_SEQUENCE( init_values, testset1.begin() ); }
 
- testset1.erase (testset1.iterator_to(values[5]), testset1.end());
- BOOST_TEST (testset1.size() == 1);
- // BOOST_TEST (&testset1.front() == &values[3]);
- BOOST_TEST (&*testset1.begin() == &values[3]);
+ { int init_values [] = { 2, 3 };
+ TEST_INTRUSIVE_SEQUENCE( init_values, testset2.begin() ); }
+ testset1.erase (testset1.iterator_to(values[5]), testset1.end());
+ BOOST_TEST (testset1.size() == 1);
+ // BOOST_TEST (&testset1.front() == &values[3]);
+ BOOST_TEST (&*testset1.begin() == &values[3]);
+ }
 }
 
 //test: rehash:
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_rehash(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_rehash(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
 
@@ -261,14 +353,16 @@
 }
 
 //test: find, equal_range (lower_bound, upper_bound):
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>::test_find(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>::test_find(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_multiset
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
 
@@ -293,8 +387,8 @@
 }
 
 
-template<class ValueTraits>
-void test_unordered_multiset<ValueTraits>
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_multiset<ValueTraits, CacheBegin, CompareHash>
    ::test_clone(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
@@ -302,6 +396,8 @@
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_multiset_type;
    typedef typename unordered_multiset_type::bucket_traits bucket_traits;
    {
@@ -373,6 +469,8 @@
                   < value_type
                   , typename value_type::unordered_set_base_hook_t
>::type
+ , true
+ , false
>::test_all(data);
 
       test_unordered_multiset < typename detail::get_member_value_traits
@@ -382,6 +480,8 @@
                                , &value_type::unordered_set_node_
>
>::type
+ , false
+ , false
>::test_all(data);
 
       return 0;
@@ -404,6 +504,8 @@
                   < value_type
                   , typename value_type::unordered_set_base_hook_t
>::type
+ , true
+ , false
>::test_all(data);
 
       test_unordered_multiset < typename detail::get_member_value_traits
@@ -413,12 +515,16 @@
                                , &value_type::unordered_set_node_
>
>::type
+ , false
+ , false
>::test_all(data);
 
       test_unordered_multiset < typename detail::get_base_value_traits
                   < value_type
                   , typename value_type::unordered_set_auto_base_hook_t
>::type
+ , true
+ , true
>::test_all(data);
 
       test_unordered_multiset < typename detail::get_member_value_traits
@@ -428,6 +534,8 @@
                                , &value_type::unordered_set_auto_node_
>
>::type
+ , false
+ , true
>::test_all(data);
       return 0;
    }

Modified: branches/release/libs/intrusive/test/unordered_set_test.cpp
==============================================================================
--- branches/release/libs/intrusive/test/unordered_set_test.cpp (original)
+++ branches/release/libs/intrusive/test/unordered_set_test.cpp 2008-06-23 14:20:30 EDT (Mon, 23 Jun 2008)
@@ -26,7 +26,7 @@
 
 static const std::size_t BucketSize = 11;
 
-template<class ValueTraits>
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
 struct test_unordered_set
 {
    typedef typename ValueTraits::value_type value_type;
@@ -40,14 +40,16 @@
    static void test_clone(std::vector<value_type>& values);
 };
 
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_all(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_all(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
    {
@@ -75,14 +77,16 @@
 }
 
 //test case due to an error in tree implementation:
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_impl()
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_impl()
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
 
@@ -103,14 +107,16 @@
 }
 
 //test: constructor, iterator, clear, reverse_iterator, front, back, size:
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_sort(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_sort(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
 
@@ -126,14 +132,16 @@
 }
   
 //test: insert, const_iterator, const_reverse_iterator, erase, iterator_to:
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_insert(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_insert(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
 
@@ -161,14 +169,16 @@
 }
 
 //test: insert (seq-version), swap, erase (seq-version), size:
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_swap(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_swap(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
 
@@ -192,14 +202,16 @@
 }
 
 //test: rehash:
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_rehash(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_rehash(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
 
@@ -237,14 +249,16 @@
 
 
 //test: find, equal_range (lower_bound, upper_bound):
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>::test_find(std::vector<typename ValueTraits::value_type>& values)
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>::test_find(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
    typedef unordered_set
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
 
@@ -267,8 +281,8 @@
    BOOST_TEST (testset.find (cmp_val) == testset.end());
 }
 
-template<class ValueTraits>
-void test_unordered_set<ValueTraits>
+template<class ValueTraits, bool CacheBegin, bool CompareHash>
+void test_unordered_set<ValueTraits, CacheBegin, CompareHash>
    ::test_clone(std::vector<typename ValueTraits::value_type>& values)
 {
    typedef typename ValueTraits::value_type value_type;
@@ -276,6 +290,8 @@
       <value_type
       , value_traits<ValueTraits>
       , constant_time_size<value_type::constant_time_size>
+ , cache_begin<CacheBegin>
+ , compare_hash<CompareHash>
> unordered_set_type;
    typedef typename unordered_set_type::bucket_traits bucket_traits;
    {
@@ -347,6 +363,8 @@
                   < value_type
                   , typename value_type::unordered_set_base_hook_t
>::type
+ , true
+ , false
>::test_all(data);
       test_unordered_set < typename detail::get_member_value_traits
                   < value_type
@@ -355,6 +373,8 @@
                                , &value_type::unordered_set_node_
>
>::type
+ , false
+ , false
>::test_all(data);
 
       return 0;
@@ -377,6 +397,8 @@
                   < value_type
                   , typename value_type::unordered_set_base_hook_t
>::type
+ , true
+ , false
>::test_all(data);
 
       test_unordered_set < typename detail::get_member_value_traits
@@ -386,12 +408,16 @@
                                , &value_type::unordered_set_node_
>
>::type
+ , false
+ , false
>::test_all(data);
 
       test_unordered_set < typename detail::get_base_value_traits
                   < value_type
                   , typename value_type::unordered_set_auto_base_hook_t
>::type
+ , true
+ , true
>::test_all(data);
 
       test_unordered_set < typename detail::get_member_value_traits
@@ -401,6 +427,8 @@
                                , &value_type::unordered_set_auto_node_
>
>::type
+ , false
+ , true
>::test_all(data);
       return 0;
    }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk