dune-common 2.8.0
Loading...
Searching...
No Matches
binaryfunctions.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_BINARYFUNCTIONS_HH
4#define DUNE_BINARYFUNCTIONS_HH
5
10#include <algorithm>
11
12namespace Dune
13{
14 template<typename Type>
15 struct Min
16 {
17 using first_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
18
19 using second_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
20
21 using result_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
22
23 Type operator()(const Type& t1, const Type& t2) const
24 {
25 using std::min;
26 return min(t1,t2);
27 }
28 };
29
30 template<typename Type>
31 struct Max
32 {
33 using first_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
34
35 using second_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
36
37 using result_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
38
39 Type operator()(const Type& t1, const Type& t2) const
40 {
41 using std::max;
42 return max(t1,t2);
43 }
44 };
45}
46
47#endif
Dune namespace.
Definition alignedallocator.hh:11
Definition binaryfunctions.hh:16
Type result_type
Definition binaryfunctions.hh:21
Type operator()(const Type &t1, const Type &t2) const
Definition binaryfunctions.hh:23
Type first_argument_type
Definition binaryfunctions.hh:17
Type second_argument_type
Definition binaryfunctions.hh:19
Definition binaryfunctions.hh:32
Type operator()(const Type &t1, const Type &t2) const
Definition binaryfunctions.hh:39
Type result_type
Definition binaryfunctions.hh:37
Type first_argument_type
Definition binaryfunctions.hh:33
Type second_argument_type
Definition binaryfunctions.hh:35
T max(T... args)
T min(T... args)