Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54256 - sandbox/monotonic/boost/monotonic
From: christian.schladetsch_at_[hidden]
Date: 2009-06-22 23:59:17


Author: cschladetsch
Date: 2009-06-22 23:59:17 EDT (Mon, 22 Jun 2009)
New Revision: 54256
URL: http://svn.boost.org/trac/boost/changeset/54256

Log:
deleted redundant types

Removed:
   sandbox/monotonic/boost/monotonic/local_allocator.hpp
   sandbox/monotonic/boost/monotonic/shared_allocator.hpp

Deleted: sandbox/monotonic/boost/monotonic/local_allocator.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/local_allocator.hpp 2009-06-22 23:59:17 EDT (Mon, 22 Jun 2009)
+++ (empty file)
@@ -1,75 +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_LOCAL_ALLOCATOR_HPP
-#define BOOST_MONOTONIC_LOCAL_ALLOCATOR_HPP
-
-#include <boost/monotonic/allocator_base.hpp>
-#include <boost/monotonic/thread_local_storage.hpp>
-
-namespace boost
-{
- namespace monotonic
- {
- template <>
- struct local_allocator<void>
- {
- typedef void* pointer;
- typedef const void* const_pointer;
-
- typedef void value_type;
- template <class U>
- struct rebind
- {
- typedef local_allocator<U> other;
- };
- };
-
- template <class T>
- struct local_allocator : allocator_base<T, local_allocator<T> >
- {
- typedef allocator_base<T, local_allocator<T> > Parent;
- using typename Parent::size_type;
- using typename Parent::difference_type;
- using typename Parent::pointer;
- using typename Parent::const_pointer;
- using typename Parent::reference;
- using typename Parent::const_reference;
- using typename Parent::value_type;
-
- template <class U>
- struct rebind
- {
- typedef local_allocator<U> other;
- };
-
- local_allocator() throw()
- : Parent(static_thread_local_storage) { }
-
- local_allocator(const local_allocator& alloc) throw()
- : Parent(alloc) { }
-
- template <class U>
- local_allocator(const local_allocator<U> &alloc) throw()
- : Parent(alloc) { }
-
- friend bool operator==(local_allocator<T> const &A, local_allocator<T> const &B)
- {
- return static_cast<Parent const &>(A) == static_cast<Parent const &>(B);
- }
-
- friend bool operator!=(local_allocator<T> const &A, local_allocator<T> const &B)
- {
- return static_cast<Parent const &>(A) == static_cast<Parent const &>(B);
- }
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_LOCAL_ALLOCATOR_HPP
-
-//EOF

Deleted: sandbox/monotonic/boost/monotonic/shared_allocator.hpp
==============================================================================
--- sandbox/monotonic/boost/monotonic/shared_allocator.hpp 2009-06-22 23:59:17 EDT (Mon, 22 Jun 2009)
+++ (empty file)
@@ -1,77 +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_ALLOCATOR_HPP
-#define BOOST_MONOTONIC_SHARED_ALLOCATOR_HPP
-
-#include <boost/monotonic/allocator_base.hpp>
-
-namespace boost
-{
- namespace monotonic
- {
- template <class Region>
- struct shared_allocator<void, Region>
- {
- typedef void* pointer;
- typedef const void* const_pointer;
-
- typedef void value_type;
- template <class U>
- struct rebind
- {
- typedef shared_allocator<U, Region> other;
- };
- };
-
- template <class T, class Region>
- struct shared_allocator : allocator_base<T, shared_allocator<T, Region> >
- {
- typedef allocator_base<T, shared_allocator<T, Region> > Parent;
- using typename Parent::size_type;
- using typename Parent::difference_type;
- using typename Parent::pointer;
- using typename Parent::const_pointer;
- using typename Parent::reference;
- using typename Parent::const_reference;
- using typename Parent::value_type;
-
- //typedef storage<DefaultSizes::InlineSize, DefaultSizes::MinHeapIncrement, std::allocator<char>, shared_storage>
- // StorageType;
-
- template <class U>
- struct rebind
- {
- typedef shared_allocator<U, Region> other;
- };
-
- shared_allocator() throw()
- : Parent(get_region_storage<Region>()) { }
-
- shared_allocator(const shared_allocator& alloc) throw()
- : Parent(alloc) { }
-
- template <class U>
- shared_allocator(const shared_allocator<U, Region> &alloc) throw()
- : Parent(alloc) { }
-
- friend bool operator==(shared_allocator<T,Region> const &A, shared_allocator<T,Region> const &B)
- {
- return static_cast<Parent const &>(A) == static_cast<Parent const &>(B);
- }
-
- friend bool operator!=(shared_allocator<T,Region> const &A, shared_allocator<T,Region> const &B)
- {
- return static_cast<Parent const &>(A) == static_cast<Parent const &>(B);
- }
- };
-
- } // namespace monotonic
-
-} // namespace boost
-
-#endif // BOOST_MONOTONIC_SHARED_ALLOCATOR_HPP
-
-//EOF


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