1#ifndef DUNE_ISTL_ALLOCATOR_HH
2#define DUNE_ISTL_ALLOCATOR_HH
7#include <dune/common/typetraits.hh>
13 static const bool value =
true;
16 template<
typename T,
typename =
void>
17 struct DefaultAllocatorTraits
19 using type = std::allocator<T>;
23 struct DefaultAllocatorTraits<T, std::void_t<typename T::allocator_type> >
25 using type =
typename T::allocator_type;
29 struct AllocatorTraits :
public DefaultAllocatorTraits<T> {};
32 using AllocatorType =
typename AllocatorTraits<T>::type;
34 template<
typename T,
typename X>
35 using ReboundAllocatorType =
typename std::allocator_traits<typename AllocatorTraits<T>::type>::template rebind_alloc<X>;