3#ifndef DUNE_ISTL_ALLOCATOR_HH
4#define DUNE_ISTL_ALLOCATOR_HH
9#include <dune/common/typetraits.hh>
15 static const bool value =
true;
18 template<
typename T,
typename =
void>
19 struct DefaultAllocatorTraits
21 using type = std::allocator<T>;
25 struct DefaultAllocatorTraits<T,
std::void_t<typename T::allocator_type> >
27 using type =
typename T::allocator_type;
31 struct AllocatorTraits :
public DefaultAllocatorTraits<T> {};
34 using AllocatorType =
typename AllocatorTraits<T>::type;
36 template<
typename T,
typename X>
37 using ReboundAllocatorType =
typename std::allocator_traits<typename AllocatorTraits<T>::type>::template rebind_alloc<X>;