Skip to content
Snippets Groups Projects
Commit 787bfdf7 authored by Christian Engwer's avatar Christian Engwer
Browse files

reverted AllocatrType traits

[[Imported from SVN: r5032]]
parent 4b5f95af
No related branches found
No related tags found
No related merge requests found
......@@ -355,57 +355,6 @@ namespace Dune
{
typedef T2 Type;
};
/**
* @brief provided one allocator, get the same allocator for a different object type
*
* the resulting type is exported as Type
*
* this class does not implement anything, it must be specialized
* for each allocator class in use
*/
template <class A, class T>
struct AllocatorType;
/**
@copydoc AllocatorType
specialization for all allocators of the for ALLOCATOR<TYPE>
this is expected to work for
std::allocator
__gnu_cxx::new_allocator<T>
__gnu_cxx::malloc_allocator<T>
__gnu_cxx::__pool_alloc<T>
__gnu_cxx::__mt_alloc<T>
__gnu_cxx::bitmap_allocator<T>
__gnu_cxx::array_allocator<T>
__gnu_cxx::throw_allocator<T>
*/
template <template<class> class Allocator, class T1, class T2>
struct AllocatorType< Allocator<T1>, T2 >
{
typedef Allocator<T2> Type;
};
#ifdef _DEBUG_ALLOCATOR_H
/**
@copydoc AllocatorType
if you want to use this specialization, you have to ensure that
<ext/debug_allocator.h> is included before <dune/common/typetraits.hh>
specialization for __gnu_cxx::debug_allocator< Allocator >
*/
template <class A, class T>
struct AllocatorType< __gnu_cxx::debug_allocator<A>, T >
{
typedef typename __gnu_cxx::debug_allocator< typename AllocatorType<A,T>::Type > Type;
};
#endif
/** @} */
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment