From b5eb07ba3ee856ecc2080fef39f63c7073668cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Thu, 17 Mar 2011 16:42:30 +0000 Subject: [PATCH] Changes to allow interoperability between 64 and 32 processes. Pointer type is a customization of all templated code size_type's and difference_type's. [SVN r70069] --- doc/Jamfile.v2 | 8 +- doc/interprocess.qbk | 22 ++- example/comp_doc_message_queueB.cpp | 2 +- example/doc_ipc_message.cpp | 2 +- example/doc_managed_allocation_command.cpp | 13 +- example/doc_managed_copy_on_write.cpp | 2 +- example/doc_managed_heap_memory.cpp | 4 +- example/doc_managed_mapped_file.cpp | 4 +- example/doc_managed_multiple_allocation.cpp | 2 +- example/doc_named_alloc.cpp | 2 +- proj/to-do.txt | 2 +- proj/vc7ide/interprocesslib.vcproj | 201 ++++++++++++++++++++ test/allocator_v1.hpp | 4 +- test/deque_test.cpp | 10 +- test/emplace_test.hpp | 12 +- test/flat_tree_test.cpp | 1 + test/heap_allocator_v1.hpp | 4 +- test/list_test.hpp | 8 +- test/managed_mapped_file_test.cpp | 4 +- test/managed_shared_memory_test.cpp | 4 +- test/map_test.hpp | 28 +-- test/memory_algorithm_test.cpp | 4 +- test/memory_algorithm_test_template.hpp | 56 +++--- test/message_queue_test.cpp | 19 +- test/movable_int.hpp | 14 +- test/named_allocation_test_template.hpp | 2 +- test/named_construct_test.cpp | 6 +- test/node_pool_test.hpp | 4 +- test/set_test.hpp | 36 ++-- test/string_test.cpp | 2 +- test/user_buffer_test.cpp | 9 +- test/vector_test.hpp | 12 +- 32 files changed, 359 insertions(+), 144 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 09a99b0..03b90ce 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -30,10 +30,10 @@ doxygen autodoc MACRO_EXPANSION=YES "PREDEFINED=\"BOOST_INTERPROCESS_DOXYGEN_INVOKED\" \\ \"BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(a)= \" \\ - \"BOOST_INTERPROCESS_RV_REF(a)=a &&\" \\ - \"BOOST_INTERPROCESS_RV_REF_2_TEMPL_ARGS(a,b,c)=a &&\" \\ - \"BOOST_INTERPROCESS_RV_REF_3_TEMPL_ARGS(a,b,c,d)=a &&\" \\ - \"BOOST_INTERPROCESS_FWD_REF(a)=a &&\"" + \"BOOST_RV_REF(a)=a &&\" \\ + \"BOOST_RV_REF_2_TEMPL_ARGS(a,b,c)=a &&\" \\ + \"BOOST_RV_REF_3_TEMPL_ARGS(a,b,c,d)=a &&\" \\ + \"BOOST_FWD_REF(a)=a &&\"" "boost.doxygen.reftitle=Boost.Interprocess Reference" ; diff --git a/doc/interprocess.qbk b/doc/interprocess.qbk index d54ae05..2a16da6 100644 --- a/doc/interprocess.qbk +++ b/doc/interprocess.qbk @@ -691,9 +691,6 @@ This is the server process: [import ../example/doc_xsi_shared_memory.cpp] [doc_xsi_shared_memory] -As we can see, native windows shared memory needs synchronization to make sure -that the shared memory won't be destroyed before the client is launched. - [endsect] [endsect] @@ -3153,8 +3150,8 @@ To use a managed shared memory, you must include the following header: [c++] //1. If the segment was previously created - // equivalent to "open_only". - //2. Otherwise, equivalent to "open_only" (size is ignored) + // equivalent to "open_only" (size is ignored). + //2. Otherwise, equivalent to "create_only" //!! If anything fails, throws interprocess_exception // managed_shared_memory segment ( open_or_create @@ -3200,7 +3197,7 @@ destroyed. So there is no persistence support for windows shared memory. To communicate between system services and user applications using `managed_windows_shared_memory`, please read the explanations given in chapter -[interprocess.sharedmemorybetweenprocesses.sharedmemory.windows_shared_memory Native windows shared memory] +[link interprocess.sharedmemorybetweenprocesses.sharedmemory.windows_shared_memory Native windows shared memory]. [endsect] @@ -3222,8 +3219,8 @@ but uses XSI shared memory as backend. [endsect] -For more information about managed shared memory capabilities, see -[classref boost::interprocess::basic_managed_shared_memory basic_managed_shared_memory] class reference. +For more information about managed XSI shared memory capabilities, see +[classref boost::interprocess::basic_managed_xsi_shared_memory basic_managed_xsi_shared_memory] class reference. [endsect] @@ -6604,6 +6601,15 @@ thank them: [section:release_notes Release Notes] +[section:release_notes_boost_1_46_00 Boost 1.46 Release] + +* Fixed bugs + [@https://svn.boost.org/trac/boost/ticket/4979 #4979], + [@https://svn.boost.org/trac/boost/ticket/4907 #4907], + [@https://svn.boost.org/trac/boost/ticket/4895 #4895] + +[endsect] + [section:release_notes_boost_1_45_00 Boost 1.45 Release] * Fixed bugs diff --git a/example/comp_doc_message_queueB.cpp b/example/comp_doc_message_queueB.cpp index f5bd839..0e08498 100644 --- a/example/comp_doc_message_queueB.cpp +++ b/example/comp_doc_message_queueB.cpp @@ -25,7 +25,7 @@ int main () ); unsigned int priority; - std::size_t recvd_size; + message_queue::size_type recvd_size; //Receive 100 numbers for(int i = 0; i < 100; ++i){ diff --git a/example/doc_ipc_message.cpp b/example/doc_ipc_message.cpp index 4097bd6..f18bd67 100644 --- a/example/doc_ipc_message.cpp +++ b/example/doc_ipc_message.cpp @@ -49,7 +49,7 @@ int main (int argc, char *argv[]) //-> //Allocate a portion of the segment (raw memory) - std::size_t free_memory = segment.get_free_memory(); + managed_shared_memory::size_type free_memory = segment.get_free_memory(); void * shptr = segment.allocate(1024/*bytes to allocate*/); //Check invariant diff --git a/example/doc_managed_allocation_command.cpp b/example/doc_managed_allocation_command.cpp index c464daa..ad114d7 100644 --- a/example/doc_managed_allocation_command.cpp +++ b/example/doc_managed_allocation_command.cpp @@ -48,7 +48,8 @@ int main() //-> //Allocate at least 100 bytes, 1000 bytes if possible - std::size_t received_size, min_size = 100, preferred_size = 1000; + managed_shared_memory::size_type min_size = 100, preferred_size = 1000; + managed_shared_memory::size_type received_size; std::size_t *ptr = managed_shm.allocation_command (boost::interprocess::allocate_new, min_size, preferred_size, received_size).first; @@ -56,7 +57,7 @@ int main() assert(received_size >= min_size); //Get free memory - std::size_t free_memory_after_allocation = managed_shm.get_free_memory(); + managed_shared_memory::size_type free_memory_after_allocation = managed_shm.get_free_memory(); //Now write the data for(std::size_t i = 0; i < received_size; ++i) ptr[i] = i; @@ -65,7 +66,7 @@ int main() //lower to the double of the original buffer. //This "should" be successful since no other class is allocating //memory from the segment - std::size_t expanded_size; + managed_shared_memory::size_type expanded_size; std::pair ret = managed_shm.allocation_command (boost::interprocess::expand_fwd, received_size*2, received_size*3, expanded_size, ptr); @@ -75,7 +76,7 @@ int main() assert(expanded_size >= received_size*2); //Get free memory and compare - std::size_t free_memory_after_expansion = managed_shm.get_free_memory(); + managed_shared_memory::size_type free_memory_after_expansion = managed_shm.get_free_memory(); assert(free_memory_after_expansion < free_memory_after_allocation); //Write new values @@ -85,7 +86,7 @@ int main() //should be smaller than min_size*2. //This "should" be successful since no other class is allocating //memory from the segment - std::size_t shrunk_size; + managed_shared_memory::size_type shrunk_size; ret = managed_shm.allocation_command (boost::interprocess::shrink_in_place, min_size*2, min_size, shrunk_size, ptr); @@ -96,7 +97,7 @@ int main() assert(shrunk_size >= min_size); //Get free memory and compare - std::size_t free_memory_after_shrinking = managed_shm.get_free_memory(); + managed_shared_memory::size_type free_memory_after_shrinking = managed_shm.get_free_memory(); assert(free_memory_after_shrinking > free_memory_after_expansion); //Deallocate the buffer diff --git a/example/doc_managed_copy_on_write.cpp b/example/doc_managed_copy_on_write.cpp index 15aba88..5bd0033 100644 --- a/example/doc_managed_copy_on_write.cpp +++ b/example/doc_managed_copy_on_write.cpp @@ -70,7 +70,7 @@ int main() std::fstream file(ManagedFile2, std::ios_base::out | std::ios_base::binary); if(!file) throw int(0); - file.write(static_cast(managed_file_cow.get_address()), managed_file_cow.get_size()); + file.write(static_cast(managed_file_cow.get_address()), (std::streamsize)managed_file_cow.get_size()); } //Now open the modified file and test changes diff --git a/example/doc_managed_heap_memory.cpp b/example/doc_managed_heap_memory.cpp index 0687dcf..6b89de9 100644 --- a/example/doc_managed_heap_memory.cpp +++ b/example/doc_managed_heap_memory.cpp @@ -40,7 +40,7 @@ int main () //memory is full } //Let's obtain the size of the list - std::size_t old_size = mylist->size(); + MyList::size_type old_size = mylist->size(); //To make the list bigger, let's increase the heap buffer //in 1000 bytes more. @@ -62,7 +62,7 @@ int main () } //Let's obtain the new size of the list - std::size_t new_size = mylist->size(); + MyList::size_type new_size = mylist->size(); assert(new_size > old_size); diff --git a/example/doc_managed_mapped_file.cpp b/example/doc_managed_mapped_file.cpp index a43a56b..1133ff3 100644 --- a/example/doc_managed_mapped_file.cpp +++ b/example/doc_managed_mapped_file.cpp @@ -43,7 +43,7 @@ int main () file_mapping::remove(FileName); try{ - std::size_t old_size = 0; + MyList::size_type old_size = 0; managed_mapped_file::handle_t list_handle; { managed_mapped_file mfile_memory(create_only, FileName, FileSize); @@ -89,7 +89,7 @@ int main () } //Let's obtain the new size of the list - std::size_t new_size = mylist->size(); + MyList::size_type new_size = mylist->size(); assert(new_size > old_size); diff --git a/example/doc_managed_multiple_allocation.cpp b/example/doc_managed_multiple_allocation.cpp index a6ccab2..24c4ee2 100644 --- a/example/doc_managed_multiple_allocation.cpp +++ b/example/doc_managed_multiple_allocation.cpp @@ -76,7 +76,7 @@ int main() } //Allocate 10 buffers of different sizes in a single call. Throwing version - std::size_t sizes[10]; + managed_shared_memory::size_type sizes[10]; for(std::size_t i = 0; i < 10; ++i) sizes[i] = i*3; diff --git a/example/doc_named_alloc.cpp b/example/doc_named_alloc.cpp index 085eae8..aa774db 100644 --- a/example/doc_named_alloc.cpp +++ b/example/doc_named_alloc.cpp @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) #endif //-> - std::pair res; + std::pair res; //Find the array res = segment.find ("MyType array"); diff --git a/proj/to-do.txt b/proj/to-do.txt index 379042f..52d191f 100644 --- a/proj/to-do.txt +++ b/proj/to-do.txt @@ -97,7 +97,7 @@ All Fine -> operator >> and similar need moved_value --> rvalue reference enabled compilers are not optimized with is_movable and move_iterator +-> rvalue reference enabled compilers are not optimized with has_move_emulation_enabled and move_iterator -> Add allocator test template that test all new functions (allocate_many, etc.) diff --git a/proj/vc7ide/interprocesslib.vcproj b/proj/vc7ide/interprocesslib.vcproj index e8170ad..3ee1183 100644 --- a/proj/vc7ide/interprocesslib.vcproj +++ b/proj/vc7ide/interprocesslib.vcproj @@ -98,6 +98,9 @@ + + @@ -116,6 +119,9 @@ + + @@ -131,6 +137,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ::type reference; typedef typename detail::add_reference ::type const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename segment_manager::size_type size_type; + typedef typename segment_manager::difference_type difference_type; //!Obtains an allocator_v1 of other type template diff --git a/test/deque_test.cpp b/test/deque_test.cpp index cd9666c..a1fa632 100644 --- a/test/deque_test.cpp +++ b/test/deque_test.cpp @@ -227,8 +227,8 @@ bool do_test() } shmdeque->insert(shmdeque->end() - ,::boost::interprocess::make_move_iterator(&aux_vect[0]) - ,::boost::interprocess::make_move_iterator(aux_vect + 50)); + ,::boost::make_move_iterator(&aux_vect[0]) + ,::boost::make_move_iterator(aux_vect + 50)); stddeque->insert(stddeque->end(), aux_vect2, aux_vect2 + 50); if(!test::CheckEqualContainers(shmdeque, stddeque)) return false; @@ -249,14 +249,14 @@ bool do_test() aux_vect2[i] = -1; } shmdeque->insert(shmdeque->begin() - ,::boost::interprocess::make_move_iterator(&aux_vect[0]) - ,::boost::interprocess::make_move_iterator(aux_vect + 50)); + ,::boost::make_move_iterator(&aux_vect[0]) + ,::boost::make_move_iterator(aux_vect + 50)); stddeque->insert(stddeque->begin(), aux_vect2, aux_vect2 + 50); if(!test::CheckEqualContainers(shmdeque, stddeque)) return false; } if(!copyable_only(shmdeque, stddeque - ,detail::bool_::value>())){ + ,detail::bool_::value>())){ return false; } diff --git a/test/emplace_test.hpp b/test/emplace_test.hpp index d7ade2c..dd0927c 100644 --- a/test/emplace_test.hpp +++ b/test/emplace_test.hpp @@ -25,19 +25,21 @@ namespace test{ class EmplaceInt { private: - BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(EmplaceInt) + BOOST_MOVABLE_BUT_NOT_COPYABLE(EmplaceInt) public: - - EmplaceInt(int a = 0, int b = 0, int c = 0, int d = 0, int e = 0) + EmplaceInt() + : a_(0), b_(0), c_(0), d_(0), e_(0) + {} + EmplaceInt(int a, int b = 0, int c = 0, int d = 0, int e = 0) : a_(a), b_(b), c_(c), d_(d), e_(e) {} - EmplaceInt(BOOST_INTERPROCESS_RV_REF(EmplaceInt) o) + EmplaceInt(BOOST_RV_REF(EmplaceInt) o) : a_(o.a_), b_(o.b_), c_(o.c_), d_(o.d_), e_(o.e_) {} - EmplaceInt& operator=(BOOST_INTERPROCESS_RV_REF(EmplaceInt) o) + EmplaceInt& operator=(BOOST_RV_REF(EmplaceInt) o) { this->a_ = o.a_; this->b_ = o.b_; diff --git a/test/flat_tree_test.cpp b/test/flat_tree_test.cpp index adfa6a0..2d80ba2 100644 --- a/test/flat_tree_test.cpp +++ b/test/flat_tree_test.cpp @@ -123,6 +123,7 @@ typedef flat_multimap ,shmem_move_copy_pair_allocator_t> MyMoveCopyShmMultiMap; + //Test recursive structures class recursive_flat_set { diff --git a/test/heap_allocator_v1.hpp b/test/heap_allocator_v1.hpp index 168da5e..e75361b 100644 --- a/test/heap_allocator_v1.hpp +++ b/test/heap_allocator_v1.hpp @@ -74,8 +74,8 @@ class heap_allocator_v1 ::type reference; typedef typename detail::add_reference ::type const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; + typedef typename SegmentManager::size_type size_type; + typedef typename SegmentManager::difference_type difference_type; //!Obtains an heap_allocator_v1 of other type template diff --git a/test/list_test.hpp b/test/list_test.hpp index 8f1b936..7d1625a 100644 --- a/test/list_test.hpp +++ b/test/list_test.hpp @@ -145,8 +145,8 @@ int list_test (bool copied_allocators_equal = true) for(int i = 0; i < 50; ++i){ aux_vect2[i] = -1; } - shmlist->assign(::boost::interprocess::make_move_iterator(&aux_vect[0]) - ,::boost::interprocess::make_move_iterator(&aux_vect[50])); + shmlist->assign(::boost::make_move_iterator(&aux_vect[0]) + ,::boost::make_move_iterator(&aux_vect[50])); stdlist->assign(&aux_vect2[0], &aux_vect2[50]); if(!CheckEqualContainers(shmlist, stdlist)) return 1; } @@ -176,8 +176,8 @@ int list_test (bool copied_allocators_equal = true) aux_vect2[i] = -1; } shmlist->insert(shmlist->begin() - ,::boost::interprocess::make_move_iterator(&aux_vect[0]) - ,::boost::interprocess::make_move_iterator(&aux_vect[50])); + ,::boost::make_move_iterator(&aux_vect[0]) + ,::boost::make_move_iterator(&aux_vect[50])); stdlist->insert(stdlist->begin(), &aux_vect2[0], &aux_vect2[50]); } diff --git a/test/managed_mapped_file_test.cpp b/test/managed_mapped_file_test.cpp index 6c79bb9..1d64341 100644 --- a/test/managed_mapped_file_test.cpp +++ b/test/managed_mapped_file_test.cpp @@ -136,7 +136,7 @@ int main () return -1; } { - std::size_t old_free_memory; + managed_mapped_file::size_type old_free_memory; { //Map preexisting file again in memory managed_mapped_file mfile(open_only, FileName); @@ -160,7 +160,7 @@ int main () return -1; } { - std::size_t old_free_memory, next_free_memory, + managed_mapped_file::size_type old_free_memory, next_free_memory, old_file_size, next_file_size, final_file_size; { //Map preexisting file again in memory diff --git a/test/managed_shared_memory_test.cpp b/test/managed_shared_memory_test.cpp index 564bdc7..25e0bde 100644 --- a/test/managed_shared_memory_test.cpp +++ b/test/managed_shared_memory_test.cpp @@ -124,7 +124,7 @@ int main () } #ifndef BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS_NO_GROW { - std::size_t old_free_memory; + managed_shared_memory::size_type old_free_memory; { //Map preexisting shmem again in memory managed_shared_memory shmem(open_only, ShmemName); @@ -148,7 +148,7 @@ int main () return -1; } { - std::size_t old_free_memory, next_free_memory, + managed_shared_memory::size_type old_free_memory, next_free_memory, old_shmem_size, next_shmem_size, final_shmem_size; { //Map preexisting shmem again in memory diff --git a/test/map_test.hpp b/test/map_test.hpp index 9d5b92c..ffb4ecb 100644 --- a/test/map_test.hpp +++ b/test/map_test.hpp @@ -94,16 +94,16 @@ int map_test () MyShmMap *shmmap2 = segment.template construct("MyShmMap2") - ( ::boost::interprocess::make_move_iterator(&aux_vect[0]) - , ::boost::interprocess::make_move_iterator(aux_vect + 50) + ( ::boost::make_move_iterator(&aux_vect[0]) + , ::boost::make_move_iterator(aux_vect + 50) , std::less(), segment.get_segment_manager()); MyStdMap *stdmap2 = new MyStdMap(aux_vect2, aux_vect2 + 50); MyShmMultiMap *shmmultimap2 = segment.template construct("MyShmMultiMap2") - ( ::boost::interprocess::make_move_iterator(&aux_vect3[0]) - , ::boost::interprocess::make_move_iterator(aux_vect3 + 50) + ( ::boost::make_move_iterator(&aux_vect3[0]) + , ::boost::make_move_iterator(aux_vect3 + 50) , std::less(), segment.get_segment_manager()); MyStdMultiMap *stdmultimap2 = new MyStdMultiMap(aux_vect2, aux_vect2 + 50); @@ -131,8 +131,8 @@ int map_test () MyShmMap *shmmap3 = segment.template construct("MyShmMap3") ( ordered_unique_range - , ::boost::interprocess::make_move_iterator(&aux_vect[0]) - , ::boost::interprocess::make_move_iterator(aux_vect + 50) + , ::boost::make_move_iterator(&aux_vect[0]) + , ::boost::make_move_iterator(aux_vect + 50) , std::less(), segment.get_segment_manager()); MyStdMap *stdmap3 = new MyStdMap(aux_vect2, aux_vect2 + 50); @@ -140,8 +140,8 @@ int map_test () MyShmMultiMap *shmmultimap3 = segment.template construct("MyShmMultiMap3") ( ordered_range - , ::boost::interprocess::make_move_iterator(&aux_vect3[0]) - , ::boost::interprocess::make_move_iterator(aux_vect3 + 50) + , ::boost::make_move_iterator(&aux_vect3[0]) + , ::boost::make_move_iterator(aux_vect3 + 50) , std::less(), segment.get_segment_manager()); MyStdMultiMap *stdmultimap3 = new MyStdMultiMap(aux_vect2, aux_vect2 + 50); @@ -240,8 +240,8 @@ int map_test () new(&aux_vect3[i])IntPairType(boost::interprocess::move(i1), boost::interprocess::move(i2)); } - shmmap->insert(::boost::interprocess::make_move_iterator(&aux_vect[0]), ::boost::interprocess::make_move_iterator(aux_vect + 50)); - shmmultimap->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ::boost::interprocess::make_move_iterator(aux_vect3 + 50)); + shmmap->insert(::boost::make_move_iterator(&aux_vect[0]), ::boost::make_move_iterator(aux_vect + 50)); + shmmultimap->insert(::boost::make_move_iterator(&aux_vect3[0]), ::boost::make_move_iterator(aux_vect3 + 50)); for(std::size_t i = 0; i != 50; ++i){ StdPairType stdpairtype(-1, -1); stdmap->insert(stdpairtype); @@ -288,10 +288,10 @@ int map_test () new(&aux_vect5[i])IntPairType(boost::interprocess::move(i1), boost::interprocess::move(i2)); } - shmmap->insert(::boost::interprocess::make_move_iterator(&aux_vect[0]), ::boost::interprocess::make_move_iterator(aux_vect + 50)); - shmmap->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ::boost::interprocess::make_move_iterator(aux_vect3 + 50)); - shmmultimap->insert(::boost::interprocess::make_move_iterator(&aux_vect4[0]), ::boost::interprocess::make_move_iterator(aux_vect4 + 50)); - shmmultimap->insert(::boost::interprocess::make_move_iterator(&aux_vect5[0]), ::boost::interprocess::make_move_iterator(aux_vect5 + 50)); + shmmap->insert(::boost::make_move_iterator(&aux_vect[0]), ::boost::make_move_iterator(aux_vect + 50)); + shmmap->insert(::boost::make_move_iterator(&aux_vect3[0]), ::boost::make_move_iterator(aux_vect3 + 50)); + shmmultimap->insert(::boost::make_move_iterator(&aux_vect4[0]), ::boost::make_move_iterator(aux_vect4 + 50)); + shmmultimap->insert(::boost::make_move_iterator(&aux_vect5[0]), ::boost::make_move_iterator(aux_vect5 + 50)); for(std::size_t i = 0; i != 50; ++i){ StdPairType stdpairtype(-1, -1); diff --git a/test/memory_algorithm_test.cpp b/test/memory_algorithm_test.cpp index 5e877b5..05db1e4 100644 --- a/test/memory_algorithm_test.cpp +++ b/test/memory_algorithm_test.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include "memory_algorithm_test_template.hpp" #include #include @@ -68,7 +69,8 @@ int test_rbtree_best_fit() int main () { - const std::size_t void_ptr_align = detail::alignment_of::value; + const std::size_t void_ptr_align = ::boost::alignment_of >::value; + if(test_simple_seq_fit()){ return 1; } diff --git a/test/memory_algorithm_test_template.hpp b/test/memory_algorithm_test_template.hpp index 0e76468..2af20e6 100644 --- a/test/memory_algorithm_test_template.hpp +++ b/test/memory_algorithm_test_template.hpp @@ -32,13 +32,13 @@ bool test_allocation(Allocator &a) ; t != EndDeallocationType ; t = (deallocation_type)((int)t + 1)){ std::vector buffers; - std::size_t free_memory = a.get_free_memory(); + typename Allocator::size_type free_memory = a.get_free_memory(); for(int i = 0; true; ++i){ void *ptr = a.allocate(i, std::nothrow); if(!ptr) break; - std::size_t size = a.size(ptr); + std::size_t size = a.size(ptr); std::memset(ptr, 0, size); buffers.push_back(ptr); } @@ -96,7 +96,7 @@ bool test_allocation_shrink(Allocator &a) void *ptr = a.allocate(i*2, std::nothrow); if(!ptr) break; - std::size_t size = a.size(ptr); + std::size_t size = a.size(ptr); std::memset(ptr, 0, size); buffers.push_back(ptr); } @@ -105,7 +105,7 @@ bool test_allocation_shrink(Allocator &a) for(int i = 0, max = (int)buffers.size() ;i < max ; ++i){ - std::size_t received_size; + typename Allocator::size_type received_size; if(a.template allocation_command ( boost::interprocess::shrink_in_place | boost::interprocess::nothrow_allocation, i*2 , i, received_size, static_cast(buffers[i])).first){ @@ -115,7 +115,7 @@ bool test_allocation_shrink(Allocator &a) if(received_size < std::size_t(i)){ return false; } - std::memset(buffers[i], 0, a.size(buffers[i])); + std::memset(buffers[i], 0, a.size(buffers[i])); } } @@ -144,7 +144,7 @@ bool test_allocation_expand(Allocator &a) void *ptr = a.allocate(i, std::nothrow); if(!ptr) break; - std::size_t size = a.size(ptr); + std::size_t size = a.size(ptr); std::memset(ptr, 0, size); buffers.push_back(ptr); } @@ -153,7 +153,7 @@ bool test_allocation_expand(Allocator &a) for(int i = 0, max = (int)buffers.size() ;i < max ;++i){ - std::size_t received_size; + typename Allocator::size_type received_size; std::size_t min_size = i+1; std::size_t preferred_size = i*2; preferred_size = min_size > preferred_size ? min_size : preferred_size; @@ -166,7 +166,7 @@ bool test_allocation_expand(Allocator &a) return false; } //Now, try to expand further - min_size = received_size+1; + min_size = received_size+1; preferred_size = min_size*2; } } @@ -190,12 +190,12 @@ template bool test_allocation_shrink_and_expand(Allocator &a) { std::vector buffers; - std::vector received_sizes; + std::vector received_sizes; std::vector size_reduced; //Allocate buffers wand store received sizes for(int i = 0; true; ++i){ - std::size_t received_size; + typename Allocator::size_type received_size; void *ptr = a.template allocation_command ( boost::interprocess::allocate_new | boost::interprocess::nothrow_allocation, i, i*2, received_size).first; if(!ptr){ @@ -212,7 +212,7 @@ bool test_allocation_shrink_and_expand(Allocator &a) for(int i = 0, max = (int)buffers.size() ; i < max ; ++i){ - std::size_t received_size; + typename Allocator::size_type received_size; if(a.template allocation_command ( boost::interprocess::shrink_in_place | boost::interprocess::nothrow_allocation, received_sizes[i] , i, received_size, static_cast(buffers[i])).first){ @@ -230,7 +230,7 @@ bool test_allocation_shrink_and_expand(Allocator &a) for(int i = 0, max = (int)buffers.size() ;i < max ;++i){ - std::size_t received_size; + typename Allocator::size_type received_size; std::size_t request_size = received_sizes[i]; if(a.template allocation_command ( boost::interprocess::expand_fwd | boost::interprocess::nothrow_allocation, request_size @@ -292,7 +292,7 @@ bool test_allocation_deallocation_expand(Allocator &a) ;++i){ // if(buffers[i]){ - std::size_t received_size; + typename Allocator::size_type received_size; std::size_t min_size = i+1; std::size_t preferred_size = i*2; preferred_size = min_size > preferred_size ? min_size : preferred_size; @@ -363,7 +363,7 @@ bool test_allocation_with_reuse(Allocator &a) buffers.clear(); //Now allocate with reuse - std::size_t received_size = 0; + typename Allocator::size_type received_size = 0; for(int i = 0; true; ++i){ std::size_t min_size = (received_size + 1); std::size_t prf_size = (received_size + (i+1)*2); @@ -540,16 +540,16 @@ bool test_grow_shrink_to_fit(Allocator &a) { std::vector buffers; - std::size_t original_size = a.get_size(); - std::size_t original_free = a.get_free_memory(); + typename Allocator::size_type original_size = a.get_size(); + typename Allocator::size_type original_free = a.get_free_memory(); a.shrink_to_fit(); if(!a.all_memory_deallocated() && a.check_sanity()) return false; - std::size_t shrunk_size = a.get_size(); - std::size_t shrunk_free_memory = a.get_free_memory(); + typename Allocator::size_type shrunk_size = a.get_size(); + typename Allocator::size_type shrunk_free_memory = a.get_free_memory(); if(shrunk_size != a.get_min_size()) return 1; @@ -595,7 +595,7 @@ bool test_grow_shrink_to_fit(Allocator &a) --pos; a.deallocate(buffers[pos]); buffers.erase(buffers.begin()+pos); - std::size_t old_free = a.get_free_memory(); + typename Allocator::size_type old_free = a.get_free_memory(); a.shrink_to_fit(); if(!a.check_sanity()) return false; if(original_size < a.get_size()) return false; @@ -640,7 +640,7 @@ bool test_many_equal_allocation(Allocator &a) for( deallocation_type t = DirectDeallocation ; t != EndDeallocationType ; t = (deallocation_type)((int)t + 1)){ - std::size_t free_memory = a.get_free_memory(); + typename Allocator::size_type free_memory = a.get_free_memory(); std::vector buffers2; @@ -649,7 +649,7 @@ bool test_many_equal_allocation(Allocator &a) void *ptr = a.allocate(i, std::nothrow); if(!ptr) break; - std::size_t size = a.size(ptr); + std::size_t size = a.size(ptr); std::memset(ptr, 0, size); if(!a.check_sanity()) return false; @@ -677,7 +677,7 @@ bool test_many_equal_allocation(Allocator &a) if(chain.empty()) break; - std::size_t n = chain.size(); + typename multiallocation_chain::size_type n = chain.size(); while(!chain.empty()){ buffers.push_back(detail::get_pointer(chain.front())); chain.pop_front(); @@ -748,7 +748,7 @@ bool test_many_different_allocation(Allocator &a) { typedef typename Allocator::multiallocation_chain multiallocation_chain; const std::size_t ArraySize = 11; - std::size_t requested_sizes[ArraySize]; + typename Allocator::size_type requested_sizes[ArraySize]; for(std::size_t i = 0; i < ArraySize; ++i){ requested_sizes[i] = 4*i; } @@ -756,7 +756,7 @@ bool test_many_different_allocation(Allocator &a) for( deallocation_type t = DirectDeallocation ; t != EndDeallocationType ; t = (deallocation_type)((int)t + 1)){ - std::size_t free_memory = a.get_free_memory(); + typename Allocator::size_type free_memory = a.get_free_memory(); std::vector buffers2; @@ -765,7 +765,7 @@ bool test_many_different_allocation(Allocator &a) void *ptr = a.allocate(i, std::nothrow); if(!ptr) break; - std::size_t size = a.size(ptr); + std::size_t size = a.size(ptr); std::memset(ptr, 0, size); buffers2.push_back(ptr); } @@ -786,7 +786,7 @@ bool test_many_different_allocation(Allocator &a) multiallocation_chain chain(a.allocate_many(requested_sizes, ArraySize, 1, std::nothrow)); if(chain.empty()) break; - std::size_t n = chain.size(); + typename multiallocation_chain::size_type n = chain.size(); while(!chain.empty()){ buffers.push_back(detail::get_pointer(chain.front())); chain.pop_front(); @@ -855,11 +855,11 @@ bool test_many_deallocation(Allocator &a) typedef typename Allocator::multiallocation_chain multiallocation_chain; const std::size_t ArraySize = 11; vector buffers; - std::size_t requested_sizes[ArraySize]; + typename Allocator::size_type requested_sizes[ArraySize]; for(std::size_t i = 0; i < ArraySize; ++i){ requested_sizes[i] = 4*i; } - std::size_t free_memory = a.get_free_memory(); + typename Allocator::size_type free_memory = a.get_free_memory(); { for(int i = 0; true; ++i){ diff --git a/test/message_queue_test.cpp b/test/message_queue_test.cpp index 06223dc..10a4e7f 100644 --- a/test/message_queue_test.cpp +++ b/test/message_queue_test.cpp @@ -45,7 +45,7 @@ bool test_priority_order() //We test that the queue is ordered by priority and in the //same priority, is a FIFO - std::size_t recvd = 0; + message_queue::size_type recvd = 0; unsigned int priority = 0; std::size_t tstamp; @@ -131,23 +131,23 @@ bool test_serialize_db() //Data control data sending through the message queue std::size_t sent = 0; - std::size_t recvd = 0; - std::size_t total_recvd = 0; + message_queue::size_type recvd = 0; + message_queue::size_type total_recvd = 0; unsigned int priority; //Send whole first buffer through the mq1, read it //through mq2 to the second buffer while(1){ //Send a fragment of buffer1 through mq1 - std::size_t bytes_to_send = MaxMsgSize < (db_origin.get_size() - sent) ? + std::size_t bytes_to_send = MaxMsgSize < (db_origin.get_size() - sent) ? MaxMsgSize : (db_origin.get_size() - sent); mq1.send( &static_cast(db_origin.get_address())[sent] , bytes_to_send , 0); sent += bytes_to_send; //Receive the fragment through mq2 to buffer_destiny - mq2.receive( &buffer_destiny[total_recvd] - , BufferSize - recvd + mq2.receive( &buffer_destiny[total_recvd] + , BufferSize - recvd , recvd , priority); total_recvd += recvd; @@ -163,7 +163,7 @@ bool test_serialize_db() managed_external_buffer db_destiny(open_only, &buffer_destiny[0], BufferSize); //Let's find the map - std::pair ret = db_destiny.find("MyMap"); + std::pair ret = db_destiny.find("MyMap"); MyMap *map2 = ret.first; //Check if we have found it @@ -182,7 +182,8 @@ bool test_serialize_db() } //Now let's compare all db values - for(std::size_t i = 0, num_elements = map1->size(); i < num_elements; ++i){ + MyMap::size_type num_elements = map1->size(); + for(std::size_t i = 0; i < num_elements; ++i){ if((*map1)[i] != (*map2)[i]){ return false; } @@ -206,7 +207,7 @@ static boost::interprocess::message_queue *pmessage_queue; void receiver() { - std::size_t recvd_size; + boost::interprocess::message_queue::size_type recvd_size; unsigned int priority; int nummsg = NumMsg; diff --git a/test/movable_int.hpp b/test/movable_int.hpp index c58a883..7e9fe37 100644 --- a/test/movable_int.hpp +++ b/test/movable_int.hpp @@ -21,7 +21,7 @@ namespace test { class movable_int { - BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(movable_int) + BOOST_MOVABLE_BUT_NOT_COPYABLE(movable_int) public: @@ -33,11 +33,11 @@ class movable_int : m_int(a) {} - movable_int(BOOST_INTERPROCESS_RV_REF(movable_int) mmi) + movable_int(BOOST_RV_REF(movable_int) mmi) : m_int(mmi.m_int) { mmi.m_int = 0; } - movable_int & operator= (BOOST_INTERPROCESS_RV_REF(movable_int) mmi) + movable_int & operator= (BOOST_RV_REF(movable_int) mmi) { this->m_int = mmi.m_int; mmi.m_int = 0; return *this; } movable_int & operator= (int i) @@ -79,7 +79,7 @@ std::basic_ostream & operator<< class movable_and_copyable_int { - BOOST_INTERPROCESS_COPYABLE_AND_MOVABLE(movable_and_copyable_int) + BOOST_COPYABLE_AND_MOVABLE(movable_and_copyable_int) public: movable_and_copyable_int() @@ -94,14 +94,14 @@ class movable_and_copyable_int : m_int(mmi.m_int) {} - movable_and_copyable_int &operator= (BOOST_INTERPROCESS_COPY_ASSIGN_REF(movable_and_copyable_int) mi) + movable_and_copyable_int &operator= (BOOST_COPY_ASSIGN_REF(movable_and_copyable_int) mi) { this->m_int = mi.m_int; return *this; } - movable_and_copyable_int(BOOST_INTERPROCESS_RV_REF(movable_and_copyable_int) mmi) + movable_and_copyable_int(BOOST_RV_REF(movable_and_copyable_int) mmi) : m_int(mmi.m_int) { mmi.m_int = 0; } - movable_and_copyable_int & operator= (BOOST_INTERPROCESS_RV_REF(movable_and_copyable_int) mmi) + movable_and_copyable_int & operator= (BOOST_RV_REF(movable_and_copyable_int) mmi) { this->m_int = mmi.m_int; mmi.m_int = 0; return *this; } movable_and_copyable_int & operator= (int i) diff --git a/test/named_allocation_test_template.hpp b/test/named_allocation_test_template.hpp index 7cb60bc..a821b1a 100644 --- a/test/named_allocation_test_template.hpp +++ b/test/named_allocation_test_template.hpp @@ -129,7 +129,7 @@ bool test_named_iterators(ManagedMemory &m) const_named_iterator named_beg = m.named_begin(); const_named_iterator named_end = m.named_end(); - if(std::distance(named_beg, named_end) != (int)buffers.size()){ + if((std::size_t)std::distance(named_beg, named_end) != (std::size_t)buffers.size()){ return 1; } diff --git a/test/named_construct_test.cpp b/test/named_construct_test.cpp index ca1fa5e..9a8779e 100644 --- a/test/named_construct_test.cpp +++ b/test/named_construct_test.cpp @@ -135,7 +135,7 @@ int construct_test() if(NameGenerator::searchable){ { - std::pair res; + std::pair res; //Find the object res = segment.find (NameGenerator::get_simple_name()); //Length should be 1 @@ -147,7 +147,7 @@ int construct_test() return 1; } { - std::pair res; + std::pair res; //Find the array res = segment.find (NameGenerator::get_array_name()); @@ -160,7 +160,7 @@ int construct_test() return 1; } { - std::pair res; + std::pair res; //Find the array constructed from iterators res = segment.find (NameGenerator::get_array_it_name()); //Length should be 3 diff --git a/test/node_pool_test.hpp b/test/node_pool_test.hpp index d6b8145..b97c8db 100644 --- a/test/node_pool_test.hpp +++ b/test/node_pool_test.hpp @@ -31,7 +31,7 @@ struct test_node_pool template bool test_node_pool::allocate_then_deallocate(NodePool &pool) { - const std::size_t num_alloc = 1 + 3*pool.get_real_num_node(); + const typename NodePool::size_type num_alloc = 1 + 3*pool.get_real_num_node(); std::vector nodes; @@ -136,7 +136,7 @@ bool test_all_node_pool() typedef boost::interprocess::test::test_node_pool test_node_pool_t; shared_memory_object::remove(test::get_process_id_name()); { - managed_shared_memory shm(create_only, test::get_process_id_name(), 4*1024*sizeof(void*)); + managed_shared_memory shm(create_only, test::get_process_id_name(), 4*1024*sizeof(segment_manager::void_pointer)); typedef deleter deleter_t; typedef unique_ptr unique_ptr_t; diff --git a/test/set_test.hpp b/test/set_test.hpp index 264ef66..dc672d3 100644 --- a/test/set_test.hpp +++ b/test/set_test.hpp @@ -77,16 +77,16 @@ int set_test () MyShmSet *shmset2 = segment.template construct("MyShmSet2") - ( ::boost::interprocess::make_move_iterator(&aux_vect[0]) - , ::boost::interprocess::make_move_iterator(aux_vect + 50) + ( ::boost::make_move_iterator(&aux_vect[0]) + , ::boost::make_move_iterator(aux_vect + 50) , std::less(), segment.get_segment_manager()); MyStdSet *stdset2 = new MyStdSet(aux_vect2, aux_vect2 + 50); MyShmMultiSet *shmmultiset2 = segment.template construct("MyShmMultiSet2") - ( ::boost::interprocess::make_move_iterator(&aux_vect3[0]) - , ::boost::interprocess::make_move_iterator(aux_vect3 + 50) + ( ::boost::make_move_iterator(&aux_vect3[0]) + , ::boost::make_move_iterator(aux_vect3 + 50) , std::less(), segment.get_segment_manager()); MyStdMultiSet *stdmultiset2 = new MyStdMultiSet(aux_vect2, aux_vect2 + 50); @@ -117,8 +117,8 @@ int set_test () MyShmSet *shmset3 = segment.template construct("MyShmSet3") ( ordered_unique_range - , ::boost::interprocess::make_move_iterator(&aux_vect[0]) - , ::boost::interprocess::make_move_iterator(aux_vect + 50) + , ::boost::make_move_iterator(&aux_vect[0]) + , ::boost::make_move_iterator(aux_vect + 50) , std::less(), segment.get_segment_manager()); MyStdSet *stdset3 = new MyStdSet(aux_vect2, aux_vect2 + 50); @@ -126,8 +126,8 @@ int set_test () MyShmMultiSet *shmmultiset3 = segment.template construct("MyShmMultiSet3") ( ordered_range - , ::boost::interprocess::make_move_iterator(&aux_vect3[0]) - , ::boost::interprocess::make_move_iterator(aux_vect3 + 50) + , ::boost::make_move_iterator(&aux_vect3[0]) + , ::boost::make_move_iterator(aux_vect3 + 50) , std::less(), segment.get_segment_manager()); MyStdMultiSet *stdmultiset3 = new MyStdMultiSet(aux_vect2, aux_vect2 + 50); @@ -263,16 +263,16 @@ int set_test () aux_vect3[i] = boost::interprocess::move(move_me); } - shmset->insert(::boost::interprocess::make_move_iterator(&aux_vect[0]), ::boost::interprocess::make_move_iterator(aux_vect + 50)); + shmset->insert(::boost::make_move_iterator(&aux_vect[0]), ::boost::make_move_iterator(aux_vect + 50)); stdset->insert(aux_vect2, aux_vect2 + 50); - shmmultiset->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ::boost::interprocess::make_move_iterator(aux_vect3 + 50)); + shmmultiset->insert(::boost::make_move_iterator(&aux_vect3[0]), ::boost::make_move_iterator(aux_vect3 + 50)); stdmultiset->insert(aux_vect2, aux_vect2 + 50); if(!CheckEqualContainers(shmset, stdset)){ - std::cout << "Error in shmset->insert(::boost::interprocess::make_move_iterator(&aux_vect[0])..." << std::endl; + std::cout << "Error in shmset->insert(::boost::make_move_iterator(&aux_vect[0])..." << std::endl; return 1; } if(!CheckEqualContainers(shmmultiset, stdmultiset)){ - std::cout << "Error in shmmultiset->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ..." << std::endl; + std::cout << "Error in shmmultiset->insert(::boost::make_move_iterator(&aux_vect3[0]), ..." << std::endl; return 1; } @@ -320,20 +320,20 @@ int set_test () aux_vect5[i] = boost::interprocess::move(move_me); } - shmset->insert(::boost::interprocess::make_move_iterator(&aux_vect[0]), ::boost::interprocess::make_move_iterator(aux_vect + 50)); - shmset->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0]), ::boost::interprocess::make_move_iterator(aux_vect3 + 50)); + shmset->insert(::boost::make_move_iterator(&aux_vect[0]), ::boost::make_move_iterator(aux_vect + 50)); + shmset->insert(::boost::make_move_iterator(&aux_vect3[0]), ::boost::make_move_iterator(aux_vect3 + 50)); stdset->insert(aux_vect2, aux_vect2 + 50); stdset->insert(aux_vect2, aux_vect2 + 50); - shmmultiset->insert(::boost::interprocess::make_move_iterator(&aux_vect4[0]), ::boost::interprocess::make_move_iterator(aux_vect4 + 50)); - shmmultiset->insert(::boost::interprocess::make_move_iterator(&aux_vect5[0]), ::boost::interprocess::make_move_iterator(aux_vect5 + 50)); + shmmultiset->insert(::boost::make_move_iterator(&aux_vect4[0]), ::boost::make_move_iterator(aux_vect4 + 50)); + shmmultiset->insert(::boost::make_move_iterator(&aux_vect5[0]), ::boost::make_move_iterator(aux_vect5 + 50)); stdmultiset->insert(aux_vect2, aux_vect2 + 50); stdmultiset->insert(aux_vect2, aux_vect2 + 50); if(!CheckEqualContainers(shmset, stdset)){ - std::cout << "Error in shmset->insert(::boost::interprocess::make_move_iterator(&aux_vect3[0])..." << std::endl; + std::cout << "Error in shmset->insert(::boost::make_move_iterator(&aux_vect3[0])..." << std::endl; return 1; } if(!CheckEqualContainers(shmmultiset, stdmultiset)){ - std::cout << "Error in shmmultiset->insert(::boost::interprocess::make_move_iterator(&aux_vect5[0])..." << std::endl; + std::cout << "Error in shmmultiset->insert(::boost::make_move_iterator(&aux_vect5[0])..." << std::endl; return 1; } diff --git a/test/string_test.cpp b/test/string_test.cpp index 831dbbc..04fa004 100644 --- a/test/string_test.cpp +++ b/test/string_test.cpp @@ -52,7 +52,7 @@ struct StringEqual if(string1.size() != string2.size()) return false; return std::char_traits::compare - (string1.c_str(), string2.c_str(), string1.size()) == 0; + (string1.c_str(), string2.c_str(), (std::size_t)string1.size()) == 0; } }; diff --git a/test/user_buffer_test.cpp b/test/user_buffer_test.cpp index b4525a9..34ddeae 100644 --- a/test/user_buffer_test.cpp +++ b/test/user_buffer_test.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "print_container.hpp" /******************************************************************************/ @@ -52,9 +53,9 @@ bool CheckEqual(MyUserList *userlist, MyStdList *stdlist, MyHeapList *heaplist) int main () { //Create the user memory who will store all objects - const int size_aligner = sizeof(detail::max_align); + const int size_aligner = sizeof(::boost::detail::max_align); const int memsize = 65536/size_aligner*size_aligner; - static detail::max_align static_buffer[memsize/size_aligner]; + static ::boost::detail::max_align static_buffer[memsize/size_aligner]; { //Now test move semantics @@ -212,7 +213,7 @@ int main () } catch(boost::interprocess::bad_alloc &){} - std::size_t heap_list_size = heaplist->size(); + MyHeapList::size_type heap_list_size = heaplist->size(); //Copy heap buffer to another const char *insert_beg = static_cast(heap_buffer.get_address()); @@ -245,7 +246,7 @@ int main () } catch(boost::interprocess::bad_alloc &){} - std::size_t user_list_size = userlist->size(); + MyUserList::size_type user_list_size = userlist->size(); if(user_list_size <= heap_list_size){ return 1; diff --git a/test/vector_test.hpp b/test/vector_test.hpp index f515769..9005bb7 100644 --- a/test/vector_test.hpp +++ b/test/vector_test.hpp @@ -137,7 +137,7 @@ int vector_test() IntType aux_vect[50]; for(int i = 0; i < 50; ++i){ IntType new_int(-1); - BOOST_STATIC_ASSERT((::boost::interprocess::is_movable::value == true)); + //BOOST_STATIC_ASSERT((::boost::move_detail::is_copy_constructible::value == false)); aux_vect[i] = boost::interprocess::move(new_int); } int aux_vect2[50]; @@ -146,8 +146,8 @@ int vector_test() } shmvector->insert(shmvector->end() - ,::boost::interprocess::make_move_iterator(&aux_vect[0]) - ,::boost::interprocess::make_move_iterator(aux_vect + 50)); + ,::boost::make_move_iterator(&aux_vect[0]) + ,::boost::make_move_iterator(aux_vect + 50)); stdvector->insert(stdvector->end(), aux_vect2, aux_vect2 + 50); if(!test::CheckEqualContainers(shmvector, stdvector)) return 1; @@ -168,8 +168,8 @@ int vector_test() aux_vect2[i] = -1; } shmvector->insert(shmvector->begin() - ,::boost::interprocess::make_move_iterator(&aux_vect[0]) - ,::boost::interprocess::make_move_iterator(aux_vect + 50)); + ,::boost::make_move_iterator(&aux_vect[0]) + ,::boost::make_move_iterator(aux_vect + 50)); stdvector->insert(stdvector->begin(), aux_vect2, aux_vect2 + 50); if(!test::CheckEqualContainers(shmvector, stdvector)) return 1; } @@ -186,7 +186,7 @@ int vector_test() if(!test::CheckEqualContainers(shmvector, stdvector)) return 1; if(!copyable_only(shmvector, stdvector - ,detail::bool_::value>())){ + ,detail::bool_::value>())){ return 1; }