Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2007-09-26 13:46:35


Author: igaztanaga
Date: 2007-09-26 13:46:34 EDT (Wed, 26 Sep 2007)
New Revision: 39552
URL: http://svn.boost.org/trac/boost/changeset/39552

Log:
Changes introduced by the new intrusive version.
Text files modified:
   trunk/libs/interprocess/test/check_equal_containers.hpp | 2
   trunk/libs/interprocess/test/memory_algorithm_test_template.hpp | 501 ++++++++++++++++++---------------------
   trunk/libs/interprocess/test/node_pool_test.cpp | 11
   trunk/libs/interprocess/test/shared_ptr_test.cpp | 1
   trunk/libs/interprocess/test/unique_ptr_test.cpp | 13
   5 files changed, 236 insertions(+), 292 deletions(-)

Modified: trunk/libs/interprocess/test/check_equal_containers.hpp
==============================================================================
--- trunk/libs/interprocess/test/check_equal_containers.hpp (original)
+++ trunk/libs/interprocess/test/check_equal_containers.hpp 2007-09-26 13:46:34 EDT (Wed, 26 Sep 2007)
@@ -32,7 +32,7 @@
 
    typename MyShmCont::iterator itshm(shmcont->begin()), itshmend(shmcont->end());
    typename MyStdCont::iterator itstd(stdcont->begin());
- if((typename MyShmCont::size_type)std::distance(itshm, itshmend) != shmcont->size()){
+ if((typename MyStdCont::size_type)std::distance(itshm, itshmend) != shmcont->size()){
       return false;
    }
    for(; itshm != itshmend; ++itshm, ++itstd){

Modified: trunk/libs/interprocess/test/memory_algorithm_test_template.hpp
==============================================================================
--- trunk/libs/interprocess/test/memory_algorithm_test_template.hpp (original)
+++ trunk/libs/interprocess/test/memory_algorithm_test_template.hpp 2007-09-26 13:46:34 EDT (Wed, 26 Sep 2007)
@@ -20,77 +20,64 @@
 
 namespace boost { namespace interprocess { namespace test {
 
+enum deallocation_type { DirectDeallocation, InverseDeallocation, MixedDeallocation, EndDeallocationType };
+
 //This test allocates until there is no more memory
 //and after that deallocates all in the inverse order
 template<class Allocator>
-bool test_allocation_inverse_deallocation(Allocator &a)
+bool test_allocation(Allocator &a)
 {
- std::vector<void*> buffers;
-
- for(int i = 0; true; ++i){
- void *ptr = a.allocate(i, std::nothrow);
- if(!ptr)
- break;
- buffers.push_back(ptr);
- }
-
- for(int j = (int)buffers.size()
- ;j--
- ;){
- a.deallocate(buffers[j]);
- }
-
- return a.all_memory_deallocated() && a.check_sanity();
-}
+ for( deallocation_type t = DirectDeallocation
+ ; t != EndDeallocationType
+ ; t = (deallocation_type)((int)t + 1)){
+ std::vector<void*> buffers;
+ std::size_t free_memory = a.get_free_memory();
 
-//This test allocates until there is no more memory
-//and after that deallocates all in the same order
-template<class Allocator>
-bool test_allocation_direct_deallocation(Allocator &a)
-{
- std::vector<void*> buffers;
- std::size_t free_memory = a.get_free_memory();
+ for(int i = 0; true; ++i){
+ void *ptr = a.allocate(i, std::nothrow);
+ if(!ptr)
+ break;
+ buffers.push_back(ptr);
+ }
 
- for(int i = 0; true; ++i){
- void *ptr = a.allocate(i, std::nothrow);
- if(!ptr)
+ switch(t){
+ case DirectDeallocation:
+ {
+ for(int j = 0, max = (int)buffers.size()
+ ;j < max
+ ;++j){
+ a.deallocate(buffers[j]);
+ }
+ }
          break;
- buffers.push_back(ptr);
- }
-
- for(int j = 0, max = (int)buffers.size()
- ;j < max
- ;++j){
- a.deallocate(buffers[j]);
- }
-
- return free_memory == a.get_free_memory() &&
- a.all_memory_deallocated() && a.check_sanity();
-}
-
-//This test allocates until there is no more memory
-//and after that deallocates all following a pattern
-template<class Allocator>
-bool test_allocation_mixed_deallocation(Allocator &a)
-{
- std::vector<void*> buffers;
-
- for(int i = 0; true; ++i){
- void *ptr = a.allocate(i, std::nothrow);
- if(!ptr)
+ case InverseDeallocation:
+ {
+ for(int j = (int)buffers.size()
+ ;j--
+ ;){
+ a.deallocate(buffers[j]);
+ }
+ }
          break;
- buffers.push_back(ptr);
- }
-
- for(int j = 0, max = (int)buffers.size()
- ;j < max
- ;++j){
- int pos = (j%4)*((int)buffers.size())/4;
- a.deallocate(buffers[pos]);
- buffers.erase(buffers.begin()+pos);
+ case MixedDeallocation:
+ {
+ for(int j = 0, max = (int)buffers.size()
+ ;j < max
+ ;++j){
+ int pos = (j%4)*((int)buffers.size())/4;
+ a.deallocate(buffers[pos]);
+ buffers.erase(buffers.begin()+pos);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ bool ok = free_memory == a.get_free_memory() &&
+ a.all_memory_deallocated() && a.check_sanity();
+ if(!ok) return ok;
    }
-
- return a.all_memory_deallocated() && a.check_sanity();
+ return true;
 }
 
 //This test allocates until there is no more memory
@@ -524,98 +511,106 @@
 //This test allocates multiple values until there is no more memory
 //and after that deallocates all in the inverse order
 template<class Allocator>
-bool test_many_equal_allocation_inverse_deallocation(Allocator &a)
+bool test_many_equal_allocation(Allocator &a)
 {
    typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
+ for( deallocation_type t = DirectDeallocation
+ ; t != EndDeallocationType
+ ; t = (deallocation_type)((int)t + 1)){
+ std::size_t free_memory = a.get_free_memory();
 
- std::vector<void*> buffers;
- for(int i = 0; true; ++i){
- std::size_t received_size;
- multiallocation_iterator it = a.allocate_many(i+1, i+1, (i+1)*2, received_size, std::nothrow);
- if(!it)
- break;
- multiallocation_iterator itend;
+ std::vector<void*> buffers2;
 
- for(; it != itend; ++it){
- buffers.push_back(*it);
+ //Allocate buffers with extra memory
+ for(int i = 0; true; ++i){
+ void *ptr = a.allocate(i, std::nothrow);
+ if(!ptr)
+ break;
+ buffers2.push_back(ptr);
       }
- }
 
- for(int j = (int)buffers.size()
- ;j--
- ;){
- a.deallocate(buffers[j]);
- }
+ //Now deallocate the half of the blocks
+ //so expand maybe can merge new free blocks
+ for(int i = 0, max = (int)buffers2.size()
+ ;i < max
+ ;++i){
+ if(i%2){
+ a.deallocate(buffers2[i]);
+ buffers2[i] = 0;
+ }
+ }
 
- return a.all_memory_deallocated() && a.check_sanity();
-}
+ std::vector<void*> buffers;
+ for(int i = 0; true; ++i){
+ multiallocation_iterator it = a.allocate_many(i+1, (i+1)*2, std::nothrow);
+ if(!it)
+ break;
+ multiallocation_iterator itend;
 
-//This test allocates multiple values until there is no more memory
-//and after that deallocates all in the same order
-template<class Allocator>
-bool test_many_equal_allocation_direct_deallocation(Allocator &a)
-{
- typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
- std::vector<void*> buffers;
- std::size_t free_memory = a.get_free_memory();
+ std::size_t n = 0;
+ for(; it != itend; ++n){
+ buffers.push_back(*it++);
+ }
+ if(n != std::size_t((i+1)*2))
+ return false;
+ }
 
- for(int i = 0; true; ++i){
- std::size_t received_size;
- multiallocation_iterator it = a.allocate_many(i+1, i+1, (i+1)*2, received_size, std::nothrow);
- if(!it)
+ switch(t){
+ case DirectDeallocation:
+ {
+ for(int j = 0, max = (int)buffers.size()
+ ;j < max
+ ;++j){
+ a.deallocate(buffers[j]);
+ }
+ }
+ break;
+ case InverseDeallocation:
+ {
+ for(int j = (int)buffers.size()
+ ;j--
+ ;){
+ a.deallocate(buffers[j]);
+ }
+ }
+ break;
+ case MixedDeallocation:
+ {
+ for(int j = 0, max = (int)buffers.size()
+ ;j < max
+ ;++j){
+ int pos = (j%4)*((int)buffers.size())/4;
+ a.deallocate(buffers[pos]);
+ buffers.erase(buffers.begin()+pos);
+ }
+ }
+ break;
+ default:
          break;
- multiallocation_iterator itend;
-
- for(; it != itend; ++it){
- buffers.push_back(*it);
       }
- }
 
- for(int j = 0, max = (int)buffers.size()
- ;j < max
- ;++j){
- a.deallocate(buffers[j]);
- }
-
- return free_memory == a.get_free_memory() &&
- a.all_memory_deallocated() && a.check_sanity();
-}
-
-//This test allocates multiple values until there is no more memory
-//and after that deallocates all following a pattern
-template<class Allocator>
-bool test_many_equal_allocation_mixed_deallocation(Allocator &a)
-{
- typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
- std::vector<void*> buffers;
-
- for(int i = 0; true; ++i){
- std::size_t received_size;
- multiallocation_iterator it = a.allocate_many(i+1, i+1, (i+1)*2, received_size, std::nothrow);
- if(!it)
- break;
- multiallocation_iterator itend;
+ //Deallocate the rest of the blocks
 
- for(; it != itend; ++it){
- buffers.push_back(*it);
+ //Deallocate it in non sequential order
+ for(int j = 0, max = (int)buffers2.size()
+ ;j < max
+ ;++j){
+ int pos = (j%4)*((int)buffers2.size())/4;
+ a.deallocate(buffers2[pos]);
+ buffers2.erase(buffers2.begin()+pos);
       }
- }
 
- for(int j = 0, max = (int)buffers.size()
- ;j < max
- ;++j){
- int pos = (j%4)*((int)buffers.size())/4;
- a.deallocate(buffers[pos]);
- buffers.erase(buffers.begin()+pos);
+ bool ok = free_memory == a.get_free_memory() &&
+ a.all_memory_deallocated() && a.check_sanity();
+ if(!ok) return ok;
    }
-
- return a.all_memory_deallocated() && a.check_sanity();
+ return true;
 }
 
 //This test allocates multiple values until there is no more memory
 //and after that deallocates all in the inverse order
 template<class Allocator>
-bool test_many_different_allocation_inverse_deallocation(Allocator &a)
+bool test_many_different_allocation(Allocator &a)
 {
    typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
    const std::size_t ArraySize = 11;
@@ -624,178 +619,125 @@
       requested_sizes[i] = 4*i;
    }
 
- std::vector<void*> buffers;
- for(int i = 0; true; ++i){
- multiallocation_iterator it = a.allocate_many(requested_sizes, ArraySize, 1, std::nothrow);
- if(!it)
- break;
- multiallocation_iterator itend;
+ for( deallocation_type t = DirectDeallocation
+ ; t != EndDeallocationType
+ ; t = (deallocation_type)((int)t + 1)){
+ std::size_t free_memory = a.get_free_memory();
 
- for(; it != itend; ++it){
- buffers.push_back(*it);
- }
- }
+ std::vector<void*> buffers2;
 
- for(int j = (int)buffers.size()
- ;j--
- ;){
- a.deallocate(buffers[j]);
- }
+ //Allocate buffers with extra memory
+ for(int i = 0; true; ++i){
+ void *ptr = a.allocate(i, std::nothrow);
+ if(!ptr)
+ break;
+ buffers2.push_back(ptr);
+ }
 
- return a.all_memory_deallocated() && a.check_sanity();
-}
+ //Now deallocate the half of the blocks
+ //so expand maybe can merge new free blocks
+ for(int i = 0, max = (int)buffers2.size()
+ ;i < max
+ ;++i){
+ if(i%2){
+ a.deallocate(buffers2[i]);
+ buffers2[i] = 0;
+ }
+ }
 
-//This test allocates multiple values until there is no more memory
-//and after that deallocates all in the same order
-template<class Allocator>
-bool test_many_different_allocation_direct_deallocation(Allocator &a)
-{
- std::size_t free_memory = a.get_free_memory();
- typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
- const std::size_t ArraySize = 11;
- std::size_t requested_sizes[ArraySize];
- for(std::size_t i = 0; i < ArraySize; ++i){
- requested_sizes[i] = 4*i;
- }
+ std::vector<void*> buffers;
+ for(int i = 0; true; ++i){
+ multiallocation_iterator it = a.allocate_many(requested_sizes, ArraySize, 1, std::nothrow);
+ if(!it)
+ break;
+ multiallocation_iterator itend;
+ std::size_t n = 0;
+ for(; it != itend; ++n){
+ buffers.push_back(*it++);
+ }
+ if(n != ArraySize)
+ return false;
+ }
 
- std::vector<void*> buffers;
- for(int i = 0; true; ++i){
- multiallocation_iterator it = a.allocate_many(requested_sizes, ArraySize, 1, std::nothrow);
- if(!it)
+ switch(t){
+ case DirectDeallocation:
+ {
+ for(int j = 0, max = (int)buffers.size()
+ ;j < max
+ ;++j){
+ a.deallocate(buffers[j]);
+ }
+ }
+ break;
+ case InverseDeallocation:
+ {
+ for(int j = (int)buffers.size()
+ ;j--
+ ;){
+ a.deallocate(buffers[j]);
+ }
+ }
+ break;
+ case MixedDeallocation:
+ {
+ for(int j = 0, max = (int)buffers.size()
+ ;j < max
+ ;++j){
+ int pos = (j%4)*((int)buffers.size())/4;
+ a.deallocate(buffers[pos]);
+ buffers.erase(buffers.begin()+pos);
+ }
+ }
+ break;
+ default:
          break;
- multiallocation_iterator itend;
-
- for(; it != itend; ++it){
- buffers.push_back(*it);
       }
- }
-
- for(int j = 0, max = (int)buffers.size()
- ;j < max
- ;++j){
- a.deallocate(buffers[j]);
- }
-
- return free_memory == a.get_free_memory() &&
- a.all_memory_deallocated() && a.check_sanity();
-}
-
-//This test allocates multiple values until there is no more memory
-//and after that deallocates all following a pattern
-template<class Allocator>
-bool test_many_different_allocation_mixed_deallocation(Allocator &a)
-{
- typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
- const std::size_t ArraySize = 11;
- std::size_t requested_sizes[ArraySize];
- for(std::size_t i = 0; i < ArraySize; ++i){
- requested_sizes[i] = 4*i;
- }
 
- std::vector<void*> buffers;
- for(int i = 0; true; ++i){
- multiallocation_iterator it = a.allocate_many(requested_sizes, ArraySize, 1, std::nothrow);
- if(!it)
- break;
- multiallocation_iterator itend;
+ //Deallocate the rest of the blocks
 
- for(; it != itend; ++it){
- buffers.push_back(*it);
+ //Deallocate it in non sequential order
+ for(int j = 0, max = (int)buffers2.size()
+ ;j < max
+ ;++j){
+ int pos = (j%4)*((int)buffers2.size())/4;
+ a.deallocate(buffers2[pos]);
+ buffers2.erase(buffers2.begin()+pos);
       }
- }
 
- for(int j = 0, max = (int)buffers.size()
- ;j < max
- ;++j){
- int pos = (j%4)*((int)buffers.size())/4;
- a.deallocate(buffers[pos]);
- buffers.erase(buffers.begin()+pos);
+ bool ok = free_memory == a.get_free_memory() &&
+ a.all_memory_deallocated() && a.check_sanity();
+ if(!ok) return ok;
    }
-
- return a.all_memory_deallocated() && a.check_sanity();
+ return true;
 }
 
 //This function calls all tests
 template<class Allocator>
 bool test_all_allocation(Allocator &a)
 {
- std::cout << "Starting test_allocation_direct_deallocation. Class: "
+ std::cout << "Starting test_allocation. Class: "
              << typeid(a).name() << std::endl;
 
- if(!test_allocation_direct_deallocation(a)){
+ if(!test_allocation(a)){
       std::cout << "test_allocation_direct_deallocation failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
 
- std::cout << "Starting test_allocation_inverse_deallocation. Class: "
+ std::cout << "Starting test_many_equal_allocation. Class: "
              << typeid(a).name() << std::endl;
 
- if(!test_allocation_inverse_deallocation(a)){
- std::cout << "test_allocation_inverse_deallocation failed. Class: "
+ if(!test_many_equal_allocation(a)){
+ std::cout << "test_many_equal_allocation failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
 
- std::cout << "Starting test_allocation_mixed_deallocation. Class: "
+ std::cout << "Starting test_many_different_allocation. Class: "
              << typeid(a).name() << std::endl;
 
- if(!test_allocation_mixed_deallocation(a)){
- std::cout << "test_allocation_mixed_deallocation failed. Class: "
- << typeid(a).name() << std::endl;
- return false;
- }
-
- std::cout << "Starting test_many_equal_allocation_direct_deallocation. Class: "
- << typeid(a).name() << std::endl;
-
- if(!test_many_equal_allocation_direct_deallocation(a)){
- std::cout << "test_many_equal_allocation_direct_deallocation failed. Class: "
- << typeid(a).name() << std::endl;
- return false;
- }
-
- std::cout << "Starting test_many_equal_allocation_inverse_deallocation. Class: "
- << typeid(a).name() << std::endl;
-
- if(!test_many_equal_allocation_inverse_deallocation(a)){
- std::cout << "test_many_equal_allocation_inverse_deallocation failed. Class: "
- << typeid(a).name() << std::endl;
- return false;
- }
-
- std::cout << "Starting test_many_equal_allocation_mixed_deallocation. Class: "
- << typeid(a).name() << std::endl;
-
- if(!test_many_equal_allocation_mixed_deallocation(a)){
- std::cout << "test_many_equal_allocation_mixed_deallocation failed. Class: "
- << typeid(a).name() << std::endl;
- return false;
- }
-
- std::cout << "Starting test_many_different_allocation_direct_deallocation. Class: "
- << typeid(a).name() << std::endl;
-
- if(!test_many_different_allocation_direct_deallocation(a)){
- std::cout << "test_many_different_allocation_direct_deallocation failed. Class: "
- << typeid(a).name() << std::endl;
- return false;
- }
-
- std::cout << "Starting test_many_different_allocation_inverse_deallocation. Class: "
- << typeid(a).name() << std::endl;
-
- if(!test_many_different_allocation_inverse_deallocation(a)){
- std::cout << "test_many_different_allocation_inverse_deallocation failed. Class: "
- << typeid(a).name() << std::endl;
- return false;
- }
-
- std::cout << "Starting test_many_different_allocation_mixed_deallocation. Class: "
- << typeid(a).name() << std::endl;
-
- if(!test_many_different_allocation_mixed_deallocation(a)){
- std::cout << "test_many_different_allocation_mixed_deallocation failed. Class: "
+ if(!test_many_different_allocation(a)){
+ std::cout << "test_many_different_allocation failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
@@ -824,30 +766,45 @@
       return false;
    }
 
+ std::cout << "Starting test_allocation_deallocation_expand. Class: "
+ << typeid(a).name() << std::endl;
+
    if(!test_allocation_deallocation_expand(a)){
       std::cout << "test_allocation_deallocation_expand failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
 
+ std::cout << "Starting test_allocation_with_reuse. Class: "
+ << typeid(a).name() << std::endl;
+
    if(!test_allocation_with_reuse(a)){
       std::cout << "test_allocation_with_reuse failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
 
+ std::cout << "Starting test_aligned_allocation. Class: "
+ << typeid(a).name() << std::endl;
+
    if(!test_aligned_allocation(a)){
       std::cout << "test_aligned_allocation failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
 
+ std::cout << "Starting test_continuous_aligned_allocation. Class: "
+ << typeid(a).name() << std::endl;
+
    if(!test_continuous_aligned_allocation(a)){
       std::cout << "test_continuous_aligned_allocation failed. Class: "
                 << typeid(a).name() << std::endl;
       return false;
    }
 
+ std::cout << "Starting test_clear_free_memory. Class: "
+ << typeid(a).name() << std::endl;
+
    if(!test_clear_free_memory(a)){
       std::cout << "test_clear_free_memory failed. Class: "
                 << typeid(a).name() << std::endl;

Modified: trunk/libs/interprocess/test/node_pool_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/node_pool_test.cpp (original)
+++ trunk/libs/interprocess/test/node_pool_test.cpp 2007-09-26 13:46:34 EDT (Wed, 26 Sep 2007)
@@ -7,7 +7,6 @@
 // See http://www.boost.org/libs/interprocess for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-/*
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/managed_shared_memory.hpp>
 #include <boost/interprocess/allocators/detail/node_pool.hpp>
@@ -165,13 +164,3 @@
 }
 
 #include <boost/interprocess/detail/config_end.hpp>
-*/
-
-#include<stdlib.h>
-
-int main()
-{
- void *addr = malloc(100);
- free(addr);
- return 0;
-}
\ No newline at end of file

Modified: trunk/libs/interprocess/test/shared_ptr_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/shared_ptr_test.cpp (original)
+++ trunk/libs/interprocess/test/shared_ptr_test.cpp 2007-09-26 13:46:34 EDT (Wed, 26 Sep 2007)
@@ -19,7 +19,6 @@
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/containers/string.hpp>
 #include <boost/interprocess/containers/vector.hpp>
-#include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
 #include <boost/interprocess/smart_ptr/scoped_ptr.hpp>
 #include <boost/detail/lightweight_test.hpp>

Modified: trunk/libs/interprocess/test/unique_ptr_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/unique_ptr_test.cpp (original)
+++ trunk/libs/interprocess/test/unique_ptr_test.cpp 2007-09-26 13:46:34 EDT (Wed, 26 Sep 2007)
@@ -31,8 +31,7 @@
    {}
 };
 
-typedef deleter<MyClass, managed_shared_memory::segment_manager> my_deleter_type;
-typedef unique_ptr<MyClass, my_deleter_type> my_unique_ptr_class;
+typedef managed_unique_ptr<MyClass, managed_shared_memory>::type my_unique_ptr_class;
 typedef set <my_unique_ptr_class
             ,std::less<my_unique_ptr_class>
             ,allocator <my_unique_ptr_class
@@ -58,19 +57,19 @@
    shared_memory_object::remove(process_name.c_str());
    {
       managed_shared_memory segment(create_only, process_name.c_str(), 10000);
- my_deleter_type my_deleter(segment.get_segment_manager());
+
       //Create unique_ptr using dynamic allocation
       my_unique_ptr_class my_ptr (segment.construct<MyClass>(anonymous_instance)()
- ,my_deleter);
+ ,segment.get_deleter<MyClass>());
       my_unique_ptr_class my_ptr2(segment.construct<MyClass>(anonymous_instance)()
- ,my_deleter);
+ ,segment.get_deleter<MyClass>());
 
       //Backup relative pointers to future tests
       offset_ptr<MyClass> ptr1 = my_ptr.get();
       offset_ptr<MyClass> ptr2 = my_ptr2.get();
 
       //Test some copy constructors
- my_unique_ptr_class my_ptr3(0, my_deleter);
+ my_unique_ptr_class my_ptr3(0, segment.get_deleter<MyClass>());
       my_unique_ptr_class my_ptr4(move(my_ptr3));
 
       //Construct a list and fill
@@ -141,7 +140,7 @@
       assert(vector.begin()->get() == ptr1);
       assert(vector.rbegin()->get() == ptr2);
 
- my_unique_ptr_class a(0, my_deleter), b(0, my_deleter);
+ my_unique_ptr_class a(0, segment.get_deleter<MyClass>()), b(0, segment.get_deleter<MyClass>());
       a = move(b);
    }
    shared_memory_object::remove(process_name.c_str());


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