1 #ifndef DUNE_FEM_COMMON_UTILITY_HH 2 #define DUNE_FEM_COMMON_UTILITY_HH 33 static constexpr T
sum ( T a )
38 template<
class T,
class ... U >
39 static constexpr T
sum ( T a, U ... b )
41 return a +
sum( b ... );
49 static constexpr T
sub ( T a )
54 template<
class T,
class ... U >
55 static constexpr T
sub ( T a, U ... b )
57 return a -
sub( b ... );
65 static constexpr T
max ( T a )
70 template<
class T,
class ... U >
71 static constexpr T
max ( T a, U ... b )
73 return a >
max( b ... )? a :
max( b ... );
81 static constexpr T
min ( T a )
86 template<
class T,
class ... U >
87 static constexpr T
min ( T a, U ... b )
89 return a <
min( b ... )? a :
min( b ... );
98 static constexpr
bool Or (
bool a )
103 template <
class ... U >
104 static constexpr
bool Or (
bool a, U ... b )
106 return a ||
Or( b ... );
113 static constexpr
bool And (
bool a )
118 template<
class B,
class ... U >
119 static constexpr
bool And ( B a, U ... b )
121 return a &&
And( b... );
134 template<
class ... T >
140 template<
class U,
class V,
class ... T >
142 :
public std::integral_constant< bool, std::is_same< U, V >::value &&are_all_same< V, T ... >::value >
149 #endif // #ifndef DUNE_FEM_COMMON_UTILITY_HH static constexpr T min(T a)
Definition: utility.hh:81
Definition: utility.hh:135
static constexpr T max(T a)
Definition: utility.hh:65
static constexpr T sum(T a)
Definition: utility.hh:33
static constexpr T sub(T a)
Definition: utility.hh:49
Definition: coordinate.hh:4
static constexpr bool Or(bool a)
Definition: utility.hh:98
static constexpr bool And(bool a)
Definition: utility.hh:113