dune-istl
2.7.1
About:
dune-istl
- DUNE (Distributed and Unified Numerics Environment) is a modular toolbox for solving partial differential equations (PDEs) with grid-based methods: DUNE Iterative Solver Template Library.
Fossies
Dox
:
dune-istl-2.7.1.tar.gz
("unofficial" and yet experimental doxygen-generated source code documentation)
allocator.hh
Go to the documentation of this file.
1
#ifndef DUNE_ISTL_ALLOCATOR_HH
2
#define DUNE_ISTL_ALLOCATOR_HH
3
4
#include <dune/common/typetraits.hh>
5
#include <memory>
6
7
namespace
Dune
{
8
9
template
<
typename
T>
10
struct
exists
{
11
static
const
bool
value
=
true
;
12
};
13
14
template
<
typename
T,
typename
=
void
>
15
struct
DefaultAllocatorTraits
16
{
17
using
type
= std::allocator<T>;
18
};
19
20
template
<
typename
T>
21
struct
DefaultAllocatorTraits
<T, void_t<typename T::allocator_type> >
22
{
23
using
type
=
typename
T::allocator_type;
24
};
25
26
template
<
typename
T>
27
struct
AllocatorTraits
:
public
DefaultAllocatorTraits
<T> {};
28
29
template
<
typename
T>
30
using
AllocatorType
=
typename
AllocatorTraits<T>::type
;
31
32
template
<
typename
T,
typename
X>
33
using
ReboundAllocatorType
=
typename
std::allocator_traits<typename AllocatorTraits<T>::type>::template rebind_alloc<X>;
34
35
}
// end namespace Dune
36
37
#endif
// DUNE_ISTL_ALLOCATOR_HH
Dune
Definition:
allocator.hh:7
Dune::ReboundAllocatorType
typename std::allocator_traits< typename AllocatorTraits< T >::type >::template rebind_alloc< X > ReboundAllocatorType
Definition:
allocator.hh:33
Dune::AllocatorType
typename AllocatorTraits< T >::type AllocatorType
Definition:
allocator.hh:30
Dune::AllocatorTraits
Definition:
allocator.hh:27
Dune::DefaultAllocatorTraits< T, void_t< typename T::allocator_type > >::type
typename T::allocator_type type
Definition:
allocator.hh:23
Dune::DefaultAllocatorTraits
Definition:
allocator.hh:16
Dune::DefaultAllocatorTraits::type
std::allocator< T > type
Definition:
allocator.hh:17
Dune::exists
Definition:
allocator.hh:10
Dune::exists::value
static const bool value
Definition:
allocator.hh:11
dune
istl
allocator.hh
Generated by
1.9.0