|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52388 - in trunk/boost/interprocess: containers/container detail
From: igaztanaga_at_[hidden]
Date: 2009-04-14 12:17:08
Author: igaztanaga
Date: 2009-04-14 12:17:07 EDT (Tue, 14 Apr 2009)
New Revision: 52388
URL: http://svn.boost.org/trac/boost/changeset/52388
Log:
Workarounds for VC8 and MacOS
Text files modified:
trunk/boost/interprocess/containers/container/stable_vector.hpp | 31 ++++++++++---------------------
trunk/boost/interprocess/detail/workaround.hpp | 4 ++--
2 files changed, 12 insertions(+), 23 deletions(-)
Modified: trunk/boost/interprocess/containers/container/stable_vector.hpp
==============================================================================
--- trunk/boost/interprocess/containers/container/stable_vector.hpp (original)
+++ trunk/boost/interprocess/containers/container/stable_vector.hpp 2009-04-14 12:17:07 EDT (Tue, 14 Apr 2009)
@@ -677,16 +677,12 @@
}
//Now fill pool if data is not enough
if((n - size) > this->internal_data.pool_size){
- this->add_to_pool((n - size) - this->internal_data.pool_size, alloc_version());
+ this->add_to_pool((n - size) - this->internal_data.pool_size);
}
}
}
- template<class AllocatorVersion>
- void clear_pool(AllocatorVersion,
- typename boost::interprocess_container::containers_detail::enable_if_c
- <boost::interprocess_container::containers_detail::is_same<AllocatorVersion, allocator_v1>
- ::value>::type * = 0)
+ void clear_pool(allocator_v1)
{
if(!impl.empty() && impl.back()){
void_ptr &p1 = *(impl.end()-2);
@@ -703,11 +699,7 @@
}
}
- template<class AllocatorVersion>
- void clear_pool(AllocatorVersion,
- typename boost::interprocess_container::containers_detail::enable_if_c
- <boost::interprocess_container::containers_detail::is_same<AllocatorVersion, allocator_v2>
- ::value>::type * = 0)
+ void clear_pool(allocator_v2)
{
if(!impl.empty() && impl.back()){
@@ -725,11 +717,12 @@
this->clear_pool(alloc_version());
}
- template<class AllocatorVersion>
- void add_to_pool(size_type n, AllocatorVersion,
- typename boost::interprocess_container::containers_detail::enable_if_c
- <boost::interprocess_container::containers_detail::is_same<AllocatorVersion, allocator_v1>
- ::value>::type * = 0)
+ void add_to_pool(size_type n)
+ {
+ this->add_to_pool(n, alloc_version());
+ }
+
+ void add_to_pool(size_type n, allocator_v1)
{
size_type remaining = n;
while(remaining--){
@@ -737,11 +730,7 @@
}
}
- template<class AllocatorVersion>
- void add_to_pool(size_type n, AllocatorVersion,
- typename boost::interprocess_container::containers_detail::enable_if_c
- <boost::interprocess_container::containers_detail::is_same<AllocatorVersion, allocator_v2>
- ::value>::type * = 0)
+ void add_to_pool(size_type n, allocator_v2)
{
void_ptr &p1 = *(impl.end()-2);
void_ptr &p2 = impl.back();
Modified: trunk/boost/interprocess/detail/workaround.hpp
==============================================================================
--- trunk/boost/interprocess/detail/workaround.hpp (original)
+++ trunk/boost/interprocess/detail/workaround.hpp 2009-04-14 12:17:07 EDT (Tue, 14 Apr 2009)
@@ -46,8 +46,8 @@
# if defined(__CYGWIN__)
#define BOOST_INTERPROCESS_POSIX_SEMAPHORES_NO_UNLINK
# endif
- #elif defined(__APPLE__)
- # define BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES
+ //#elif defined(__APPLE__)
+ //# define BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES
#endif
#if ((defined _V6_ILP32_OFFBIG) &&(_V6_ILP32_OFFBIG - 0 > 0)) ||\
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk