Dune Core Modules (2.5.0)

typeutilities.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 #ifndef DUNE_COMMON_TYPEUTILITIES_HH
4 #define DUNE_COMMON_TYPEUTILITIES_HH
5 
6 #include <cstddef>
7 #include <type_traits>
8 #include <tuple>
9 
10 
11 namespace Dune {
12 
29  template<class This, class... T>
30  using disableCopyMove = typename std::enable_if<
31  (not(std::is_same<This, typename std::tuple_element<0, std::tuple<typename std::decay<T>::type...> >::type >::value)
32  and not(std::is_base_of<This, typename std::tuple_element<0, std::tuple<typename std::decay<T>::type...> >::type >::value)), int>::type;
33 
34 
35 
58  template<std::size_t priority>
59  struct PriorityTag : public PriorityTag<priority-1>
60  {};
61 
70  template<>
71  struct PriorityTag<0>
72  {};
73 
74 
75 
76 } // namespace Dune
77 
78 
79 
80 #endif // DUNE_COMMON_TYPEUTILITIES_HH
typename std::enable_if<(not(std::is_same< This, typename std::tuple_element< 0, std::tuple< typename std::decay< T >::type... > >::type >::value) and not(std::is_base_of< This, typename std::tuple_element< 0, std::tuple< typename std::decay< T >::type... > >::type >::value)), int >::type disableCopyMove
Helper to disable constructor as copy and move constructor.
Definition: typeutilities.hh:32
Dune namespace.
Definition: alignment.hh:11
Helper class for tagging priorities.
Definition: typeutilities.hh:60
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (May 16, 22:29, 2024)