Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53999 - in sandbox/monotonic: boost/monotonic boost/utility libs/monotonic/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-17 00:46:18


Author: cschladetsch
Date: 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
New Revision: 53999
URL: http://svn.boost.org/trac/boost/changeset/53999

Log:
renamed .h to .hpp

Added:
   sandbox/monotonic/boost/monotonic/allocator.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/allocator.h
   sandbox/monotonic/boost/monotonic/chain.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/chain.h
   sandbox/monotonic/boost/monotonic/config.hpp
      - copied unchanged from r53997, /sandbox/monotonic/boost/monotonic/config.h
   sandbox/monotonic/boost/monotonic/fixed_storage.hpp
      - copied, changed from r53997, /sandbox/monotonic/boost/monotonic/fixed_storage.h
   sandbox/monotonic/boost/monotonic/forward_declarations.hpp
      - copied, changed from r53997, /sandbox/monotonic/boost/monotonic/forward_declarations.h
   sandbox/monotonic/boost/monotonic/inline_clone_allocator.hpp
      - copied unchanged from r53996, /sandbox/monotonic/boost/monotonic/inline_clone_allocator.h
   sandbox/monotonic/boost/monotonic/list.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/list.h
   sandbox/monotonic/boost/monotonic/map.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/map.h
   sandbox/monotonic/boost/monotonic/ptr_list.hpp
      - copied unchanged from r53996, /sandbox/monotonic/boost/monotonic/ptr_list.h
   sandbox/monotonic/boost/monotonic/set.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/set.h
   sandbox/monotonic/boost/monotonic/shared_storage.hpp
      - copied unchanged from r53998, /sandbox/monotonic/boost/monotonic/shared_storage.h
   sandbox/monotonic/boost/monotonic/static_storage.hpp
      - copied, changed from r53998, /sandbox/monotonic/boost/monotonic/static_storage.h
   sandbox/monotonic/boost/monotonic/storage.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/storage.h
   sandbox/monotonic/boost/monotonic/storage_base.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/storage_base.h
   sandbox/monotonic/boost/monotonic/vector.hpp
      - copied, changed from r53996, /sandbox/monotonic/boost/monotonic/vector.h
   sandbox/monotonic/boost/utility/iter_range.hpp
      - copied unchanged from r53990, /sandbox/monotonic/boost/utility/iter_range.h
Removed:
   sandbox/monotonic/boost/monotonic/allocator.h
   sandbox/monotonic/boost/monotonic/chain.h
   sandbox/monotonic/boost/monotonic/config.h
   sandbox/monotonic/boost/monotonic/fixed_storage.h
   sandbox/monotonic/boost/monotonic/forward_declarations.h
   sandbox/monotonic/boost/monotonic/inline_clone_allocator.h
   sandbox/monotonic/boost/monotonic/list.h
   sandbox/monotonic/boost/monotonic/map.h
   sandbox/monotonic/boost/monotonic/ptr_list.h
   sandbox/monotonic/boost/monotonic/set.h
   sandbox/monotonic/boost/monotonic/shared_storage.h
   sandbox/monotonic/boost/monotonic/static_storage.h
   sandbox/monotonic/boost/monotonic/storage.h
   sandbox/monotonic/boost/monotonic/storage_base.h
   sandbox/monotonic/boost/monotonic/vector.h
   sandbox/monotonic/boost/utility/iter_range.h
Text files modified:
   sandbox/monotonic/boost/monotonic/allocator.hpp | 4 ++--
   sandbox/monotonic/boost/monotonic/chain.hpp | 4 ++--
   sandbox/monotonic/boost/monotonic/fixed_storage.hpp | 4 ++--
   sandbox/monotonic/boost/monotonic/forward_declarations.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/list.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/map.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/set.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/static_storage.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/storage.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/storage_base.hpp | 2 +-
   sandbox/monotonic/boost/monotonic/vector.hpp | 2 +-
   sandbox/monotonic/libs/monotonic/test/basic_tests.cpp | 2 +-
   sandbox/monotonic/libs/monotonic/test/main.cpp | 14 +++++++-------
   sandbox/monotonic/libs/monotonic/test/monotonic.vcproj | 32 ++++++++++++++++----------------
   sandbox/monotonic/libs/monotonic/test/rope.cpp | 10 +++++-----
   sandbox/monotonic/libs/monotonic/test/test_chained_storage.cpp | 2 +-
   sandbox/monotonic/libs/monotonic/test/test_shared_storage.cpp | 2 +-
   17 files changed, 45 insertions(+), 45 deletions(-)

Deleted: sandbox/monotonic/boost/monotonic/allocator.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/allocator.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,163 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_ALLOCATOR_H
-#define BOOST_MONOTONIC_ALLOCATOR_H
-
-#include <boost/assert.hpp>
-#include <boost/type_traits/has_trivial_constructor.hpp>
-#include <boost/type_traits/has_trivial_destructor.hpp>
-
-#include <boost/monotonic/storage.h>
-#include <boost/monotonic/static_storage.h>
-
-namespace boost
-{
- namespace monotonic
- {
- template <>
- struct allocator<void>
- {
- typedef void* pointer;
- typedef const void* const_pointer;
-
- typedef void value_type;
- template <class U>
- struct rebind
- {
- typedef allocator<U> other;
- };
- };
-
- template <class T>
- struct allocator
- {
- BOOST_STATIC_CONSTANT(size_t, alignment = boost::aligned_storage<sizeof(T)>::alignment);
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- typedef T *pointer;
- typedef const T *const_pointer;
- typedef T &reference;
- typedef const T &const_reference;
- typedef T value_type;
- template <class U>
- struct rebind
- {
- typedef allocator<U> other;
- };
-
- private:
- storage_base *storage;
-
- public:
- allocator() throw()
- : storage(&static_storage)
- {
- }
-
- allocator(storage_base &store) throw()
- : storage(&store)
- {
- }
-
- allocator(const allocator& alloc) throw()
- : storage(alloc.get_storage())
- {
- }
-
- template <class U>
- allocator(const allocator<U> &alloc) throw()
- : storage(alloc.get_storage())
- {
- }
-
- ~allocator() throw()
- {
- }
-
- pointer address(reference x) const
- {
- return &x;
- }
-
- const_pointer address(const_reference x) const
- {
- return &x;
- }
-
- pointer allocate(size_type num, allocator<void>::const_pointer /*hint*/ = 0)
- {
- BOOST_ASSERT(num > 0);
- BOOST_ASSERT(storage != 0);
- return static_cast<pointer>(storage->allocate(num*sizeof(value_type), alignment));
- }
-
- void deallocate(pointer, size_type)
- {
- // do nothing
- }
-
- size_type max_size() const throw()
- {
- if (!storage)
- return 0;
- //return storage->max_size()/(sizeof(T) + alignment);
- return storage->max_size()/sizeof(value_type);
- }
-
- void construct(pointer ptr)
- {
- new (ptr) value_type();
- }
-
- void construct(pointer ptr, const T& val)
- {
- new (ptr) value_type(val);
- }
-
- void destroy(pointer ptr)
- {
- if (!ptr)
- return;
- destroy(ptr, boost::has_trivial_destructor<value_type>());
- }
-
- void destroy(pointer ptr, const boost::false_type& )
- {
- (*ptr).~value_type();
- }
-
- void destroy(pointer, const boost::true_type& )
- {
- }
-
- void swap(allocator<value_type> &other)
- {
- std::swap(storage, other.storage);
- }
-
- storage_base *get_storage() const
- {
- return storage;
- }
-
- friend bool operator==(allocator<T> const &A, allocator<T> const &B)
- {
- return A.storage == B.storage;
- }
-
- friend bool operator!=(allocator<T> const &A, allocator<T> const &B)
- {
- return A.storage != B.storage;
- }
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_ALLOCATOR_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/allocator.hpp (from r53996, /sandbox/monotonic/boost/monotonic/allocator.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/allocator.h (original)
+++ sandbox/monotonic/boost/monotonic/allocator.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -10,8 +10,8 @@
 #include <boost/type_traits/has_trivial_constructor.hpp>
 #include <boost/type_traits/has_trivial_destructor.hpp>
 
-#include <boost/monotonic/storage.h>
-#include <boost/monotonic/static_storage.h>
+#include <boost/monotonic/storage.hpp>
+#include <boost/monotonic/static_storage.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/chain.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/chain.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,262 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_CHAIN_H
-#define BOOST_MONOTONIC_CHAIN_H
-
-#include <boost/monotonic/allocator.h>
-#include <boost/utility/iter_range.h>
-#include <boost/iterator.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-namespace boost
-{
- namespace monotonic
- {
- /// a list of vectors that are tied together to present a contiguous sequence
- ///
- /// this is to provide a sequence type that is 'between' a list and a vector. it
- /// has slower access speed than a vector, but faster access speed than a list.
- ///
- /// unlike a vector, a chain cannot be resized
- ///
- /// this has limited utility outside of the context of a monotonic allocator.
- /// the reason to use it there is to avoid resizing a vector using a monotonic
- /// allocator, which is very wasteful. so, the trade-off is slightly slower
- /// access but ability to extend without resizing. then again, given that the
- /// main reason to use a monotonic allocator is speed, there may be limited
- /// application even there.
- ///
- template <class T, size_t ChunkSize = 64>
- struct chain
- {
- typedef chain<T, ChunkSize> Rope;
- typedef allocator<T> Allocator;
- typedef vector<T> Vector;
- typedef list<Vector> Strands;
- typedef const_iter_range<Strands> ConstStrandsIterators;
- typedef iter_range<Strands> StrandsIterators;
- typedef const_iter_range<Vector> ConstVectorIterators;
- typedef iter_range<Vector> VectorIterators;
-
- typedef T value_type;
- typedef T &reference;
- typedef const T &const_reference;
-
- template <class R, class S, class V, class Derived>
- struct iterator_base : boost::iterator<random_access_traversal_tag, T>
- {
- typedef R Rope;
- typedef S StrandIterators;
- typedef V VectorIterators;
- Rope *parent;
- StrandIterators strand;
- VectorIterators vec;
-
- iterator_base() { }
- iterator_base(Rope &P)
- : parent(&P) { }
- iterator_base(Rope &P, StrandIterators const &S)
- : parent(&P), strand(S) { }
- iterator_base(Rope &P, StrandIterators const &S, VectorIterators const &V)
- : parent(&P), strand(S), vec(V) { }
- Derived &This()
- {
- return static_cast<Derived &>(*this);
- }
- Derived &operator++()
- {
- if (!++vec)
- {
- if (!++strand)
- {
- return This();
- }
- vec = *strand;
- }
- return This();
- }
- Derived operator++(int)
- {
- Derived tmp = This();
- ++*this;
- return tmp;
- }
- bool operator==(iterator_base const &B) const
- {
- return parent == B.parent && strand == B.strand && vec == B.vec;
- }
- bool operator!=(iterator_base const &B) const
- {
- return !(*this == B);
- }
- };
- struct iterator : iterator_base<Rope, StrandsIterators, VectorIterators, iterator>
- {
- typedef iterator_base<Rope, StrandsIterators, VectorIterators, iterator> Parent;
- iterator() { }
- iterator(Rope &P)
- : Parent(P) { }
- iterator(Rope &P, StrandsIterators const &S)
- : Parent(P, S) { }
- iterator(Rope &P, StrandsIterators const &S, VectorIterators const &V)
- : Parent(P, S, V) { }
- T const &operator*() const
- {
- return *Parent::vec;
- }
- T &operator*()
- {
- return *Parent::vec;
- }
- };
- typedef iterator Iter;
- struct const_iterator : iterator_base<Rope const, ConstStrandsIterators, ConstVectorIterators, const_iterator>
- {
- typedef iterator_base<Rope const, ConstStrandsIterators, ConstVectorIterators, const_iterator> Parent;
- const_iterator() { }
- const_iterator(Rope const &P)
- : Parent(P) { }
- const_iterator(Iter const &X)
- : Parent(*X.parent, X.strand, X.vec)
- { }
- const_iterator(Rope const &P, ConstStrandsIterators const &S)
- : Parent(P, S) { }
- const_iterator(Rope const &P, ConstStrandsIterators const &S, ConstVectorIterators const &V)
- : Parent(P, S, V) { }
- T const &operator*() const
- {
- return *Parent::vec;
- }
- };
-
- private:
- Allocator alloc;
- Strands strands;
-
- public:
- chain() { }
- chain(Allocator const &A)
- : alloc(A), strands(A) { }
- chain(size_t len, Allocator const &A)
- : alloc(A), strands(A)
- {
- // TODO
- }
- chain(size_t len, T const &X, Allocator const &A)
- : alloc(A), strands(A)
- {
- strands.push_back(Vector(alloc));
- strands.back().resize(len, X);
- }
- template <class II>
- chain(II F, II L, Allocator const &A)
- : alloc(A), strands(A)
- {
- strands.push_back(Vector(alloc));
- Vector &vec = strands.back();
- size_t len = std::distance(F,L);
- vec.resize(len);
- typename Vector::iterator G = vec.begin();
- for (size_t N = 0; N < len; ++F, ++G)
- *G = *F;
- }
-
- size_t size() const
- {
- size_t len = 0;
- BOOST_FOREACH(Vector const &vec, strands)
- {
- len += vec.size();
- }
- return len;
- }
- bool empty() const
- {
- return strands.empty() || size() == 0;
- }
- const_iterator begin() const
- {
- if (strands.empty())
- return const_iterator(*this);
- return const_iterator(*this, strands, strands.front());
- }
- const_iterator end() const
- {
- if (strands.empty())
- return const_iterator(*this);
- return const_iterator(*this, strands.end(), strands.back().end());
- }
- iterator begin()
- {
- if (strands.empty())
- return iterator(*this);
- return iterator(*this, strands, strands.front());
- }
- iterator end()
- {
- if (strands.empty())
- return iterator(*this);
- return iterator(*this, strands.end(), strands.back().end());
- }
- void push_back(T const &X)
- {
- bool require_new_vec = strands.empty();
- require_new_vec = require_new_vec || strands.back().size() == strands.back().capacity();
- if (require_new_vec)
- {
- strands.push_back(Vector(alloc));
- strands.back().reserve(ChunkSize);
- }
- strands.back().push_back(X);
- }
-
- T &at(size_t index)
- {
- size_t offset = 0;
- BOOST_FOREACH(Vector &vec, strands)
- {
- size_t local = index - offset;
- if (local < vec.size())
- {
- return vec.at(local);
- }
- offset += vec.size();
- if (offset > index)
- break;
- }
- throw std::out_of_range("chain");
- }
- T const &at(size_t index) const
- {
- size_t offset = 0;
- BOOST_FOREACH(Vector const &vec, strands)
- {
- size_t local = index - offset;
- if (local < vec.size())
- {
- return vec.at(local);
- }
- offset += vec.size();
- if (offset < index)
- break;
- }
- throw std::out_of_range("chain");
- }
- T &operator[](size_t index)
- {
- return at(index);
- }
- T const &operator[](size_t index) const
- {
- return at(index);
- }
- };
- }
-}
-
-#endif // BOOST_MONOTONIC_CHAIN_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/chain.hpp (from r53996, /sandbox/monotonic/boost/monotonic/chain.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/chain.h (original)
+++ sandbox/monotonic/boost/monotonic/chain.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -6,8 +6,8 @@
 #ifndef BOOST_MONOTONIC_CHAIN_H
 #define BOOST_MONOTONIC_CHAIN_H
 
-#include <boost/monotonic/allocator.h>
-#include <boost/utility/iter_range.h>
+#include <boost/monotonic/allocator.hpp>
+#include <boost/utility/iter_range.hpp>
 #include <boost/iterator.hpp>
 #include <boost/iterator/iterator_categories.hpp>
 

Deleted: sandbox/monotonic/boost/monotonic/config.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/config.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,30 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_CONFIG_H
-#define BOOST_MONOTONIC_CONFIG_H
-
-namespace boost
-{
- namespace monotonic
- {
- struct DefaultSizes
- {
- enum
- {
- InlineSize = 8*1024, ///< buffer that is inline with the storage
- MinHeapIncrement = 2*1024*1024, ///< the smallest new chunk-size for heap storage
- StaticInlineSize = 64*1024, ///< inline size for a global store
- StaticMinHeapIncrement = MinHeapIncrement,
- };
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_CONFIG_H
-
-//EOF

Deleted: sandbox/monotonic/boost/monotonic/fixed_storage.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/fixed_storage.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,121 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_FIXED_STORAGE_H
-#define BOOST_MONOTONIC_FIXED_STORAGE_H
-
-#include <boost/array.hpp>
-#include <boost/aligned_storage.hpp>
-#include <boost/monotonic/forward_declarations.h>
-#include <boost/monotonic/storage_base.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// storage for an allocator that is on the stack or heap
- template <size_t InlineSize>
- struct fixed_storage : storage_base
- {
- typedef boost::array<char, InlineSize> Buffer;
-
- private:
- Buffer buffer; ///< the storage
- size_t cursor; ///< pointer to current index within storage for next allocation
-#ifndef NDEBUG
- size_t num_allocations;
-#endif
- public:
- fixed_storage()
- : cursor(0)
-#ifndef NDEBUG
- , num_allocations(0)
-#endif
- {
- }
-
- Buffer const &get_buffer() const
- {
- return buffer;
- }
- const char *begin() const
- {
- return &buffer[0];
- }
- const char *end() const
- {
- return &buffer[InlineSize - 1];
- }
- void reset()
- {
- cursor = 0;
-#ifndef NDEBUG
- num_allocations = 0;
-#endif
- }
- void release()
- {
- reset();
- }
-
- size_t get_cursor() const
- {
- return cursor;
- }
-
- void set_cursor(size_t c)
- {
- cursor = c;
- }
-
- /// allocate storage, given alignment requirement
- void *allocate(size_t num_bytes, size_t alignment)
- {
- size_t extra = cursor & (alignment - 1);
- if (extra > 0)
- extra = alignment - extra;
- size_t required = num_bytes + extra;
- if (cursor + required > InlineSize)
- {
- return 0;
- }
-#ifndef NDEBUG
- ++num_allocations;
-#endif
- char *ptr = &buffer[cursor];
- cursor += required;
- return ptr + extra;
- }
-
- size_t max_size() const
- {
- return InlineSize;
- }
-
- size_t remaining() const
- {
- return InlineSize - cursor;
- }
-
- size_t used() const
- {
- return cursor;
- }
-
-#ifndef NDEBUG
- size_t get_num_allocs() const
- {
- return num_allocations;
- }
-#endif
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_FIXED_STORAGE_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/fixed_storage.hpp (from r53997, /sandbox/monotonic/boost/monotonic/fixed_storage.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/fixed_storage.h (original)
+++ sandbox/monotonic/boost/monotonic/fixed_storage.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -8,8 +8,8 @@
 
 #include <boost/array.hpp>
 #include <boost/aligned_storage.hpp>
-#include <boost/monotonic/forward_declarations.h>
-#include <boost/monotonic/storage_base.h>
+#include <boost/monotonic/forward_declarations.hpp>
+#include <boost/monotonic/storage_base.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/forward_declarations.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/forward_declarations.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,58 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_FORWARD_DECLARATIONS_H
-#define BOOST_MONOTONIC_FORWARD_DECLARATIONS_H
-
-#include <utility>
-#include <limits>
-#include <vector>
-#include <boost/foreach.hpp>
-#include <boost/monotonic/config.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// storage for an allocator that is on the stack or heap
- template <size_t InlineSize = DefaultSizes::InlineSize>
- struct fixed_storage;
-
- /// storage that can span the stack/heap boundary.
- ///
- /// allocation requests first use inline fixed_storage of InlineSize bytes.
- /// once that is exhausted, later requests are serviced from the heap.
- ///
- /// all allocations remain valid until the storage goes out of scope.
- template <
- size_t InlineSize = DefaultSizes::InlineSize
- , size_t MinHeapIncrement = DefaultSizes::MinHeapIncrement
- , class Al = std::allocator<char> >
- struct storage;
-
- /// thread-safe storage
- template <
- size_t InlineSize = DefaultSizes::InlineSize
- , size_t MinHeapIncrement = DefaultSizes::MinHeapIncrement
- , class Al = std::allocator<char> >
- struct shared_storage;
-
- /// a globally available storage buffer
- template <size_t InlineSize = DefaultSizes::StaticInlineSize
- , size_t MinHeapIncrement = DefaultSizes::StaticMinHeapIncrement
- , class Al = std::allocator<char>
- , template <size_t, size_t, class> class Storage = storage
- >
- struct static_storage_base;
-
- /// a monotonic allocator has a storage buffer and a no-op deallocate() method
- template <class>
- struct allocator;
- }
-}
-
-#endif // BOOST_MONOTONIC_FORWARD_DECLARATIONS_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/forward_declarations.hpp (from r53997, /sandbox/monotonic/boost/monotonic/forward_declarations.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/forward_declarations.h (original)
+++ sandbox/monotonic/boost/monotonic/forward_declarations.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -10,7 +10,7 @@
 #include <limits>
 #include <vector>
 #include <boost/foreach.hpp>
-#include <boost/monotonic/config.h>
+#include <boost/monotonic/config.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/inline_clone_allocator.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/inline_clone_allocator.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,41 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_INLINE_CLONE_ALLOCATOR_H
-#define BOOST_MONOTONIC_INLINE_CLONE_ALLOCATOR_H
-
-#include <boost/monotonic/allocator.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// custom clone allocator for ptr-containers using a monotonic allocator.
- /// see http://www.boost.org/doc/libs/1_38_0/libs/ptr_container/doc/reference.html for details.
- struct inline_clone_allocator
- {
- template< class U >
- static U* allocate_clone( const U& r )
- {
- // can't allocate clone without access to the monotonic allocator.
- // this is a design fault in boost::ptr_container.
- return 0;
- }
-
- template< class U >
- static void deallocate_clone( const U* clone )
- {
- if (clone)
- clone->U::~U();
- }
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_INLINE_CLONE_ALLOCATOR_H
-
-//EOF

Deleted: sandbox/monotonic/boost/monotonic/list.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/list.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,35 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_LIST_H
-#define BOOST_MONOTONIC_LIST_H
-
-#include <list>
-#include <boost/monotonic/allocator.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// A std::list<T> that uses a monotonic allocator
- template <class T>
- struct list : std::list<T, allocator<T> >
- {
- typedef allocator<T> Allocator;
- typedef std::list<T, Allocator> List;
-
- list() { }
- list(Allocator const &A)
- : List(A) { }
- template <class II>
- list(II F, II L, Allocator const &A)
- : List(F,L,A) { }
- };
- }
-}
-
-#endif // BOOST_MONOTONIC_LIST_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/list.hpp (from r53996, /sandbox/monotonic/boost/monotonic/list.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/list.h (original)
+++ sandbox/monotonic/boost/monotonic/list.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -7,7 +7,7 @@
 #define BOOST_MONOTONIC_LIST_H
 
 #include <list>
-#include <boost/monotonic/allocator.h>
+#include <boost/monotonic/allocator.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/map.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/map.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,41 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_MAP_H
-#define BOOST_MONOTONIC_MAP_H
-
-#include <map>
-#include <boost/monotonic/allocator.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// A std::map<K,T,P> that uses a monotonic allocator
- template <class K, class T, class P = std::less<K> >
- struct map : std::map<K,T,P, allocator<K> >
- {
- typedef allocator<K> Allocator;
- typedef std::map<K,T,P,Allocator > Map;
- typedef P Predicate;
-
- map() { }
- map(Allocator const &A)
- : Map(Predicate(), A) { }
- map(Predicate Pr, Allocator const &A)
- : Map(Pr, A) { }
- template <class II>
- map(II F, II L, Allocator const &A, Predicate const &Pr = Predicate())
- : Map(F,L,Pr,A) { }
- template <class II>
- map(II F, II L, Predicate const &Pr, Allocator const &A)
- : Map(F,L,Pr,A) { }
- };
- }
-}
-
-#endif // BOOST_MONOTONIC_MAP_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/map.hpp (from r53996, /sandbox/monotonic/boost/monotonic/map.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/map.h (original)
+++ sandbox/monotonic/boost/monotonic/map.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -7,7 +7,7 @@
 #define BOOST_MONOTONIC_MAP_H
 
 #include <map>
-#include <boost/monotonic/allocator.h>
+#include <boost/monotonic/allocator.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/ptr_list.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/ptr_list.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,47 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_PTR_LIST_H
-#define BOOST_MONOTONIC_PTR_LIST_H
-
-#include <boost/ptr_container/ptr_list.hpp>
-#include <boost/monotonic/allocator.h>
-#include <boost/monotonic/inline_clone_allocator.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// A boost::ptr_list<T> that uses a monotonic allocator, and a custom clone allocator
- template <class T>
- struct ptr_list : boost::ptr_list<T, inline_clone_allocator, allocator<T> >
- {
- typedef allocator<T> Allocator;
- typedef boost::ptr_list<T, inline_clone_allocator, Allocator> List;
-
- ptr_list()
- {
- }
- ptr_list(storage_base &storage) // Copyright (C) 2009 Christian Schladetsch
- //
- // 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)
-
-
- : List(Allocator(storage))
- {
- }
- ptr_list(Allocator const &A)
- : List(A)
- {
- }
- };
-
- }
-}
-
-#endif // BOOST_MONOTONIC_PTR_LIST_H
-
-//EOF

Deleted: sandbox/monotonic/boost/monotonic/set.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/set.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,41 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_SET_H
-#define BOOST_MONOTONIC_SET_H
-
-#include <set>
-#include <boost/monotonic/allocator.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// A std::set<T,P> that uses a monotonic allocator
- template <class T, class P = std::less<T> >
- struct set : std::set<T,P, allocator<T> >
- {
- typedef allocator<T> Allocator;
- typedef P Predicate;
- typedef std::set<T,P,allocator<T> > Set;
-
- set() { }
- set(Allocator const &A)
- : Set(Predicate(), A) { }
- set(Predicate Pr, Allocator const &A)
- : Set(Pr, A) { }
- template <class II>
- set(II F, II L, Allocator const &A)
- : Set(F,L,Predicate(),A) { }
- template <class II>
- set(II F, II L, Predicate const &Pr, Allocator const &A)
- : Set(F,L,Pr,A) { }
- };
- }
-}
-
-#endif // BOOST_MONOTONIC_SET_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/set.hpp (from r53996, /sandbox/monotonic/boost/monotonic/set.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/set.h (original)
+++ sandbox/monotonic/boost/monotonic/set.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -7,7 +7,7 @@
 #define BOOST_MONOTONIC_SET_H
 
 #include <set>
-#include <boost/monotonic/allocator.h>
+#include <boost/monotonic/allocator.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/shared_storage.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/shared_storage.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,87 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_SHARED_STORAGE_H
-#define BOOST_MONOTONIC_SHARED_STORAGE_H
-
-#include <boost/monotonic/storage.h>
-#include <boost/monotonic/static_storage.h>
-#include <boost/thread/mutex.hpp>
-
-namespace boost
-{
- namespace monotonic
- {
- /// thread-safe storage
- template <size_t InlineSize, size_t MinHeapSize, class Al>
- struct shared_storage : storage_base
- {
- typedef storage<InlineSize, MinHeapSize, Al> Storage;
-
- private:
- Storage storage;
- mutable mutex guard;
-
- public:
- shared_storage()
- {
- }
- shared_storage(Al const &A)
- : storage(A)
- {
- }
- size_t used() const
- {
- mutex::scoped_lock lock(guard);
- return storage.used();
- }
- void reset()
- {
- mutex::scoped_lock lock(guard);
- storage.reset();
- }
- void release()
- {
- mutex::scoped_lock lock(guard);
- storage.release();
- }
- void *allocate(size_t num_bytes, size_t alignment)
- {
- mutex::scoped_lock lock(guard);
- return storage.allocate(num_bytes, alignment);
- }
- size_t remaining() const
- {
- mutex::scoped_lock lock(guard);
- return storage.remaining();
- }
- size_t fixed_remaining() const
- {
- mutex::scoped_lock lock(guard);
- return storage.fixed_remaining();
- }
- size_t max_size() const
- {
- mutex::scoped_lock lock(guard);
- return storage.max_size();
- }
-
- };
-
- extern static_storage_base<
- DefaultSizes::StaticInlineSize
- , DefaultSizes::StaticMinHeapIncrement
- , std::allocator<char>
- , shared_storage>
- static_shared_storage;
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_SHARED_STORAGE_H
-
-//EOF
-

Deleted: sandbox/monotonic/boost/monotonic/static_storage.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/static_storage.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,67 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_STATIC_STORAGE_BASE_H
-#define BOOST_MONOTONIC_STATIC_STORAGE_BASE_H
-
-#include <boost/monotonic/storage.h>
-
-namespace boost
-{
- namespace monotonic
- {
- template <size_t InlineSize, size_t MinHeapIncrement, class Al, template <size_t, size_t, class> class Storage>
- struct static_storage_base : storage_base
- {
- typedef Al HeapAllocator;
- typedef Storage<InlineSize, MinHeapIncrement, HeapAllocator> StorageType;
-
- private:
- StorageType global;
-
- public:
- static_storage_base()
- {
- }
- static_storage_base(StorageType const &store)
- : global(store)
- {
- }
- void reset()
- {
- global.reset();
- }
- void release()
- {
- global.release();
- }
- void *allocate(size_t num_bytes, size_t alignment)
- {
- return global.allocate(num_bytes, alignment);
- }
- size_t max_size() const
- {
- return global.max_size();
- }
- size_t used() const
- {
- return global.used();
- }
- size_t remaining() const
- {
- return global.remaining();
- }
- };
-
- /// 'static_storage' will be used by a default-constructed monotonic::allocator
- extern static_storage_base<> static_storage;
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_STATIC_STORAGE_BASE_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/static_storage.hpp (from r53998, /sandbox/monotonic/boost/monotonic/static_storage.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/static_storage.h (original)
+++ sandbox/monotonic/boost/monotonic/static_storage.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -6,7 +6,7 @@
 #ifndef BOOST_MONOTONIC_STATIC_STORAGE_BASE_H
 #define BOOST_MONOTONIC_STATIC_STORAGE_BASE_H
 
-#include <boost/monotonic/storage.h>
+#include <boost/monotonic/storage.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/storage.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/storage.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,162 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_STORAGE_H
-#define BOOST_MONOTONIC_STORAGE_H
-
-#include <boost/monotonic/fixed_storage.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// storage that spans the stack/heap boundary.
- ///
- /// allocation requests first use inline fixed_storage of N bytes.
- /// once that is exhausted, later requests are serviced from the heap.
- ///
- /// all allocations remain valid at all times.
- template <size_t InlineSize, size_t MinHeapIncrement, class Al>
- struct storage : storage_base
- {
- typedef Al Allocator;
- typedef typename Allocator::template rebind<char>::other CharAllocator;
-
- /// a link in the chain of heap-based memory buffers
- struct Link
- {
- size_t capacity, cursor;
- char *buffer;
- CharAllocator alloc;
- Link() : capacity(0), cursor(0), buffer(0)
- {
- }
- Link(Allocator const &al, size_t cap)
- : capacity(cap), cursor(0), buffer(0), alloc(al)
- {
- }
- void Construct()
- {
- buffer = alloc.allocate(capacity);
- if (buffer == 0)
- capacity = 0;
- }
- ~Link()
- {
- alloc.deallocate(buffer, 1);
- }
- void reset()
- {
- cursor = 0;
- }
- size_t used() const
- {
- return cursor;
- }
- bool CanAllocate(size_t num_bytes) const
- {
- return capacity - cursor >= num_bytes;
- }
- inline void *Allocate(size_t num_bytes, size_t alignment)
- {
- size_t extra = cursor & (alignment - 1);
- if (extra > 0)
- extra = alignment - extra;
- size_t required = num_bytes + extra;
- if (capacity - cursor < required)
- return 0;
- char *ptr = buffer + cursor;
- cursor += required;
- return ptr + extra;
- }
- };
- typedef std::vector<Link, Al> Chain;
-
- private:
- fixed_storage<InlineSize> fixed; // the inline fixed-sized storage which may be on the stack
- Chain chain; // heap-based storage
- Allocator alloc; // allocator for heap-based storage
-
- public:
- storage()
- {
- }
- storage(Allocator const &A)
- : alloc(A)
- {
- }
-
- void reset()
- {
- fixed.reset();
- BOOST_FOREACH(Link &link, chain)
- {
- link.reset();
- }
- }
-
- void release()
- {
- reset();
- chain.clear();
- }
-
- void *allocate(size_t num_bytes, size_t alignment)
- {
- if (void *ptr = fixed.allocate(num_bytes, alignment))
- {
- return ptr;
- }
- BOOST_FOREACH(Link &link, chain)
- {
- if (void *ptr = link.Allocate(num_bytes, alignment))
- {
- return ptr;
- }
- }
- size_t size = std::max(MinHeapIncrement, num_bytes*2);
- return AddLink(size).Allocate(num_bytes, alignment);
- }
-
- size_t max_size() const
- {
- return std::numeric_limits<size_t>::max();
- }
-
- size_t fixed_remaining() const
- {
- return fixed.remaining();
- }
-
- size_t remaining() const
- {
- return max_size();
- }
-
- size_t used() const
- {
- size_t count = fixed.used();
- BOOST_FOREACH(Link const &link, chain)
- count += link.used();
- return count;
- }
-
- private:
- Link &AddLink(size_t size)
- {
- chain.push_back(Link(alloc, size));
- Link &link = chain.back();
- link.Construct();
- return link;
- }
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_STORAGE_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/storage.hpp (from r53996, /sandbox/monotonic/boost/monotonic/storage.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/storage.h (original)
+++ sandbox/monotonic/boost/monotonic/storage.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -6,7 +6,7 @@
 #ifndef BOOST_MONOTONIC_STORAGE_H
 #define BOOST_MONOTONIC_STORAGE_H
 
-#include <boost/monotonic/fixed_storage.h>
+#include <boost/monotonic/fixed_storage.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/storage_base.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/storage_base.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,42 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_STORAGE_BASE_H
-#define BOOST_MONOTONIC_STORAGE_BASE_H
-
-#include <boost/monotonic/config.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// base structure for different storage types
- struct storage_base
- {
- // reset the number of bytes used to zero
- virtual void reset() = 0;
-
- // reset(), and release all heap-based storage
- virtual void release() = 0;
-
- // the number of bytes to allocate, and the alignment to use
- virtual void *allocate(size_t num_bytes, size_t alignment) = 0;
-
- virtual size_t max_size() const = 0;
-
- /// return the number of bytes used
- virtual size_t used() const = 0;
-
- /// return the number of bytes remaining
- virtual size_t remaining() const = 0;
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_STORAGE_BASE_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/storage_base.hpp (from r53996, /sandbox/monotonic/boost/monotonic/storage_base.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/storage_base.h (original)
+++ sandbox/monotonic/boost/monotonic/storage_base.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -6,7 +6,7 @@
 #ifndef BOOST_MONOTONIC_STORAGE_BASE_H
 #define BOOST_MONOTONIC_STORAGE_BASE_H
 
-#include <boost/monotonic/config.h>
+#include <boost/monotonic/config.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/monotonic/vector.h
==============================================================================
--- sandbox/monotonic/boost/monotonic/vector.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,37 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#ifndef BOOST_MONOTONIC_VECTOR_H
-#define BOOST_MONOTONIC_VECTOR_H
-
-#include <vector>
-#include <boost/monotonic/allocator.h>
-
-namespace boost
-{
- namespace monotonic
- {
- /// a std::vector<T> that uses a monotonic allocator
- template <class T>
- struct vector : std::vector<T, allocator<T> >
- {
- typedef allocator<T> Allocator;
- typedef std::vector<T,Allocator> Vector;
-
- vector() { }
- vector(Allocator const &A)
- : Vector(A) { }
- vector(size_t N, T const &X, Allocator const &A)
- : Vector(N,X,A) { }
- template <class II>
- vector(II F, II L, Allocator const &A)
- : Vector(F,L,A) { }
- };
- }
-}
-
-#endif // BOOST_MONOTONIC_VECTOR_H
-
-//EOF

Copied: sandbox/monotonic/boost/monotonic/vector.hpp (from r53996, /sandbox/monotonic/boost/monotonic/vector.h)
==============================================================================
--- /sandbox/monotonic/boost/monotonic/vector.h (original)
+++ sandbox/monotonic/boost/monotonic/vector.hpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -7,7 +7,7 @@
 #define BOOST_MONOTONIC_VECTOR_H
 
 #include <vector>
-#include <boost/monotonic/allocator.h>
+#include <boost/monotonic/allocator.hpp>
 
 namespace boost
 {

Deleted: sandbox/monotonic/boost/utility/iter_range.h
==============================================================================
--- sandbox/monotonic/boost/utility/iter_range.h 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
+++ (empty file)
@@ -1,155 +0,0 @@
-// Copyright (C) 2009 Christian Schladetsch
-//
-// 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)
-
-#pragma once
-
-namespace boost
-{
- namespace iter_range_detail
- {
- template <class Iter>
- struct iter_range : std::pair<Iter, Iter>
- {
- typedef std::pair<Iter, Iter> Parent;
- using Parent::first;
- using Parent::second;
-
- iter_range() { }
- iter_range(Iter const &A, Iter const &B)
- : Parent(A,B) { }
-
- size_t size() const
- {
- return std::distance(this->first, this->second);
- }
- bool empty() const
- {
- return first == second;
- }
- void advance(size_t N)
- {
- std::advance(first, N);
- }
- iter_range& operator++()
- {
- BOOST_ASSERT(*this);
- ++first;
- return *this;
- }
- iter_range operator++(int)
- {
- BOOST_ASSERT(*this);
- iter_range tmp(*this);
- ++*this;
- return tmp;
- }
- iter_range& operator--()
- {
- BOOST_ASSERT(*this);
- --first;
- return *this;
- }
- iter_range operator--(int)
- {
- BOOST_ASSERT(*this);
- iter_range tmp(*this);
- --*this;
- return tmp;
- }
- operator bool() const
- {
- return first != second;
- }
- };
- }
-
- template <class C>
- struct iter_range : iter_range_detail::iter_range<typename C::iterator>
- {
- typedef C Container;
- typedef typename Container::iterator iterator;
- typedef iter_range_detail::iter_range<iterator> Parent;
- typedef typename boost::iterator_value<iterator>::type Value;
- using Parent::first;
- using Parent::second;
-
- iter_range() { }
- iter_range(Container &cont)
- : Parent(cont.begin(), cont.end()) { }
- iter_range(iterator A)
- : Parent(A,A) { }
- iter_range(iterator A, iterator B)
- : Parent(A,B) { }
- iter_range& operator++()
- {
- Parent::operator++();
- return *this;
- }
- iter_range operator++(int)
- {
- iter_range tmp(*this);
- Parent::operator++(0);
- return tmp;
- }
- Value &operator*() const
- {
- return *first;
- }
- };
-
- template <class C>
- struct const_iter_range : iter_range_detail::iter_range<typename C::const_iterator>
- {
- typedef C Container;
- typedef typename Container::const_iterator const_iterator;
- typedef iter_range_detail::iter_range<const_iterator> Parent;
- typedef typename boost::iterator_value<const_iterator>::type Value;
- using Parent::first;
- using Parent::second;
-
- const_iter_range() { }
- template <class C2>
- const_iter_range(iter_range<C2> const &R)
- : Parent(R.first, R.second) { }
- const_iter_range(Container const &cont)
- : Parent(cont.begin(), cont.end()) { }
- const_iter_range(const_iterator A)
- : Parent(A,A) { }
- const_iter_range(const_iterator A, const_iterator B)
- : Parent(A,B) { }
- const_iter_range& operator++()
- {
- Parent::operator++();
- return *this;
- }
- const_iter_range operator++(int)
- {
- const_iter_range tmp(*this);
- Parent::operator++(0);
- return tmp;
- }
- const Value &operator*() const
- {
- return *first;
- }
- };
- template <class C>
- const_iter_range<C> make_const_range(C &X)
- {
- return const_iter_range<C>(X);
- }
- template <class C>
- const_iter_range<C> make_iter_range(C const &X)
- {
- return const_iter_range<C>(X);
- }
- template <class C>
- const_iter_range<C> make_iter_range(C &X)
- {
- return iter_range<C>(X);
- }
-}
-
-//EOF

Modified: sandbox/monotonic/libs/monotonic/test/basic_tests.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/basic_tests.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/basic_tests.cpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -1,7 +1,7 @@
 #define BOOST_TEST_DYN_LINK
 #define BOOST_TEST_MAIN
 
-#include <boost/monotonic/allocator.h>
+#include <boost/monotonic/allocator.hpp>
 #include <string>
 #include <vector>
 #include <set>

Modified: sandbox/monotonic/libs/monotonic/test/main.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/main.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/main.cpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -5,11 +5,11 @@
 
 // the sandbox is at https://svn.boost.org/svn/boost/sandbox/monotonic/
 
-#include <boost/monotonic/vector.h>
-#include <boost/monotonic/list.h>
-#include <boost/monotonic/map.h>
-#include <boost/monotonic/set.h>
-#include <boost/monotonic/static_storage.h>
+#include <boost/monotonic/vector.hpp>
+#include <boost/monotonic/list.hpp>
+#include <boost/monotonic/map.hpp>
+#include <boost/monotonic/set.hpp>
+#include <boost/monotonic/static_storage.hpp>
 
 #include <boost/iterator/counting_iterator.hpp>
 
@@ -25,8 +25,8 @@
 #include <boost/array.hpp>
 #include <boost/scoped_ptr.hpp>
 
-#include <boost/monotonic/chain.h>
-#include <boost/monotonic/storage.h>
+#include <boost/monotonic/chain.hpp>
+#include <boost/monotonic/storage.hpp>
 
 template <class T
 , size_t C = 64

Modified: sandbox/monotonic/libs/monotonic/test/monotonic.vcproj
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/monotonic.vcproj (original)
+++ sandbox/monotonic/libs/monotonic/test/monotonic.vcproj 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -174,63 +174,63 @@
                                 Name="monotonic"
>
                                 <File
- RelativePath="..\..\..\boost\monotonic\allocator.h"
+ RelativePath="..\..\..\boost\monotonic\allocator.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\chain.h"
+ RelativePath="..\..\..\boost\monotonic\chain.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\config.h"
+ RelativePath="..\..\..\boost\monotonic\config.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\fixed_storage.h"
+ RelativePath="..\..\..\boost\monotonic\fixed_storage.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\forward_declarations.h"
+ RelativePath="..\..\..\boost\monotonic\forward_declarations.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\inline_clone_allocator.h"
+ RelativePath="..\..\..\boost\monotonic\inline_clone_allocator.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\list.h"
+ RelativePath="..\..\..\boost\monotonic\list.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\map.h"
+ RelativePath="..\..\..\boost\monotonic\map.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\ptr_list.h"
+ RelativePath="..\..\..\boost\monotonic\ptr_list.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\set.h"
+ RelativePath="..\..\..\boost\monotonic\set.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\shared_storage.h"
+ RelativePath="..\..\..\boost\monotonic\shared_storage.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\static_storage.h"
+ RelativePath="..\..\..\boost\monotonic\static_storage.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\storage.h"
+ RelativePath="..\..\..\boost\monotonic\storage.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\storage_base.h"
+ RelativePath="..\..\..\boost\monotonic\storage_base.hpp"
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\monotonic\vector.h"
+ RelativePath="..\..\..\boost\monotonic\vector.hpp"
>
                                 </File>
                         </Filter>
@@ -242,7 +242,7 @@
>
                                 </File>
                                 <File
- RelativePath="..\..\..\boost\utility\iter_range.h"
+ RelativePath="..\..\..\boost\utility\iter_range.hpp"
>
                                 </File>
                         </Filter>

Modified: sandbox/monotonic/libs/monotonic/test/rope.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/rope.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/rope.cpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -5,10 +5,10 @@
 
 // the sandbox is at https://svn.boost.org/svn/boost/sandbox/monotonic/
 
-#include <boost/monotonic/vector.h>
-#include <boost/monotonic/list.h>
-#include <boost/monotonic/map.h>
-#include <boost/monotonic/set.h>
+#include <boost/monotonic/vector.hpp>
+#include <boost/monotonic/list.hpp>
+#include <boost/monotonic/map.hpp>
+#include <boost/monotonic/set.hpp>
 
 #include <boost/timer.hpp>
 #include <boost/foreach.hpp>
@@ -20,7 +20,7 @@
 #include <boost/scoped_ptr.hpp>
 #include <boost/noncopyable.hpp>
 
-#include <boost/monotonic/chain.h>
+#include <boost/monotonic/chain.hpp>
 
 using namespace boost;
 using namespace std;

Modified: sandbox/monotonic/libs/monotonic/test/test_chained_storage.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/test_chained_storage.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/test_chained_storage.cpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -1,5 +1,5 @@
 
-#include <boost/monotonic/storage.h>
+#include <boost/monotonic/storage.hpp>
 
 void test_chained_storage()
 {

Modified: sandbox/monotonic/libs/monotonic/test/test_shared_storage.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/test_shared_storage.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/test_shared_storage.cpp 2009-06-17 00:46:13 EDT (Wed, 17 Jun 2009)
@@ -1,4 +1,4 @@
-//#include <boost/monotonic/shared_storage.h>
+//#include <boost/monotonic/shared_storage.hpp>
 //
 void test_shared_storage()
 {


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