|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71188 - in sandbox/guild/pool: boost/pool libs/pool/test
From: john_at_[hidden]
Date: 2011-04-11 13:19:17
Author: johnmaddock
Date: 2011-04-11 13:19:16 EDT (Mon, 11 Apr 2011)
New Revision: 71188
URL: http://svn.boost.org/trac/boost/changeset/71188
Log:
Change to Boost.Math gcd/lcm and fix tests to compile cleanly again!
Text files modified:
sandbox/guild/pool/boost/pool/pool.hpp | 26 ++++++++++++--------------
sandbox/guild/pool/boost/pool/poolfwd.hpp | 2 +-
sandbox/guild/pool/libs/pool/test/test_poisoned_macros.cpp | 2 +-
3 files changed, 14 insertions(+), 16 deletions(-)
Modified: sandbox/guild/pool/boost/pool/pool.hpp
==============================================================================
--- sandbox/guild/pool/boost/pool/pool.hpp (original)
+++ sandbox/guild/pool/boost/pool/pool.hpp 2011-04-11 13:19:16 EDT (Mon, 11 Apr 2011)
@@ -26,10 +26,8 @@
#include <boost/pool/poolfwd.hpp>
-// boost::details::pool::ct_lcm
-#include <boost/pool/detail/ct_gcd_lcm.hpp>
-// boost::details::pool::lcm
-#include <boost/pool/detail/gcd_lcm.hpp>
+// boost::math::static_lcm
+#include <boost/math/common_factor_ct.hpp>
// boost::simple_segregated_storage
#include <boost/pool/simple_segregated_storage.hpp>
// boost::alignment_of
@@ -160,7 +158,7 @@
char * ptr_next_ptr() const
{
return (ptr_next_size() -
- pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value);
}
public:
@@ -210,7 +208,7 @@
size_type element_size() const
{ //! \returns size of element pointer area.
return (sz - sizeof(size_type) -
- pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value);
}
size_type & next_size() const
@@ -282,9 +280,9 @@
private:
BOOST_STATIC_CONSTANT(unsigned, min_alloc_size =
- (::boost::details::pool::ct_lcm<sizeof(void *), sizeof(size_type)>::value) );
+ (::boost::math::static_lcm<sizeof(void *), sizeof(size_type)>::value) );
BOOST_STATIC_CONSTANT(unsigned, min_align =
- (::boost::details::pool::ct_lcm< ::boost::alignment_of<void *>::value, ::boost::alignment_of<size_type>::value>::value) );
+ (::boost::math::static_lcm< ::boost::alignment_of<void *>::value, ::boost::alignment_of<size_type>::value>::value) );
//! \returns 0 if out-of-memory.
//! Called if malloc/ordered_malloc needs to resize the free list.
@@ -681,7 +679,7 @@
//! \returns pointer to chunk.
size_type partition_size = alloc_size();
size_type POD_size = next_size * partition_size +
- details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
char * ptr = (UserAllocator::malloc)(POD_size);
if (ptr == 0)
{
@@ -690,7 +688,7 @@
next_size >>= 1;
partition_size = alloc_size();
POD_size = next_size * partition_size +
- details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
ptr = (UserAllocator::malloc)(POD_size);
}
if(ptr == 0)
@@ -721,7 +719,7 @@
//! \returns pointer to new chunk.
size_type partition_size = alloc_size();
size_type POD_size = next_size * partition_size +
- details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
char * ptr = (UserAllocator::malloc)(POD_size);
if (ptr == 0)
{
@@ -730,7 +728,7 @@
next_size >>= 1;
partition_size = alloc_size();
POD_size = next_size * partition_size +
- details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
ptr = (UserAllocator::malloc)(POD_size);
}
if(ptr == 0)
@@ -806,7 +804,7 @@
BOOST_USING_STD_MAX();
next_size = max BOOST_PREVENT_MACRO_SUBSTITUTION(next_size, num_chunks);
size_type POD_size = next_size * partition_size +
- details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
char * ptr = (UserAllocator::malloc)(POD_size);
if (ptr == 0)
{
@@ -817,7 +815,7 @@
next_size >>= 1;
next_size = max BOOST_PREVENT_MACRO_SUBSTITUTION(next_size, num_chunks);
POD_size = next_size * partition_size +
- details::pool::ct_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
+ math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
ptr = (UserAllocator::malloc)(POD_size);
}
if(ptr == 0)
Modified: sandbox/guild/pool/boost/pool/poolfwd.hpp
==============================================================================
--- sandbox/guild/pool/boost/pool/poolfwd.hpp (original)
+++ sandbox/guild/pool/boost/pool/poolfwd.hpp 2011-04-11 13:19:16 EDT (Mon, 11 Apr 2011)
@@ -54,7 +54,7 @@
typename Mutex = details::pool::default_mutex,
unsigned NextSize = 32,
unsigned MaxSize = 0>
-struct singleton_pool;
+class singleton_pool;
//
// Location: <boost/pool/pool_alloc.hpp>
Modified: sandbox/guild/pool/libs/pool/test/test_poisoned_macros.cpp
==============================================================================
--- sandbox/guild/pool/libs/pool/test/test_poisoned_macros.cpp (original)
+++ sandbox/guild/pool/libs/pool/test/test_poisoned_macros.cpp 2011-04-11 13:19:16 EDT (Mon, 11 Apr 2011)
@@ -40,4 +40,4 @@
template class boost::simple_segregated_storage<unsigned>;
-template struct boost::singleton_pool<int, 32>;
+template class boost::singleton_pool<int, 32>;
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