dune-pdelab 2.9
Loading...
Searching...
No Matches
typetraits.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4#ifndef DUNE_PDELAB_COMMON_TYPETRAITS_HH
5#define DUNE_PDELAB_COMMON_TYPETRAITS_HH
6
9
10namespace Dune {
11 namespace PDELab {
12
13 // Import AlwaysVoid from TypeTree library
14 using TypeTree::AlwaysVoid;
15
16 // forward decl of Tag defined in function.hh
17 struct GridFunctionTag;
18 struct PowerGridFunctionTag;
19 struct CompositeGridFunctionTag;
20
21#ifndef DOXYGEN
22
23 namespace impl {
24
25 template<typename T, typename = void>
26 struct IsGridFunction
27 {
28 static const bool value = false;
29 };
30
31 template<typename T>
32 struct IsGridFunction<T, typename AlwaysVoid<TypeTree::ImplementationTag<T>>::type >
33 {
34 using A = TypeTree::ImplementationTag<T>;
38 };
39
40 } // namespace impl
41
42#endif // DOXYGEN
43
44 template<typename T>
46
47 } // end namespace PDELab
48} // end namespace Dune
49
50#endif // DUNE_PDELAB_COMMON_TYPETRAITS_HH
typename std::decay_t< T >::ImplementationTag ImplementationTag
std::integral_constant< bool, impl::IsGridFunction< std::decay_t< T > >::value > IsGridFunction
Definition typetraits.hh:45
For backward compatibility – Do not use this!
Implementation & impl()
static const unsigned int value
Definition gridfunctionspace/tags.hh:139