|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70069 - in trunk/libs/interprocess: doc example proj proj/vc7ide test
From: igaztanaga_at_[hidden]
Date: 2011-03-17 12:42:37
Author: igaztanaga
Date: 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
New Revision: 70069
URL: http://svn.boost.org/trac/boost/changeset/70069
Log:
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.
Text files modified:
trunk/libs/interprocess/doc/Jamfile.v2 | 8
trunk/libs/interprocess/doc/interprocess.qbk | 22 ++-
trunk/libs/interprocess/example/comp_doc_message_queueB.cpp | 2
trunk/libs/interprocess/example/doc_ipc_message.cpp | 2
trunk/libs/interprocess/example/doc_managed_allocation_command.cpp | 13 +-
trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp | 2
trunk/libs/interprocess/example/doc_managed_heap_memory.cpp | 4
trunk/libs/interprocess/example/doc_managed_mapped_file.cpp | 4
trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp | 2
trunk/libs/interprocess/example/doc_named_alloc.cpp | 2
trunk/libs/interprocess/proj/to-do.txt | 2
trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj | 201 ++++++++++++++++++++++++++++++++++++++++
trunk/libs/interprocess/test/allocator_v1.hpp | 4
trunk/libs/interprocess/test/deque_test.cpp | 10
trunk/libs/interprocess/test/emplace_test.hpp | 12 +
trunk/libs/interprocess/test/flat_tree_test.cpp | 1
trunk/libs/interprocess/test/heap_allocator_v1.hpp | 4
trunk/libs/interprocess/test/list_test.hpp | 8
trunk/libs/interprocess/test/managed_mapped_file_test.cpp | 4
trunk/libs/interprocess/test/managed_shared_memory_test.cpp | 4
trunk/libs/interprocess/test/map_test.hpp | 28 ++--
trunk/libs/interprocess/test/memory_algorithm_test.cpp | 4
trunk/libs/interprocess/test/memory_algorithm_test_template.hpp | 56 +++++-----
trunk/libs/interprocess/test/message_queue_test.cpp | 19 +-
trunk/libs/interprocess/test/movable_int.hpp | 14 +-
trunk/libs/interprocess/test/named_allocation_test_template.hpp | 2
trunk/libs/interprocess/test/named_construct_test.cpp | 6
trunk/libs/interprocess/test/node_pool_test.hpp | 4
trunk/libs/interprocess/test/set_test.hpp | 36 +++---
trunk/libs/interprocess/test/string_test.cpp | 2
trunk/libs/interprocess/test/user_buffer_test.cpp | 9
trunk/libs/interprocess/test/vector_test.hpp | 12 +-
32 files changed, 359 insertions(+), 144 deletions(-)
Modified: trunk/libs/interprocess/doc/Jamfile.v2
==============================================================================
--- trunk/libs/interprocess/doc/Jamfile.v2 (original)
+++ trunk/libs/interprocess/doc/Jamfile.v2 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -30,10 +30,10 @@
<doxygen:param>MACRO_EXPANSION=YES
<doxygen:param>"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 &&\""
<xsl:param>"boost.doxygen.reftitle=Boost.Interprocess Reference"
;
Modified: trunk/libs/interprocess/doc/interprocess.qbk
==============================================================================
--- trunk/libs/interprocess/doc/interprocess.qbk (original)
+++ trunk/libs/interprocess/doc/interprocess.qbk 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -691,9 +691,6 @@
[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 @@
[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 @@
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 @@
[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 @@
[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
Modified: trunk/libs/interprocess/example/comp_doc_message_queueB.cpp
==============================================================================
--- trunk/libs/interprocess/example/comp_doc_message_queueB.cpp (original)
+++ trunk/libs/interprocess/example/comp_doc_message_queueB.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -25,7 +25,7 @@
);
unsigned int priority;
- std::size_t recvd_size;
+ message_queue::size_type recvd_size;
//Receive 100 numbers
for(int i = 0; i < 100; ++i){
Modified: trunk/libs/interprocess/example/doc_ipc_message.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_ipc_message.cpp (original)
+++ trunk/libs/interprocess/example/doc_ipc_message.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -49,7 +49,7 @@
//->
//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
Modified: trunk/libs/interprocess/example/doc_managed_allocation_command.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_allocation_command.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_allocation_command.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -48,7 +48,8 @@
//->
//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<std::size_t>
(boost::interprocess::allocate_new, min_size, preferred_size, received_size).first;
@@ -56,7 +57,7 @@
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 @@
//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<std::size_t *, bool> ret = managed_shm.allocation_command
(boost::interprocess::expand_fwd, received_size*2, received_size*3, expanded_size, ptr);
@@ -75,7 +76,7 @@
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 @@
//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 @@
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
Modified: trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_copy_on_write.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -70,7 +70,7 @@
std::fstream file(ManagedFile2, std::ios_base::out | std::ios_base::binary);
if(!file)
throw int(0);
- file.write(static_cast<const char *>(managed_file_cow.get_address()), managed_file_cow.get_size());
+ file.write(static_cast<const char *>(managed_file_cow.get_address()), (std::streamsize)managed_file_cow.get_size());
}
//Now open the modified file and test changes
Modified: trunk/libs/interprocess/example/doc_managed_heap_memory.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_heap_memory.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_heap_memory.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -40,7 +40,7 @@
//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 @@
}
//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);
Modified: trunk/libs/interprocess/example/doc_managed_mapped_file.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_mapped_file.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_mapped_file.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -43,7 +43,7 @@
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 @@
}
//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);
Modified: trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp (original)
+++ trunk/libs/interprocess/example/doc_managed_multiple_allocation.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -76,7 +76,7 @@
}
//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;
Modified: trunk/libs/interprocess/example/doc_named_alloc.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_named_alloc.cpp (original)
+++ trunk/libs/interprocess/example/doc_named_alloc.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -106,7 +106,7 @@
#endif
//->
- std::pair<MyType*, std::size_t> res;
+ std::pair<MyType*, managed_shared_memory::size_type> res;
//Find the array
res = segment.find<MyType> ("MyType array");
Modified: trunk/libs/interprocess/proj/to-do.txt
==============================================================================
--- trunk/libs/interprocess/proj/to-do.txt (original)
+++ trunk/libs/interprocess/proj/to-do.txt 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -97,7 +97,7 @@
-> 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.)
Modified: trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj
==============================================================================
--- trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj (original)
+++ trunk/libs/interprocess/proj/vc7ide/interprocesslib.vcproj 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -99,6 +99,9 @@
Name="Containers"
Filter="">
<File
+ RelativePath="..\..\..\..\boost\interprocess\containers\allocation_type.hpp">
+ </File>
+ <File
RelativePath="..\..\..\..\boost\interprocess\containers\containers_fwd.hpp">
</File>
<File
@@ -117,6 +120,9 @@
RelativePath="..\..\..\..\boost\interprocess\containers\map.hpp">
</File>
<File
+ RelativePath="..\..\..\..\boost\interprocess\containers\pair.hpp">
+ </File>
+ <File
RelativePath="..\..\..\..\boost\interprocess\containers\set.hpp">
</File>
<File
@@ -131,6 +137,128 @@
<File
RelativePath="..\..\..\..\boost\interprocess\containers\vector.hpp">
</File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\version_type.hpp">
+ </File>
+ <Filter
+ Name="container"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\container_fwd.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\deque.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\flat_map.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\flat_set.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\list.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\map.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\set.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\slist.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\stable_vector.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\string.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\vector.hpp">
+ </File>
+ <Filter
+ Name="detail"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\adaptive_node_pool_impl.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\advanced_insert_int.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\algorithms.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\allocation_type.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\config_begin.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\config_end.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\destroyers.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\flat_tree.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\iterators.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\math_functions.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\mpl.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\multiallocation_chain.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\node_alloc_holder.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\node_pool_impl.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\pair.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\pool_common.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\preprocessor.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\stored_ref.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\transform_iterator.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\tree.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\type_traits.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\utilities.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\value_init.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\variadic_templates_tools.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\version_type.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\containers\container\detail\workaround.hpp">
+ </File>
+ </Filter>
+ </Filter>
</Filter>
<Filter
Name="Allocators"
@@ -283,6 +411,19 @@
RelativePath="..\..\..\..\boost\interprocess\sync\emulation\semaphore.hpp">
</File>
</Filter>
+ <Filter
+ Name="xsi"
+ Filter="">
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\sync\xsi\advanced_xsi_semaphore.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\sync\xsi\simple_xsi_semaphore.hpp">
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\interprocess\sync\xsi\xsi_named_mutex.hpp">
+ </File>
+ </Filter>
</Filter>
<Filter
Name="Memory algorithms"
@@ -621,6 +762,36 @@
Name="Example"
Filter="">
<File
+ RelativePath="..\..\example\comp_doc_anonymous_conditionA.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_conditionB.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_mutexA.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_mutexB.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_semaphoreA.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_semaphoreB.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_upgradable_mutexA.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_anonymous_upgradable_mutexB.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_message_queueA.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\comp_doc_message_queueB.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_adaptive_pool.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -720,6 +891,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_anonymous_shared_memory.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_anonymous_upgradable_mutexA.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -765,6 +939,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_complex_map.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_cont.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -819,6 +996,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_ipc_message.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_ipc_messageA.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -864,6 +1044,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_managed_copy_on_write.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_managed_external_buffer.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -873,6 +1056,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_managed_grow.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_managed_heap_memory.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -945,6 +1131,12 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_multi_index.cpp">
+ </File>
+ <File
+ RelativePath="..\..\example\doc_named_alloc.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_named_allocA.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -1062,6 +1254,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_spawn_vector.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_unique_ptr.cpp">
<FileConfiguration
Name="Debug|Win32"
@@ -1071,6 +1266,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_unordered_map.cpp">
+ </File>
+ <File
RelativePath="..\..\example\doc_upgradable_mutex_shared_data.hpp">
<FileConfiguration
Name="Debug|Win32"
@@ -1116,6 +1314,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\example\doc_xsi_shared_memory.cpp">
+ </File>
+ <File
RelativePath="..\..\example\Jamfile.v2">
<FileConfiguration
Name="Debug|Win32"
Modified: trunk/libs/interprocess/test/allocator_v1.hpp
==============================================================================
--- trunk/libs/interprocess/test/allocator_v1.hpp (original)
+++ trunk/libs/interprocess/test/allocator_v1.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -74,8 +74,8 @@
<value_type>::type reference;
typedef typename detail::add_reference
<const value_type>::type const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
+ typedef typename segment_manager::size_type size_type;
+ typedef typename segment_manager::difference_type difference_type;
//!Obtains an allocator_v1 of other type
template<class T2>
Modified: trunk/libs/interprocess/test/deque_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/deque_test.cpp (original)
+++ trunk/libs/interprocess/test/deque_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -227,8 +227,8 @@
}
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 @@
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_<!::boost::interprocess::is_movable<IntType>::value>())){
+ ,detail::bool_<!detail::is_same<IntType, test::movable_int>::value>())){
return false;
}
Modified: trunk/libs/interprocess/test/emplace_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/emplace_test.hpp (original)
+++ trunk/libs/interprocess/test/emplace_test.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -25,19 +25,21 @@
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_;
Modified: trunk/libs/interprocess/test/flat_tree_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/flat_tree_test.cpp (original)
+++ trunk/libs/interprocess/test/flat_tree_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -123,6 +123,7 @@
,std::less<test::movable_and_copyable_int>
,shmem_move_copy_pair_allocator_t> MyMoveCopyShmMultiMap;
+
//Test recursive structures
class recursive_flat_set
{
Modified: trunk/libs/interprocess/test/heap_allocator_v1.hpp
==============================================================================
--- trunk/libs/interprocess/test/heap_allocator_v1.hpp (original)
+++ trunk/libs/interprocess/test/heap_allocator_v1.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -74,8 +74,8 @@
<value_type>::type reference;
typedef typename detail::add_reference
<const value_type>::type const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
+ typedef typename SegmentManager::size_type size_type;
+ typedef typename SegmentManager::difference_type difference_type;
//!Obtains an heap_allocator_v1 of other type
template<class T2>
Modified: trunk/libs/interprocess/test/list_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/list_test.hpp (original)
+++ trunk/libs/interprocess/test/list_test.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -145,8 +145,8 @@
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 @@
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]);
}
Modified: trunk/libs/interprocess/test/managed_mapped_file_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/managed_mapped_file_test.cpp (original)
+++ trunk/libs/interprocess/test/managed_mapped_file_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -136,7 +136,7 @@
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 @@
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
Modified: trunk/libs/interprocess/test/managed_shared_memory_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/managed_shared_memory_test.cpp (original)
+++ trunk/libs/interprocess/test/managed_shared_memory_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -124,7 +124,7 @@
}
#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 @@
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
Modified: trunk/libs/interprocess/test/map_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/map_test.hpp (original)
+++ trunk/libs/interprocess/test/map_test.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -94,16 +94,16 @@
MyShmMap *shmmap2 =
segment.template construct<MyShmMap>("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<IntType>(), segment.get_segment_manager());
MyStdMap *stdmap2 = new MyStdMap(aux_vect2, aux_vect2 + 50);
MyShmMultiMap *shmmultimap2 =
segment.template construct<MyShmMultiMap>("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<IntType>(), segment.get_segment_manager());
MyStdMultiMap *stdmultimap2 = new MyStdMultiMap(aux_vect2, aux_vect2 + 50);
@@ -131,8 +131,8 @@
MyShmMap *shmmap3 =
segment.template construct<MyShmMap>("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<IntType>(), segment.get_segment_manager());
MyStdMap *stdmap3 = new MyStdMap(aux_vect2, aux_vect2 + 50);
@@ -140,8 +140,8 @@
MyShmMultiMap *shmmultimap3 =
segment.template construct<MyShmMultiMap>("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<IntType>(), segment.get_segment_manager());
MyStdMultiMap *stdmultimap3 = new MyStdMultiMap(aux_vect2, aux_vect2 + 50);
@@ -240,8 +240,8 @@
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 @@
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);
Modified: trunk/libs/interprocess/test/memory_algorithm_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/memory_algorithm_test.cpp (original)
+++ trunk/libs/interprocess/test/memory_algorithm_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -15,6 +15,7 @@
#include <boost/interprocess/indexes/null_index.hpp>
#include <boost/interprocess/sync/mutex_family.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
+#include <boost/type_traits/alignment_of.hpp>
#include "memory_algorithm_test_template.hpp"
#include <iostream>
#include <string>
@@ -68,7 +69,8 @@
int main ()
{
- const std::size_t void_ptr_align = detail::alignment_of<void*>::value;
+ const std::size_t void_ptr_align = ::boost::alignment_of<offset_ptr<void> >::value;
+
if(test_simple_seq_fit()){
return 1;
}
Modified: trunk/libs/interprocess/test/memory_algorithm_test_template.hpp
==============================================================================
--- trunk/libs/interprocess/test/memory_algorithm_test_template.hpp (original)
+++ trunk/libs/interprocess/test/memory_algorithm_test_template.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -32,13 +32,13 @@
; t != EndDeallocationType
; t = (deallocation_type)((int)t + 1)){
std::vector<void*> 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 @@
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 @@
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<char>
( boost::interprocess::shrink_in_place | boost::interprocess::nothrow_allocation, i*2
, i, received_size, static_cast<char*>(buffers[i])).first){
@@ -115,7 +115,7 @@
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 @@
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 @@
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 @@
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 @@
bool test_allocation_shrink_and_expand(Allocator &a)
{
std::vector<void*> buffers;
- std::vector<std::size_t> received_sizes;
+ std::vector<typename Allocator::size_type> received_sizes;
std::vector<bool> 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<char>
( boost::interprocess::allocate_new | boost::interprocess::nothrow_allocation, i, i*2, received_size).first;
if(!ptr){
@@ -212,7 +212,7 @@
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<char>
( boost::interprocess::shrink_in_place | boost::interprocess::nothrow_allocation, received_sizes[i]
, i, received_size, static_cast<char*>(buffers[i])).first){
@@ -230,7 +230,7 @@
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<char>
( boost::interprocess::expand_fwd | boost::interprocess::nothrow_allocation, request_size
@@ -292,7 +292,7 @@
;++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 @@
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 @@
{
std::vector<void*> 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 @@
--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 @@
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<void*> buffers2;
@@ -649,7 +649,7 @@
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 @@
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 @@
{
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 @@
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<void*> buffers2;
@@ -765,7 +765,7 @@
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 @@
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 @@
typedef typename Allocator::multiallocation_chain multiallocation_chain;
const std::size_t ArraySize = 11;
vector<multiallocation_chain> 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){
Modified: trunk/libs/interprocess/test/message_queue_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/message_queue_test.cpp (original)
+++ trunk/libs/interprocess/test/message_queue_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -45,7 +45,7 @@
//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 @@
//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<char*>(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 @@
managed_external_buffer db_destiny(open_only, &buffer_destiny[0], BufferSize);
//Let's find the map
- std::pair<MyMap *, std::size_t> ret = db_destiny.find<MyMap>("MyMap");
+ std::pair<MyMap *, managed_external_buffer::size_type> ret = db_destiny.find<MyMap>("MyMap");
MyMap *map2 = ret.first;
//Check if we have found it
@@ -182,7 +182,8 @@
}
//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 @@
void receiver()
{
- std::size_t recvd_size;
+ boost::interprocess::message_queue::size_type recvd_size;
unsigned int priority;
int nummsg = NumMsg;
Modified: trunk/libs/interprocess/test/movable_int.hpp
==============================================================================
--- trunk/libs/interprocess/test/movable_int.hpp (original)
+++ trunk/libs/interprocess/test/movable_int.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -21,7 +21,7 @@
class movable_int
{
- BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(movable_int)
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(movable_int)
public:
@@ -33,11 +33,11 @@
: 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 @@
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 @@
: 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)
Modified: trunk/libs/interprocess/test/named_allocation_test_template.hpp
==============================================================================
--- trunk/libs/interprocess/test/named_allocation_test_template.hpp (original)
+++ trunk/libs/interprocess/test/named_allocation_test_template.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -129,7 +129,7 @@
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;
}
Modified: trunk/libs/interprocess/test/named_construct_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/named_construct_test.cpp (original)
+++ trunk/libs/interprocess/test/named_construct_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -135,7 +135,7 @@
if(NameGenerator::searchable){
{
- std::pair<simple_type*, std::size_t> res;
+ std::pair<simple_type*, managed_shared_memory::size_type> res;
//Find the object
res = segment.find<simple_type> (NameGenerator::get_simple_name());
//Length should be 1
@@ -147,7 +147,7 @@
return 1;
}
{
- std::pair<array_type*, std::size_t> res;
+ std::pair<array_type*, managed_shared_memory::size_type> res;
//Find the array
res = segment.find<array_type> (NameGenerator::get_array_name());
@@ -160,7 +160,7 @@
return 1;
}
{
- std::pair<array_it_type*, std::size_t> res;
+ std::pair<array_it_type*, managed_shared_memory::size_type> res;
//Find the array constructed from iterators
res = segment.find<array_it_type> (NameGenerator::get_array_it_name());
//Length should be 3
Modified: trunk/libs/interprocess/test/node_pool_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/node_pool_test.hpp (original)
+++ trunk/libs/interprocess/test/node_pool_test.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -31,7 +31,7 @@
template <class NodePool>
bool test_node_pool<NodePool>::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<void*> nodes;
@@ -136,7 +136,7 @@
typedef boost::interprocess::test::test_node_pool<node_pool_t> test_node_pool_t;
shared_memory_object::remove(test::get_process_id_name());
{
- managed_shared_memory shm(create_only, test::get_process_id_name(), 4*1024*sizeof(void*));
+ managed_shared_memory shm(create_only, test::get_process_id_name(), 4*1024*sizeof(segment_manager::void_pointer));
typedef deleter<node_pool_t, segment_manager> deleter_t;
typedef unique_ptr<node_pool_t, deleter_t> unique_ptr_t;
Modified: trunk/libs/interprocess/test/set_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/set_test.hpp (original)
+++ trunk/libs/interprocess/test/set_test.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -77,16 +77,16 @@
MyShmSet *shmset2 =
segment.template construct<MyShmSet>("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<IntType>(), segment.get_segment_manager());
MyStdSet *stdset2 = new MyStdSet(aux_vect2, aux_vect2 + 50);
MyShmMultiSet *shmmultiset2 =
segment.template construct<MyShmMultiSet>("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<IntType>(), segment.get_segment_manager());
MyStdMultiSet *stdmultiset2 = new MyStdMultiSet(aux_vect2, aux_vect2 + 50);
@@ -117,8 +117,8 @@
MyShmSet *shmset3 =
segment.template construct<MyShmSet>("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<IntType>(), segment.get_segment_manager());
MyStdSet *stdset3 = new MyStdSet(aux_vect2, aux_vect2 + 50);
@@ -126,8 +126,8 @@
MyShmMultiSet *shmmultiset3 =
segment.template construct<MyShmMultiSet>("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<IntType>(), segment.get_segment_manager());
MyStdMultiSet *stdmultiset3 = new MyStdMultiSet(aux_vect2, aux_vect2 + 50);
@@ -263,16 +263,16 @@
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 @@
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;
}
Modified: trunk/libs/interprocess/test/string_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/string_test.cpp (original)
+++ trunk/libs/interprocess/test/string_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -52,7 +52,7 @@
if(string1.size() != string2.size())
return false;
return std::char_traits<typename Str1::value_type>::compare
- (string1.c_str(), string2.c_str(), string1.size()) == 0;
+ (string1.c_str(), string2.c_str(), (std::size_t)string1.size()) == 0;
}
};
Modified: trunk/libs/interprocess/test/user_buffer_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/user_buffer_test.cpp (original)
+++ trunk/libs/interprocess/test/user_buffer_test.cpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -19,6 +19,7 @@
#include <boost/interprocess/containers/list.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
#include <boost/interprocess/allocators/node_allocator.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
#include "print_container.hpp"
/******************************************************************************/
@@ -52,9 +53,9 @@
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 @@
}
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<char*>(heap_buffer.get_address());
@@ -245,7 +246,7 @@
}
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;
Modified: trunk/libs/interprocess/test/vector_test.hpp
==============================================================================
--- trunk/libs/interprocess/test/vector_test.hpp (original)
+++ trunk/libs/interprocess/test/vector_test.hpp 2011-03-17 12:42:30 EDT (Thu, 17 Mar 2011)
@@ -137,7 +137,7 @@
IntType aux_vect[50];
for(int i = 0; i < 50; ++i){
IntType new_int(-1);
- BOOST_STATIC_ASSERT((::boost::interprocess::is_movable<boost::interprocess::test::movable_int>::value == true));
+ //BOOST_STATIC_ASSERT((::boost::move_detail::is_copy_constructible<boost::interprocess::test::movable_int>::value == false));
aux_vect[i] = boost::interprocess::move(new_int);
}
int aux_vect2[50];
@@ -146,8 +146,8 @@
}
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 @@
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 @@
if(!test::CheckEqualContainers(shmvector, stdvector)) return 1;
if(!copyable_only(shmvector, stdvector
- ,detail::bool_<!is_movable<IntType>::value>())){
+ ,detail::bool_<!detail::is_same<IntType, test::movable_int>::value>())){
return 1;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk