diff --git a/doc/interprocess.qbk b/doc/interprocess.qbk index f402c04..fb8f99b 100644 --- a/doc/interprocess.qbk +++ b/doc/interprocess.qbk @@ -4420,7 +4420,7 @@ through a message queue and duplicated in another buffer: [endsect] -[section:allocators_containers Allocators, containers and memory allocation algorithms] +[section:allocators_containers Allocators and memory allocation algorithms] [section:allocator_introduction Introduction to Interprocess allocators] @@ -4431,7 +4431,7 @@ To achieve this, [*Boost.Interprocess] makes use of managed memory segment's memory allocation algorithms to build several memory allocation schemes, including general purpose and node allocators. -[*Boost.Interprocess] STL compatible allocators are configurable via template parameters. +[*Boost.Interprocess] allocators are configurable via template parameters. Allocators define their `pointer` typedef based on the `void_pointer` typedef of the segment manager passed as template argument. When this `segment_manager::void_pointer` is a relative pointer, (for example, `offset_ptr`) the user can place these allocators in @@ -5010,7 +5010,9 @@ An example using [classref boost::interprocess::cached_adaptive_pool cached_adap [endsect] -[section:containers_explained Interprocess and containers in managed memory segments] +[endsect] + +[section:containers_explained Containers in managed memory segments] [section:stl_container_requirements Container requirements for Boost.Interprocess allocators] @@ -5019,7 +5021,8 @@ interface and if they define their internal *pointer* typedef as a relative poin they can be used to place STL containers in shared memory, memory mapped files or in a user defined memory segment. -However, as Scott Meyers mentions in his Effective STL +Originally, in C++98 and C++03, this *pointer* typedef was useless. +As Scott Meyers mentions in his Effective STL book, Item 10, ['"Be aware of allocator conventions and restrictions"]: @@ -5051,94 +5054,47 @@ mapped files with [*Boost.Interprocess] can't make any of these assumptions, so: * Containers' internal pointers should be of the type allocator::pointer and containers may not assume allocator::pointer is a raw pointer. -* All objects must be constructed-destroyed via - allocator::construct and allocator::destroy functions. +This was in theory fixed in C++11, when `std::pointer_traits` utilities were introduced +and standard library containers added support for them. However, due to ABI +concerns and low user demand, some implementations still +don't fully support ['fancy pointer] types like +`boost::interprocess:offset_ptr`. Those implementations still use raw pointers +in some containers for internal data or iterator implementations. + +This non-portable situation is described in +[@https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0773r0.html ['"P0773R0: Towards meaningful fancy pointers"] ] + +[:['Can we use offset fancy pointer types to enable safe sharing of memory regions?]] +[:['Yes; but the requirements on vendors are unclear, and there are pitfalls for the programmer.]] +[:['Scenario (A), offset pointers, has only one tenable solution, "continue to partly support."]] + [endsect] -[section:containers STL containers in managed memory segments] +[section:containers Portable containers in managed memory segments] -Unfortunately, many STL implementations use raw pointers -for internal data and ignore allocator pointer typedefs -and others suppose at some point that the allocator::typedef -is T*. This is because in practice, -there wasn't need of allocators with a pointer typedef -different from T* for pooled/node memory -allocators. +[important Since [*Boost.Container] was created from [*Boost.Interprocess] in 2011, this library has mantained + several headers for backwards compatibility. Those headers are now deprecated + and will be removed in a future Boost version. Users should directly use [*Boost.Container] headers] -Until STL implementations handle allocator::pointer typedefs -in a generic way, [*Boost.Interprocess] offers the following classes: +Due to the described partial support from Standard Library implementations [*Boost.Interprocess] +highly recommends using [*Boost.Container] containers, which are guaranteed to work with [*Boost.Interprocess] -* [*boost:interprocess::vector] is the implementation of `std::vector` ready - to be used in managed memory segments like shared memory. To use it include: +The following [*Boost.Container] containers are compatible with [*Boost.Interprocess]: -[c++] - - #include - -* [*boost:interprocess::deque] is the implementation of `std::deque` ready - to be used in managed memory segments like shared memory. To use it include: - -[c++] - - #include - -* [classref boost::interprocess::list list] is the implementation of `std::list` ready - to be used in managed memory segments like shared memory. To use it include: - -[c++] - - #include - -* [classref boost::interprocess::slist slist] is the implementation of SGI's `slist` container (singly linked list) ready - to be used in managed memory segments like shared memory. To use it include: - -[c++] - - #include - -* [classref boost::interprocess::set set]/ - [classref boost::interprocess::multiset multiset]/ - [classref boost::interprocess::map map]/ - [classref boost::interprocess::multimap multimap] family is the implementation of - std::set/multiset/map/multimap family ready - to be used in managed memory segments like shared memory. To use them include: - -[c++] - - #include - #include - -* [classref boost::interprocess::flat_set flat_set]/ - [classref boost::interprocess::flat_multiset flat_multiset]/ - [classref boost::interprocess::flat_map flat_map]/ - [classref boost::interprocess::flat_multimap flat_multimap] classes are the - adaptation and extension of Andrei Alexandrescu's famous AssocVector class - from Loki library, ready for the shared memory. These classes offer the same - functionality as `std::set/multiset/map/multimap` implemented with an ordered vector, - which has faster lookups than the standard ordered associative containers - based on red-black trees, but slower insertions. To use it include: - -[c++] - - #include - #include - -* [classref boost::interprocess::basic_string basic_string] - is the implementation of `std::basic_string` ready - to be used in managed memory segments like shared memory. - It's implemented using a vector-like contiguous storage, so - it has fast c string conversion and can be used with the - [link interprocess.streams.vectorstream vectorstream] iostream formatting classes. - To use it include: - -[c++] - - #include - -All these containers have the same default arguments as standard -containers and they can be used with other, non [*Boost.Interprocess] -allocators (std::allocator, or boost::pool_allocator, for example). +* `deque` +* `devector` +* `flat_map/multimap` +* `flat_set/multiset` +* `list` +* `map/multimap` +* `set/multiset` +* `slist` +* `small_vector` +* `stable_vector` +* `static_vector` +* `string` +* `vector` To place any of these containers in managed memory segments, we must define the allocator template parameter with a [*Boost.Interprocess] allocator @@ -5189,27 +5145,6 @@ Let's see an example: [endsect] -[section:containers_and_move Move semantics in Interprocess containers] - -[*Boost.Interprocess] containers support move semantics, which means that the contents -of a container can be moved from a container to another one, without any copying. The -contents of the source container are transferred to the target container and the source -container is left in default-constructed state. - -When using containers of containers, we can also use move-semantics to insert -objects in the container, avoiding unnecessary copies. - - -To transfer the contents of a container to another one, use -`boost::move()` function, as shown in the example. For more details -about functions supporting move-semantics, see the reference section of -Boost.Interprocess containers: - -[import ../example/doc_move_containers.cpp] -[doc_move_containers] - -[endsect] - [section:containers_of_containers Containers of containers] When creating containers of containers, each container needs an allocator. @@ -5267,8 +5202,6 @@ with raw pointers. [endsect] -[endsect] - [section:memory_algorithms Memory allocation algorithms] [section:simple_seq_fit simple_seq_fit: A simple shared memory management algorithm] @@ -6832,10 +6765,27 @@ thank them: [section:release_notes Release Notes] +[section:release_notes_boost_1_87_00 Boost 1.87 Release] + +* Deprecated `` headers. They were the original source of [*Boost.Container] in 2011, but no longer maintained. + As a long transition, Boost.Interprocess has maintained those headers for compatibility. They will be removed in a future Boost release. + +[endsect] + +Bug in boost::interprocess::ipcdetail::sync_handles::obtain_mutex #210 + +[section:release_notes_boost_1_87_00 Boost 1.87 Release] + +* Fixed bugs: + * [@https://github.com/boostorg/interprocess/issues/210 GitHub #210 (['"Bug in boost::interprocess::ipcdetail::sync_handles::obtain_mutex"])]. + * [@https://github.com/boostorg/interprocess/issues/192 GitHub #192 (['"managed_windows_shared_memory crash on destruction"])]. + +[endsect] + [section:release_notes_boost_1_86_00 Boost 1.86 Release] * Fixed bugs: - * [@https://github.com/boostorg/interprocess/pull/191 GitHub #191 (['"vectorstream: support file sizes larger than INT_MAX "])]. + * [@https://github.com/boostorg/interprocess/pull/191 GitHub #191 (['"vectorstream: support file sizes larger than INT_MAX"])]. * [@https://github.com/boostorg/interprocess/pull/198 GitHub #198 (['"Minor fixes for documentation of offset_ptr"])]. * [@https://github.com/boostorg/interprocess/pull/202 GitHub #202 (['"Allow to map message_queue in anonymous memory"])]. * [@https://github.com/boostorg/interprocess/pull/207 GitHub #207 (['"cmake: link system libraries"])]. diff --git a/example/doc_complex_map.cpp b/example/doc_complex_map.cpp index 129c642..db191b6 100644 --- a/example/doc_complex_map.cpp +++ b/example/doc_complex_map.cpp @@ -12,9 +12,9 @@ //[doc_complex_map #include #include -#include -#include -#include +#include +#include +#include //<- #include "../test/get_process_id_name.hpp" //-> @@ -25,11 +25,11 @@ using namespace boost::interprocess; typedef managed_shared_memory::segment_manager segment_manager_t; typedef allocator void_allocator; typedef allocator int_allocator; -typedef vector int_vector; +typedef boost::container::vector int_vector; typedef allocator int_vector_allocator; -typedef vector int_vector_vector; +typedef boost::container::vector int_vector_vector; typedef allocator char_allocator; -typedef basic_string, char_allocator> char_string; +typedef boost::container::basic_string, char_allocator> char_string; class complex_data { @@ -55,7 +55,7 @@ class complex_data typedef std::pair map_value_type; typedef std::pair movable_to_map_value_type; typedef allocator map_value_type_allocator; -typedef map< char_string, complex_data +typedef boost::container::map< char_string, complex_data , std::less, map_value_type_allocator> complex_map_type; int main () diff --git a/example/doc_cont.cpp b/example/doc_cont.cpp index 5caaab2..aad9791 100644 --- a/example/doc_cont.cpp +++ b/example/doc_cont.cpp @@ -10,7 +10,7 @@ #include //[doc_cont -#include +#include #include #include //<- @@ -39,7 +39,7 @@ int main () ShmemAllocator; //Alias a vector that uses the previous STL-like allocator - typedef vector MyVector; + typedef boost::container::vector MyVector; int initVal[] = {0, 1, 2, 3, 4, 5, 6 }; const int *begVal = initVal; @@ -53,9 +53,9 @@ int main () MyVector *myvector = segment.construct ("MyVector")/*object name*/ - (begVal /*first ctor parameter*/, - endVal /*second ctor parameter*/, - alloc_inst /*third ctor parameter*/); + (begVal /*first ctor parameter*/ + ,endVal /*second ctor parameter*/ + ,alloc_inst /*third ctor parameter*/); //Use vector as your want std::sort(myvector->rbegin(), myvector->rend()); diff --git a/example/doc_managed_external_buffer.cpp b/example/doc_managed_external_buffer.cpp index 325100d..c95174c 100644 --- a/example/doc_managed_external_buffer.cpp +++ b/example/doc_managed_external_buffer.cpp @@ -11,7 +11,7 @@ //[doc_managed_external_buffer #include #include -#include +#include #include #include @@ -38,7 +38,7 @@ int main() allocator_t; //Alias a STL compatible list to be constructed in the static buffer - typedef list MyBufferList; + typedef boost::container::list MyBufferList; //The list must be initialized with the allocator //All objects created with objects_in_static_memory will diff --git a/example/doc_managed_heap_memory.cpp b/example/doc_managed_heap_memory.cpp index 30c2f65..944f1fb 100644 --- a/example/doc_managed_heap_memory.cpp +++ b/example/doc_managed_heap_memory.cpp @@ -10,13 +10,13 @@ #include //[doc_managed_heap_memory -#include +#include #include #include #include using namespace boost::interprocess; -typedef list > +typedef boost::container::list > MyList; int main () diff --git a/example/doc_managed_mapped_file.cpp b/example/doc_managed_mapped_file.cpp index 963b7ae..70ed6e7 100644 --- a/example/doc_managed_mapped_file.cpp +++ b/example/doc_managed_mapped_file.cpp @@ -11,7 +11,7 @@ #if defined(BOOST_INTERPROCESS_MAPPED_FILES) -#include +#include #include #include #include @@ -22,7 +22,7 @@ //-> using namespace boost::interprocess; -typedef list > +typedef boost::container::list > MyList; int main () diff --git a/example/doc_map.cpp b/example/doc_map.cpp index db0d21b..a7ee4c6 100644 --- a/example/doc_map.cpp +++ b/example/doc_map.cpp @@ -11,7 +11,7 @@ #include //[doc_map #include -#include +#include #include #include #include @@ -53,7 +53,7 @@ int main () //Alias a map of ints that uses the previous STL-like allocator. //Note that the third parameter argument is the ordering function //of the map, just like with std::map, used to compare the keys. - typedef map, ShmemAllocator> MyMap; + typedef boost::container::map, ShmemAllocator> MyMap; //Initialize the shared memory STL-compatible allocator ShmemAllocator alloc_inst (segment.get_segment_manager()); diff --git a/example/doc_move_containers.cpp b/example/doc_move_containers.cpp deleted file mode 100644 index 8f6cd50..0000000 --- a/example/doc_move_containers.cpp +++ /dev/null @@ -1,90 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2006-2012. 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. -// -////////////////////////////////////////////////////////////////////////////// - -#include -//[doc_move_containers -#include -#include -#include -#include -#include -//<- -#include "../test/get_process_id_name.hpp" -//-> - -int main () -{ - using namespace boost::interprocess; - - //Typedefs - typedef managed_shared_memory::segment_manager SegmentManager; - typedef allocator CharAllocator; - typedef basic_string - ,CharAllocator> MyShmString; - typedef allocator StringAllocator; - typedef vector MyShmStringVector; - - //Remove shared memory on construction and destruction - struct shm_remove - { - shm_remove() { shared_memory_object::remove(test::get_process_id_name()); } - ~shm_remove(){ shared_memory_object::remove(test::get_process_id_name()); } - } remover; - //<- - (void)remover; - //-> - - managed_shared_memory shm(create_only, test::get_process_id_name(), 65536); - - //Create allocators - CharAllocator charallocator (shm.get_segment_manager()); - StringAllocator stringallocator(shm.get_segment_manager()); - - //Create a vector of strings in shared memory. - MyShmStringVector *myshmvector = - shm.construct("myshmvector")(stringallocator); - - //Insert 50 strings in shared memory. The strings will be allocated - //only once and no string copy-constructor will be called when inserting - //strings, leading to a great performance. - MyShmString string_to_compare(charallocator); - string_to_compare = "this is a long, long, long, long, long, long, string..."; - - myshmvector->reserve(50); - for(int i = 0; i < 50; ++i){ - MyShmString move_me(string_to_compare); - //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(boost::move(move_me)); - - //The source string is in default constructed state - assert(move_me.empty()); - - //The newly created string will be equal to the "move_me"'s old contents - assert(myshmvector->back() == string_to_compare); - } - - //Now erase a string... - myshmvector->pop_back(); - - //...And insert one in the first position. - //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(), boost::move(string_to_compare)); - - //Destroy vector. This will free all strings that the vector contains - shm.destroy_ptr(myshmvector); - return 0; -} -//] - - diff --git a/example/doc_multi_index.cpp b/example/doc_multi_index.cpp index f007f33..302c584 100644 --- a/example/doc_multi_index.cpp +++ b/example/doc_multi_index.cpp @@ -12,7 +12,7 @@ //[doc_multi_index #include #include -#include +#include //<- //Shield against external warnings @@ -32,7 +32,7 @@ using namespace boost::interprocess; namespace bmi = boost::multi_index; typedef managed_shared_memory::allocator::type char_allocator; -typedef basic_string, char_allocator>shm_string; +typedef boost::container::basic_string, char_allocator>shm_string; //Data to insert in shared memory struct employee diff --git a/example/doc_spawn_vector.cpp b/example/doc_spawn_vector.cpp index 530870b..1cea587 100644 --- a/example/doc_spawn_vector.cpp +++ b/example/doc_spawn_vector.cpp @@ -11,7 +11,7 @@ #include //[doc_spawn_vector #include -#include +#include #include #include #include //std::system @@ -27,7 +27,7 @@ typedef allocator ShmemAllocator; //Alias a vector that uses the previous STL-like allocator so that allocates //its values from the segment -typedef vector MyVector; +typedef boost::container::vector MyVector; //Main function. For parent process argc == 1, for child process argc == 2 int main(int argc, char *argv[]) diff --git a/example/doc_unique_ptr.cpp b/example/doc_unique_ptr.cpp index 05ea2f4..9564fdd 100644 --- a/example/doc_unique_ptr.cpp +++ b/example/doc_unique_ptr.cpp @@ -14,8 +14,8 @@ //[doc_unique_ptr #include #include -#include -#include +#include +#include #include #include //<- @@ -38,12 +38,12 @@ struct MyType typedef managed_unique_ptr::type unique_ptr_type; //Define containers of unique pointer. Unique pointer simplifies object management -typedef vector +typedef boost::container::vector < unique_ptr_type , allocator > unique_ptr_vector_t; -typedef list +typedef boost::container::list < unique_ptr_type , allocator > unique_ptr_list_t; diff --git a/example/doc_vectorstream.cpp b/example/doc_vectorstream.cpp index f941f1e..68bcac9 100644 --- a/example/doc_vectorstream.cpp +++ b/example/doc_vectorstream.cpp @@ -10,8 +10,8 @@ #include //[doc_vectorstream -#include -#include +#include +#include #include #include #include @@ -26,8 +26,8 @@ typedef allocator IntAllocator; typedef allocator CharAllocator; -typedef vector MyVector; -typedef basic_string +typedef boost::container::vector MyVector; +typedef boost::container::basic_string , CharAllocator> MyString; typedef basic_vectorstream MyVectorStream; diff --git a/example/doc_where_allocate.cpp b/example/doc_where_allocate.cpp index 6f42c25..38f2886 100644 --- a/example/doc_where_allocate.cpp +++ b/example/doc_where_allocate.cpp @@ -11,8 +11,8 @@ #include //[doc_where_allocate #include -#include -#include +#include +#include #include //<- #include "../test/get_process_id_name.hpp" @@ -24,11 +24,11 @@ int main () //Typedefs typedef allocator CharAllocator; - typedef basic_string, CharAllocator> + typedef boost::container::basic_string, CharAllocator> MyShmString; typedef allocator StringAllocator; - typedef vector + typedef boost::container::vector MyShmStringVector; //Open shared memory diff --git a/include/boost/interprocess/indexes/flat_map_index.hpp b/include/boost/interprocess/indexes/flat_map_index.hpp index 027b75b..8d84323 100644 --- a/include/boost/interprocess/indexes/flat_map_index.hpp +++ b/include/boost/interprocess/indexes/flat_map_index.hpp @@ -22,7 +22,7 @@ #include // interprocess -#include +#include #include // intrusive/detail #include //std::pair @@ -50,8 +50,8 @@ struct flat_map_index_aux typedef std::pair value_type; typedef allocator allocator_type; - typedef flat_map index_t; + typedef boost::container::flat_map index_t; }; #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED diff --git a/include/boost/interprocess/indexes/iunordered_set_index.hpp b/include/boost/interprocess/indexes/iunordered_set_index.hpp index bf1cd1f..34f5f85 100644 --- a/include/boost/interprocess/indexes/iunordered_set_index.hpp +++ b/include/boost/interprocess/indexes/iunordered_set_index.hpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include //std::less diff --git a/include/boost/interprocess/indexes/map_index.hpp b/include/boost/interprocess/indexes/map_index.hpp index c7c3c86..2b3c741 100644 --- a/include/boost/interprocess/indexes/map_index.hpp +++ b/include/boost/interprocess/indexes/map_index.hpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include //std::pair #include //std::less @@ -50,7 +50,7 @@ struct map_index_aux typename MapConfig:: segment_manager_base> allocator_type; - typedef boost::interprocess::map + typedef boost::container::map index_t; }; diff --git a/test/adaptive_pool_test.cpp b/test/adaptive_pool_test.cpp index 37e0ec4..53cd384 100644 --- a/test/adaptive_pool_test.cpp +++ b/test/adaptive_pool_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS #include -#include -#include +#include +#include #include #include "print_container.hpp" #include "dummy_test_allocator.hpp" @@ -43,12 +43,12 @@ template class ipcdetail::adaptive_pool_v1 MyShmList; -typedef list MyShmListV1; +typedef boost::container::list MyShmList; +typedef boost::container::list MyShmListV1; //Alias vector types -typedef vector MyShmVector; -typedef vector MyShmVectorV1; +typedef boost::container::vector MyShmVector; +typedef boost::container::vector MyShmVectorV1; int main () { diff --git a/test/allocexcept_test.cpp b/test/allocexcept_test.cpp index 6f6e92f..f696516 100644 --- a/test/allocexcept_test.cpp +++ b/test/allocexcept_test.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #include #include #include "print_container.hpp" @@ -49,7 +49,7 @@ int main () inst_allocator_t; const inst_allocator_t myallocator (segment.get_segment_manager()); - typedef vector MyVect; + typedef boost::container::vector MyVect; //We'll provoke an exception, let's see if exception handling works BOOST_INTERPROCESS_TRY{ diff --git a/test/cached_adaptive_pool_test.cpp b/test/cached_adaptive_pool_test.cpp index bcc7876..238184f 100644 --- a/test/cached_adaptive_pool_test.cpp +++ b/test/cached_adaptive_pool_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS #include -#include -#include +#include +#include #include #include "print_container.hpp" #include "dummy_test_allocator.hpp" @@ -45,12 +45,12 @@ template class ipcdetail::cached_adaptive_pool_v1 MyShmList; -typedef list MyShmListV1; +typedef boost::container::list MyShmList; +typedef boost::container::list MyShmListV1; //Alias vector types -typedef vector MyShmVector; -typedef vector MyShmVectorV1; +typedef boost::container::vector MyShmVector; +typedef boost::container::vector MyShmVectorV1; int main () { diff --git a/test/cached_node_allocator_test.cpp b/test/cached_node_allocator_test.cpp index 6c0ee4a..b5c56b9 100644 --- a/test/cached_node_allocator_test.cpp +++ b/test/cached_node_allocator_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include -#include +#include +#include #include #include "print_container.hpp" #include "dummy_test_allocator.hpp" @@ -43,12 +43,12 @@ template class ipcdetail::cached_node_allocator_v1 MyShmList; -typedef list MyShmListV1; +typedef boost::container::list MyShmList; +typedef boost::container::list MyShmListV1; //Alias vector types -typedef vector MyShmVector; -typedef vector MyShmVectorV1; +typedef boost::container::vector MyShmVector; +typedef boost::container::vector MyShmVectorV1; int main () { diff --git a/test/data_test.cpp b/test/data_test.cpp index ec519b2..0feaef5 100644 --- a/test/data_test.cpp +++ b/test/data_test.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #include #include #include "print_container.hpp" @@ -43,7 +43,7 @@ int main () const char *allocName = "testAllocation"; - typedef boost::interprocess::vector MyVect; + typedef boost::container::vector MyVect; //---- ALLOC, NAMED_ALLOC, NAMED_NEW TEST ----// { diff --git a/test/deque_test.cpp b/test/deque_test.cpp index 1417669..2cf45c7 100644 --- a/test/deque_test.cpp +++ b/test/deque_test.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include "print_container.hpp" #include "check_equal_containers.hpp" @@ -118,7 +118,7 @@ bool do_test() shmem_allocator_t; //Alias deque types - typedef deque MyShmDeque; + typedef boost::container::deque MyShmDeque; typedef std::deque MyStdDeque; const int Memsize = 128u*1024u; const char *const shMemName = test::get_process_id_name(); @@ -302,7 +302,7 @@ int main () const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_FRONT | test::EMPLACE_BEFORE); if(!boost::interprocess::test::test_emplace - < deque, Options>()) + < boost::container::deque, Options>()) return 1; return 0; diff --git a/test/flat_tree_test.cpp b/test/flat_tree_test.cpp index 04f0aa8..a517da1 100644 --- a/test/flat_tree_test.cpp +++ b/test/flat_tree_test.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #include #include #include "print_container.hpp" @@ -64,36 +64,36 @@ typedef std::multiset MyStdMul typedef std::map MyStdMap; typedef std::multimap MyStdMultiMap; -typedef flat_set, shmem_allocator_t> MyShmSet; -typedef flat_multiset, shmem_allocator_t> MyShmMultiSet; -typedef flat_map, shmem_pair_allocator_t> MyShmMap; -typedef flat_multimap, shmem_pair_allocator_t> MyShmMultiMap; +typedef boost::container::flat_set, shmem_allocator_t> MyShmSet; +typedef boost::container::flat_multiset, shmem_allocator_t> MyShmMultiSet; +typedef boost::container::flat_map, shmem_pair_allocator_t> MyShmMap; +typedef boost::container::flat_multimap, shmem_pair_allocator_t> MyShmMultiMap; -typedef flat_set +typedef boost::container::flat_set ,shmem_movable_allocator_t> MyMovableShmSet; -typedef flat_multiset +typedef boost::container::flat_multiset ,shmem_movable_allocator_t> MyMovableShmMultiSet; -typedef flat_map ,shmem_movable_pair_allocator_t> MyMovableShmMap; -typedef flat_multimap ,shmem_movable_pair_allocator_t> MyMovableShmMultiMap; -typedef flat_set +typedef boost::container::flat_set ,shmem_move_copy_allocator_t> MyMoveCopyShmSet; -typedef flat_multiset +typedef boost::container::flat_multiset ,shmem_move_copy_allocator_t> MyMoveCopyShmMultiSet; -typedef flat_set +typedef boost::container::flat_set ,shmem_copy_allocator_t> MyCopyShmSet; -typedef flat_multiset +typedef boost::container::flat_multiset ,shmem_copy_allocator_t> MyCopyShmMultiSet; -typedef flat_map ,shmem_move_copy_pair_allocator_t> MyMoveCopyShmMap; -typedef flat_multimap ,shmem_move_copy_pair_allocator_t> MyMoveCopyShmMultiMap; @@ -185,13 +185,13 @@ int main() const test::EmplaceOptions SetOptions = (test::EmplaceOptions)(test::EMPLACE_HINT | test::EMPLACE_ASSOC); const test::EmplaceOptions MapOptions = (test::EmplaceOptions)(test::EMPLACE_HINT_PAIR | test::EMPLACE_ASSOC_PAIR); - if(!boost::interprocess::test::test_emplace, MapOptions>()) + if(!boost::interprocess::test::test_emplace, MapOptions>()) return 1; - if(!boost::interprocess::test::test_emplace, MapOptions>()) + if(!boost::interprocess::test::test_emplace, MapOptions>()) return 1; - if(!boost::interprocess::test::test_emplace, SetOptions>()) + if(!boost::interprocess::test::test_emplace, SetOptions>()) return 1; - if(!boost::interprocess::test::test_emplace, SetOptions>()) + if(!boost::interprocess::test::test_emplace, SetOptions>()) return 1; //#endif //!defined(__GNUC__) return 0; diff --git a/test/list_test.cpp b/test/list_test.cpp index 00f03a3..d4975d6 100644 --- a/test/list_test.cpp +++ b/test/list_test.cpp @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include #include "dummy_test_allocator.hpp" @@ -20,19 +20,19 @@ using namespace boost::interprocess; typedef allocator ShmemAllocator; -typedef list MyList; +typedef boost::container::list MyList; //typedef allocator ShmemVolatileAllocator; -//typedef list MyVolatileList; +//typedef boost::container::list MyVolatileList; typedef allocator ShmemMoveAllocator; -typedef list MyMoveList; +typedef boost::container::list MyMoveList; typedef allocator ShmemCopyMoveAllocator; -typedef list MyCopyMoveList; +typedef boost::container::list MyCopyMoveList; typedef allocator ShmemCopyAllocator; -typedef list MyCopyList; +typedef boost::container::list MyCopyList; int main () { @@ -53,7 +53,7 @@ int main () const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_FRONT | test::EMPLACE_BEFORE); - if(!boost::interprocess::test::test_emplace, Options>()) + if(!boost::interprocess::test::test_emplace, Options>()) return 1; return 0; diff --git a/test/managed_mapped_file_test.cpp b/test/managed_mapped_file_test.cpp index 1def8e5..bbdba85 100644 --- a/test/managed_mapped_file_test.cpp +++ b/test/managed_mapped_file_test.cpp @@ -13,7 +13,7 @@ #if defined(BOOST_INTERPROCESS_MAPPED_FILES) #include -#include +#include #include #include #include @@ -63,7 +63,7 @@ int test_managed_mapped_file() typedef allocator allocator_int_t; //A vector that uses that allocator - typedef boost::interprocess::vector MyVect; + typedef boost::container::vector MyVect; { //Remove the file it is already created diff --git a/test/managed_shared_memory_test.cpp b/test/managed_shared_memory_test.cpp index b182dbd..0c5b7b6 100644 --- a/test/managed_shared_memory_test.cpp +++ b/test/managed_shared_memory_test.cpp @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ int test_managed_shared_memory() typedef allocator allocator_int_t; //A vector that uses that allocator - typedef boost::interprocess::vector MyVect; + typedef boost::container::vector MyVect; { //Remove the shmem it is already created diff --git a/test/managed_windows_shared_memory_test.cpp b/test/managed_windows_shared_memory_test.cpp index b513ef0..74174b1 100644 --- a/test/managed_windows_shared_memory_test.cpp +++ b/test/managed_windows_shared_memory_test.cpp @@ -13,7 +13,7 @@ #ifdef BOOST_INTERPROCESS_WINDOWS #include -#include +#include #include #include #include @@ -30,7 +30,7 @@ int main () typedef allocator allocator_int_t; //A vector that uses that allocator - typedef boost::interprocess::vector MyVect; + typedef boost::container::vector MyVect; { const int max = 100; diff --git a/test/managed_xsi_shared_memory_test.cpp b/test/managed_xsi_shared_memory_test.cpp index 781347f..51cc6a0 100644 --- a/test/managed_xsi_shared_memory_test.cpp +++ b/test/managed_xsi_shared_memory_test.cpp @@ -13,7 +13,7 @@ #if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) #include -#include +#include #include #include #include @@ -65,7 +65,7 @@ int main () typedef allocator allocator_int_t; //A vector that uses that allocator - typedef boost::interprocess::vector MyVect; + typedef boost::container::vector MyVect; { //Remove the shmem it is already created diff --git a/test/map_test.hpp b/test/map_test.hpp index 087573a..994fcfa 100644 --- a/test/map_test.hpp +++ b/test/map_test.hpp @@ -15,8 +15,6 @@ #include "check_equal_containers.hpp" #include -// interprocess -#include // interprocess/detail #include // intrusive/detail @@ -46,8 +44,8 @@ template IntPairType; typedef typename MyStdMap::value_type StdPairType; + typedef typename MyShmMap::value_type IntPairType; const int Memsize = 128u * 1024u; const char *const shMemName = test::get_process_id_name(); const int max = 100; @@ -136,7 +134,7 @@ int map_test () MyShmMap *shmmap3 = segment.template construct("MyShmMap3") - ( ordered_unique_range + ( boost::container::ordered_unique_range , ::boost::make_move_iterator(&aux_vect[0]) , ::boost::make_move_iterator(aux_vect + 50) , std::less(), segment.get_segment_manager()); @@ -145,7 +143,7 @@ int map_test () MyShmMultiMap *shmmultimap3 = segment.template construct("MyShmMultiMap3") - ( ordered_range + (boost::container::ordered_range , ::boost::make_move_iterator(&aux_vect3[0]) , ::boost::make_move_iterator(aux_vect3 + 50) , std::less(), segment.get_segment_manager()); @@ -500,7 +498,7 @@ template IntPairType; + typedef typename MyShmMap::value_type IntPairType; typedef typename MyStdMap::value_type StdPairType; const int Memsize = 128u * 1024u; diff --git a/test/mapped_file_test.cpp b/test/mapped_file_test.cpp index 8260c7c..d72ebb1 100644 --- a/test/mapped_file_test.cpp +++ b/test/mapped_file_test.cpp @@ -12,7 +12,7 @@ #if defined(BOOST_INTERPROCESS_MAPPED_FILES) #include -#include +#include #include #include #include diff --git a/test/memory_algorithm_test_template.hpp b/test/memory_algorithm_test_template.hpp index 597e723..9ecf725 100644 --- a/test/memory_algorithm_test_template.hpp +++ b/test/memory_algorithm_test_template.hpp @@ -13,7 +13,7 @@ #include -#include +#include #include #include @@ -865,7 +865,7 @@ bool test_many_deallocation(Allocator &a) typedef typename Allocator::multiallocation_chain multiallocation_chain; const std::size_t ArraySize = 11; - vector buffers; + boost::container::vector buffers; typename Allocator::size_type requested_sizes[ArraySize]; for(std::size_t i = 0; i < ArraySize; ++i){ requested_sizes[i] = 4*i; diff --git a/test/message_queue_test.cpp b/test/message_queue_test.cpp index 004939f..81df9b0 100644 --- a/test/message_queue_test.cpp +++ b/test/message_queue_test.cpp @@ -11,8 +11,8 @@ #include #include #include -#include -#include +#include +#include #include #include // intrusive/detail @@ -121,7 +121,7 @@ bool test_serialize_db() typedef std::less MyLess; typedef node_allocator node_allocator_t; - typedef map, node_allocator_t> @@ -433,4 +433,3 @@ int main () message_queue::remove(test::get_process_id_name()); return ret; } - diff --git a/test/mp_managed_shared_memory_test.cpp b/test/mp_managed_shared_memory_test.cpp index e966400..0f22b57 100644 --- a/test/mp_managed_shared_memory_test.cpp +++ b/test/mp_managed_shared_memory_test.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include @@ -29,7 +29,7 @@ struct shm_remove const std::size_t MemSize = 64u*1024u; -typedef list > +typedef boost::container::list > MyList; int main(int argc, char *argv[]) diff --git a/test/mutex_owner_dead_test.cpp b/test/mutex_owner_dead_test.cpp index 0f21786..87031f9 100644 --- a/test/mutex_owner_dead_test.cpp +++ b/test/mutex_owner_dead_test.cpp @@ -12,7 +12,6 @@ //Robust mutex handling is only supported in conforming POSIX systems #if !defined(BOOST_INTERPROCESS_POSIX_PROCESS_SHARED) || !defined(BOOST_INTERPROCESS_POSIX_ROBUST_MUTEXES) - int main() { return 0; @@ -132,13 +131,13 @@ int main () { using namespace boost::interprocess; int ret; - std::cerr << "Testing interprocess_mutex"; + std::cerr << "Testing interprocess_mutex\n"; ret = test::test_owner_dead_mutex(); if (ret) return ret; #ifdef BOOST_INTERPROCESS_POSIX_RECURSIVE_MUTEXES - std::cerr << "Testing interprocess_recursive_mutex"; + std::cerr << "Testing interprocess_recursive_mutex\n"; ret = test::test_owner_dead_mutex(); if (ret) return ret; diff --git a/test/node_allocator_test.cpp b/test/node_allocator_test.cpp index 1d279d1..c70a159 100644 --- a/test/node_allocator_test.cpp +++ b/test/node_allocator_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include -#include +#include +#include #include #include "print_container.hpp" #include "dummy_test_allocator.hpp" @@ -42,12 +42,12 @@ template class ipcdetail::node_allocator_v1 MyShmList; -typedef list MyShmListV1; +typedef boost::container::list MyShmList; +typedef boost::container::list MyShmListV1; //Alias vector types -typedef vector MyShmVector; -typedef vector MyShmVectorV1; +typedef boost::container::vector MyShmVector; +typedef boost::container::vector MyShmVectorV1; int main () { diff --git a/test/private_adaptive_pool_test.cpp b/test/private_adaptive_pool_test.cpp index b946d70..9a9bd43 100644 --- a/test/private_adaptive_pool_test.cpp +++ b/test/private_adaptive_pool_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include -#include +#include +#include #include #include "print_container.hpp" #include "dummy_test_allocator.hpp" @@ -42,12 +42,12 @@ template class ipcdetail::private_adaptive_pool_v1 MyShmList; -typedef list MyShmListV1; +typedef boost::container::list MyShmList; +typedef boost::container::list MyShmListV1; //Alias vector types -typedef vector MyShmVector; -typedef vector MyShmVectorV1; +typedef boost::container::vector MyShmVector; +typedef boost::container::vector MyShmVectorV1; int main () { diff --git a/test/private_node_allocator_test.cpp b/test/private_node_allocator_test.cpp index 5498394..e74756f 100644 --- a/test/private_node_allocator_test.cpp +++ b/test/private_node_allocator_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include -#include +#include +#include #include #include "print_container.hpp" #include "dummy_test_allocator.hpp" @@ -42,12 +42,12 @@ template class ipcdetail::private_node_allocator_v1 MyShmList; -typedef list MyShmListV1; +typedef boost::container::list MyShmList; +typedef boost::container::list MyShmListV1; //Alias vector types -typedef vector MyShmVector; -typedef vector MyShmVectorV1; +typedef boost::container::vector MyShmVector; +typedef boost::container::vector MyShmVectorV1; int main () { diff --git a/test/set_test.hpp b/test/set_test.hpp index e17014e..60742c0 100644 --- a/test/set_test.hpp +++ b/test/set_test.hpp @@ -114,7 +114,7 @@ int set_test () MyShmSet *shmset3 = segment.template construct("MyShmSet3") - ( ordered_unique_range + (boost::container::ordered_unique_range , ::boost::make_move_iterator(&aux_vect[0]) , ::boost::make_move_iterator(aux_vect + 50) , std::less(), segment.get_segment_manager()); @@ -123,7 +123,7 @@ int set_test () MyShmMultiSet *shmmultiset3 = segment.template construct("MyShmMultiSet3") - ( ordered_range + (boost::container::ordered_range , ::boost::make_move_iterator(&aux_vect3[0]) , ::boost::make_move_iterator(aux_vect3 + 50) , std::less(), segment.get_segment_manager()); diff --git a/test/shared_ptr_test.cpp b/test/shared_ptr_test.cpp index 4370d96..9f6b079 100644 --- a/test/shared_ptr_test.cpp +++ b/test/shared_ptr_test.cpp @@ -16,8 +16,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -101,7 +101,7 @@ int string_shared_ptr_vector_insertion_test() typedef allocator char_allocator_t; //A shared memory string class - typedef basic_string, char_allocator_t> string_t; + typedef boost::container::basic_string, char_allocator_t> string_t; //A shared memory string allocator typedef allocator string_allocator_t; @@ -122,11 +122,11 @@ int string_shared_ptr_vector_insertion_test() typedef allocator string_weak_ptr_allocator_t; //A vector of shared pointers to strings (all in shared memory) and its instantiation - typedef vector + typedef boost::container::vector string_shared_ptr_vector_t; //A vector of weak pointers to strings (all in shared memory) and its instantiation - typedef vector + typedef boost::container::vector string_weak_ptr_vector_t; std::string process_name; diff --git a/test/slist_test.cpp b/test/slist_test.cpp index 8cc2d7d..6d1eb2a 100644 --- a/test/slist_test.cpp +++ b/test/slist_test.cpp @@ -8,7 +8,7 @@ // ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include #include "dummy_test_allocator.hpp" @@ -19,19 +19,18 @@ using namespace boost::interprocess; typedef allocator ShmemAllocator; -typedef slist MyList; +typedef boost::container::slist MyList; + -//typedef allocator ShmemVolatileAllocator; -//typedef slist MyVolatileList; typedef allocator ShmemMoveAllocator; -typedef slist MyMoveList; +typedef boost::container::slist MyMoveList; typedef allocator ShmemCopyMoveAllocator; -typedef slist MyCopyMoveList; +typedef boost::container::slist MyCopyMoveList; typedef allocator ShmemCopyAllocator; -typedef slist MyCopyList; +typedef boost::container::slist MyCopyList; int main () { @@ -51,7 +50,7 @@ int main () (test::EMPLACE_FRONT | test::EMPLACE_AFTER | test::EMPLACE_BEFORE | test::EMPLACE_AFTER); if(!boost::interprocess::test::test_emplace - < slist, Options>()) + < boost::container::slist, Options>()) return 1; return 0; } diff --git a/test/stable_vector_test.cpp b/test/stable_vector_test.cpp index 56040c8..503134d 100644 --- a/test/stable_vector_test.cpp +++ b/test/stable_vector_test.cpp @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include "allocator_v1.hpp" #include "heap_allocator_v1.hpp" @@ -25,22 +25,22 @@ using namespace boost::interprocess; int main() { typedef allocator ShmemAllocator; - typedef stable_vector MyVector; + typedef boost::container::stable_vector MyVector; typedef test::allocator_v1 ShmemV1Allocator; - typedef stable_vector MyV1Vector; + typedef boost::container::stable_vector MyV1Vector; typedef test::heap_allocator_v1 ShmemHeapV1Allocator; - typedef stable_vector MyHeapV1Vector; + typedef boost::container::stable_vector MyHeapV1Vector; typedef allocator ShmemMoveAllocator; - typedef stable_vector MyMoveVector; + typedef boost::container::stable_vector MyMoveVector; typedef allocator ShmemCopyMoveAllocator; - typedef stable_vector MyCopyMoveVector; + typedef boost::container::stable_vector MyCopyMoveVector; typedef allocator ShmemCopyAllocator; - typedef stable_vector MyCopyVector; + typedef boost::container::stable_vector MyCopyVector; if(test::vector_test()) return 1; @@ -62,7 +62,7 @@ int main() const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_BEFORE); if(!boost::interprocess::test::test_emplace - < stable_vector, Options>()) + < boost::container::stable_vector, Options>()) return 1; return 0; diff --git a/test/string_test.cpp b/test/string_test.cpp index c389e5c..aefe5a9 100644 --- a/test/string_test.cpp +++ b/test/string_test.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -29,10 +29,10 @@ using namespace boost::interprocess; typedef test::dummy_test_allocator DummyCharAllocator; -typedef basic_string, DummyCharAllocator> DummyString; +typedef boost::container::basic_string, DummyCharAllocator> DummyString; typedef test::dummy_test_allocator DummyStringAllocator; typedef test::dummy_test_allocator DummyWCharAllocator; -typedef basic_string, DummyWCharAllocator> DummyWString; +typedef boost::container::basic_string, DummyWCharAllocator> DummyWString; typedef test::dummy_test_allocator DummyWStringAllocator; struct StringEqual @@ -62,11 +62,11 @@ int string_test() typedef std::allocator StdAllocatorChar; typedef std::basic_string, StdAllocatorChar> StdString; typedef std::allocator StdStringAllocator; - typedef vector StdStringVector; + typedef boost::container::vector StdStringVector; typedef AllocatorType ShmemAllocatorChar; - typedef basic_string, ShmemAllocatorChar> ShmString; + typedef boost::container::basic_string, ShmemAllocatorChar> ShmString; typedef AllocatorType ShmemStringAllocator; - typedef vector ShmStringVector; + typedef boost::container::vector ShmStringVector; const int MaxSize = 100; @@ -264,7 +264,7 @@ bool test_expand_bwd() //Now test all back insertion possibilities typedef test::expand_bwd_test_allocator allocator_type; - typedef basic_string, allocator_type> + typedef boost::container::basic_string, allocator_type> string_type; return test::test_all_expand_bwd(); } @@ -274,7 +274,7 @@ bool vector_of_strings_test() using namespace boost::interprocess; typedef allocator ShmCharAllocator; typedef allocator ShmIntAllocator; - typedef basic_string, ShmCharAllocator > ShmString; + typedef boost::container::basic_string, ShmCharAllocator > ShmString; typedef allocator ShmStringAllocator; const char *memoryName = "test_memory"; @@ -285,8 +285,8 @@ bool vector_of_strings_test() ShmStringAllocator stringAllocator(shm.get_segment_manager()); ShmIntAllocator intAllocator(shm.get_segment_manager()); - vector vectorOfStrings(stringAllocator); - vector vectorOfInts(intAllocator); + boost::container::vector vectorOfStrings(stringAllocator); + boost::container::vector vectorOfInts(intAllocator); { ShmString z("aaaaaaaa", stringAllocator); diff --git a/test/tree_test.cpp b/test/tree_test.cpp index 53bc654..8670ab4 100644 --- a/test/tree_test.cpp +++ b/test/tree_test.cpp @@ -9,8 +9,8 @@ ////////////////////////////////////////////////////////////////////////////// #include #include -#include -#include +#include +#include #include #include #include @@ -63,44 +63,44 @@ typedef std::map MyStdMap; typedef std::multimap MyStdMultiMap; //Alias non-movable types -typedef set, shmem_allocator_t> MyShmSet; -typedef multiset, shmem_allocator_t> MyShmMultiSet; -typedef map, shmem_node_pair_allocator_t> MyShmMap; -typedef multimap, shmem_node_pair_allocator_t> MyShmMultiMap; +typedef boost::container::set, shmem_allocator_t> MyShmSet; +typedef boost::container::multiset, shmem_allocator_t> MyShmMultiSet; +typedef boost::container::map, shmem_node_pair_allocator_t> MyShmMap; +typedef boost::container::multimap, shmem_node_pair_allocator_t> MyShmMultiMap; //Alias movable types -typedef set +typedef boost::container::set ,shmem_movable_allocator_t> MyMovableShmSet; -typedef multiset, shmem_movable_allocator_t> MyMovableShmMultiSet; -typedef map, shmem_movable_node_pair_allocator_t> MyMovableShmMap; -typedef multimap, shmem_movable_node_pair_allocator_t> MyMovableShmMultiMap; -typedef set ,shmem_move_copy_allocator_t> MyMoveCopyShmSet; -typedef multiset, shmem_move_copy_allocator_t> MyMoveCopyShmMultiSet; -typedef set ,shmem_copy_allocator_t> MyCopyShmSet; -typedef multiset, shmem_copy_allocator_t> MyCopyShmMultiSet; -typedef map ,shmem_move_copy_node_pair_allocator_t> MyMoveCopyShmMap; -typedef multimap ,shmem_move_copy_node_pair_allocator_t> MyMoveCopyShmMultiMap; @@ -182,14 +182,14 @@ int main () } const test::EmplaceOptions SetOptions = (test::EmplaceOptions)(test::EMPLACE_HINT | test::EMPLACE_ASSOC); - if(!boost::interprocess::test::test_emplace, SetOptions>()) + if(!boost::interprocess::test::test_emplace, SetOptions>()) return 1; - if(!boost::interprocess::test::test_emplace, SetOptions>()) + if(!boost::interprocess::test::test_emplace, SetOptions>()) return 1; const test::EmplaceOptions MapOptions = (test::EmplaceOptions)(test::EMPLACE_HINT_PAIR | test::EMPLACE_ASSOC_PAIR); - if(!boost::interprocess::test::test_emplace, MapOptions>()) + if(!boost::interprocess::test::test_emplace, MapOptions>()) return 1; - if(!boost::interprocess::test::test_emplace, MapOptions>()) + if(!boost::interprocess::test::test_emplace, MapOptions>()) return 1; return 0; diff --git a/test/unique_ptr_test.cpp b/test/unique_ptr_test.cpp index f0aa483..54aac93 100644 --- a/test/unique_ptr_test.cpp +++ b/test/unique_ptr_test.cpp @@ -12,9 +12,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -30,18 +30,18 @@ class MyClass }; typedef managed_unique_ptr::type my_unique_ptr_class; -typedef set ,allocator > MySet; -typedef list > MyList; -typedef vector > MyVector; diff --git a/test/user_buffer_test.cpp b/test/user_buffer_test.cpp index 073a433..ace3761 100644 --- a/test/user_buffer_test.cpp +++ b/test/user_buffer_test.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -38,8 +38,8 @@ typedef node_allocator heap_node_allocator_t; //Alias list types -typedef list MyUserList; -typedef list MyHeapList; +typedef boost::container::list MyUserList; +typedef boost::container::list MyHeapList; typedef std::list MyStdList; //Function to check if both lists are equal diff --git a/test/vector_test.cpp b/test/vector_test.cpp index 87c976f..7bcf04d 100644 --- a/test/vector_test.cpp +++ b/test/vector_test.cpp @@ -9,7 +9,7 @@ ////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include "allocator_v1.hpp" #include "check_equal_containers.hpp" @@ -28,7 +28,7 @@ int test_expand_bwd() //First raw ints typedef test::expand_bwd_test_allocator int_allocator_type; - typedef vector + typedef boost::container::vector int_vector; if(!test::test_all_expand_bwd()) @@ -37,7 +37,7 @@ int test_expand_bwd() //Now user defined wrapped int typedef test::expand_bwd_test_allocator int_holder_allocator_type; - typedef vector + typedef boost::container::vector int_holder_vector; if(!test::test_all_expand_bwd()) @@ -47,7 +47,7 @@ int test_expand_bwd() typedef test::expand_bwd_test_allocator triple_int_holder_allocator_type; - typedef vector + typedef boost::container::vector triple_int_holder_vector; if(!test::test_all_expand_bwd()) @@ -59,19 +59,19 @@ int test_expand_bwd() int main() { typedef allocator ShmemAllocator; - typedef vector MyVector; + typedef boost::container::vector MyVector; typedef test::allocator_v1 ShmemV1Allocator; - typedef vector MyV1Vector; + typedef boost::container::vector MyV1Vector; typedef allocator ShmemMoveAllocator; - typedef vector MyMoveVector; + typedef boost::container::vector MyMoveVector; typedef allocator ShmemCopyMoveAllocator; - typedef vector MyCopyMoveVector; + typedef boost::container::vector MyCopyMoveVector; typedef allocator ShmemCopyAllocator; - typedef vector MyCopyVector; + typedef boost::container::vector MyCopyVector; if(test::vector_test()) return 1; @@ -93,7 +93,7 @@ int main() const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_BEFORE); if(!boost::interprocess::test::test_emplace - < vector, Options>()) + < boost::container::vector, Options>()) return 1; return 0; diff --git a/test/vectorstream_test.cpp b/test/vectorstream_test.cpp index 156adc8..88f8a8f 100644 --- a/test/vectorstream_test.cpp +++ b/test/vectorstream_test.cpp @@ -8,8 +8,8 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include +#include #include #include #include @@ -22,9 +22,9 @@ namespace boost { namespace interprocess { //Force instantiations to catch compile-time errors -typedef basic_string my_string; +typedef boost::container::basic_string my_string; typedef basic_vectorstream my_stringstream_t; -typedef vector my_vector; +typedef boost::container::vector my_vector; typedef basic_vectorstream my_vectorstream_t; template class basic_vectorstream; template class basic_vectorstream >; @@ -153,7 +153,7 @@ static int vectorstream_test() my_stringstream << "ABCDEFGHIJKLM"; my_stringstream.seekp(0); my_stringstream << "PQRST"; - string s("PQRSTFGHIJKLM"); + boost::container::string s("PQRSTFGHIJKLM"); if(s != my_stringstream.vector()){ return 1; }