diff --git a/dune/common/poolallocator.hh b/dune/common/poolallocator.hh index 14932c01e43b46afe4eff170e8c72e97afb0e7b1..a9e91bd1519b800a9728c4ef2c14af217a28ab09 100644 --- a/dune/common/poolallocator.hh +++ b/dune/common/poolallocator.hh @@ -233,9 +233,6 @@ namespace Dune * This means that assuming that N objects fit into memory only every N-th * request for an object will result in memory allocation. * - * @warning This class currently falls back to std::allocator as the current - * implementation has serious and hard to find bugs. - * * @warning It is not suitable * for the use in standard containers as it cannot allocate * arrays of arbitrary size @@ -245,10 +242,6 @@ namespace Dune */ template<class T, std::size_t s> class PoolAllocator -#ifndef USE_DUNE_POOL - : public std::allocator<T> - {}; -#else { //friend std::ostream& std::operator<<<>(std::ostream&,PoolAllocator<T,s>&); @@ -343,24 +336,18 @@ namespace Dune /** * @brief Convert a reference to a pointer. */ - inline pointer address(reference x) const { - return &x; - } + inline pointer address(reference x) const { return &x; } /** * @brief Convert a reference to a pointer. */ - inline const_pointer address(const_reference x) const { - return &x; - } + inline const_pointer address(const_reference x) const { return &x; } /** * @brief Not correctly implemented, yet! */ - inline int max_size() const throw(){ - return 1; - } + inline int max_size() const throw(){ return 1;} /** * @brief Rebind the allocator to another type. @@ -465,7 +452,6 @@ namespace Dune { return false; } -#endif template<class T, std::size_t S> inline Pool<T,S>::Pool() @@ -557,8 +543,6 @@ namespace Dune return reinterpret_cast<T*>(p); } -#ifdef USE_DUNE_POOL - template<class T, std::size_t s> typename PoolAllocator<T,s>::PoolType PoolAllocator<T,s>::memoryPool_; @@ -591,7 +575,7 @@ namespace Dune { p->~T(); } -#endif + /** @} */ } #endif