Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54534 - in sandbox/monotonic: boost/heterogenous boost/monotonic libs/monotonic/test/clones
From: christian.schladetsch_at_[hidden]
Date: 2009-06-30 08:24:24


Author: cschladetsch
Date: 2009-06-30 08:24:22 EDT (Tue, 30 Jun 2009)
New Revision: 54534
URL: http://svn.boost.org/trac/boost/changeset/54534

Log:
added quick hack of BOOST_HETEROGENOUS so ppl can use monotonic while i get heterogenous working...
Text files modified:
   sandbox/monotonic/boost/heterogenous/forward_declarations.hpp | 1 +
   sandbox/monotonic/boost/monotonic/allocator_base.hpp | 9 ++++++++-
   sandbox/monotonic/libs/monotonic/test/clones/tests.cpp | 1 +
   3 files changed, 10 insertions(+), 1 deletions(-)

Modified: sandbox/monotonic/boost/heterogenous/forward_declarations.hpp
==============================================================================
--- sandbox/monotonic/boost/heterogenous/forward_declarations.hpp (original)
+++ sandbox/monotonic/boost/heterogenous/forward_declarations.hpp 2009-06-30 08:24:22 EDT (Tue, 30 Jun 2009)
@@ -8,6 +8,7 @@
 
 #include <functional>
 // including monotonic/allocator.hpp is temporary; not needed after make_clone_allocator works properly
+#define BOOST_HETEROGENOUS
 #include <boost/monotonic/allocator.hpp>
 #include <boost/heterogenous/detail/prefix.hpp>
 

Modified: sandbox/monotonic/boost/monotonic/allocator_base.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/allocator_base.hpp (original)
+++ sandbox/monotonic/boost/monotonic/allocator_base.hpp 2009-06-30 08:24:22 EDT (Tue, 30 Jun 2009)
@@ -6,7 +6,9 @@
 #ifndef BOOST_MONOTONIC_ALLOCATOR_BASE_HPP
 #define BOOST_MONOTONIC_ALLOCATOR_BASE_HPP
 
+#ifdef BOOST_HETEROGENOUS
 #include <boost/heterogenous/abstract_allocator.hpp>
+#endif
 #include <boost/assert.hpp>
 #include <boost/monotonic/detail/prefix.hpp>
 #include <boost/type_traits/has_trivial_constructor.hpp>
@@ -28,7 +30,10 @@
         {
                 /// common to other monotonic allocators for type T of type Derived
                 template <class T, class Derived>
- struct allocator_base : heterogenous::abstract_allocator
+ struct allocator_base
+#ifdef BOOST_HETEROGENOUS
+ : heterogenous::abstract_allocator
+#endif
                 {
                         typedef size_t size_type;
                         typedef ptrdiff_t difference_type;
@@ -47,6 +52,7 @@
                 //private:
                         storage_base *storage;
 
+#ifdef BOOST_HETEROGENOUS
                         // override for abstract_allocator
                         virtual heterogenous::abstract_allocator::pointer allocate_bytes(size_t num_bytes, size_t alignment)
                         {
@@ -58,6 +64,7 @@
                         {
                                 // do nothing
                         }
+#endif
 
                 public:
                         allocator_base(storage_base &store) throw()

Modified: sandbox/monotonic/libs/monotonic/test/clones/tests.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/clones/tests.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/clones/tests.cpp 2009-06-30 08:24:22 EDT (Tue, 30 Jun 2009)
@@ -11,6 +11,7 @@
 
 #include <string>
 #include <iostream>
+#define BOOST_HETEROGENOUS
 #include <boost/monotonic/local.hpp>
 #include <boost/heterogenous/vector.hpp>
 #include <boost/heterogenous/map.hpp>


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