dune-common  2.9.0
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 // SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5 #ifndef DUNE_BINARYFUNCTIONS_HH
6 #define DUNE_BINARYFUNCTIONS_HH
7 
12 #include <algorithm>
13 
14 namespace Dune
15 {
16  template<typename Type>
17  struct Min
18  {
19  using first_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
20 
21  using second_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
22 
23  using result_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
24 
25  Type operator()(const Type& t1, const Type& t2) const
26  {
27  using std::min;
28  return min(t1,t2);
29  }
30  };
31 
32  template<typename Type>
33  struct Max
34  {
35  using first_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
36 
37  using second_argument_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
38 
39  using result_type [[deprecated("This type alias is deprecated following similar deprecations in C++17")]] = Type;
40 
41  Type operator()(const Type& t1, const Type& t2) const
42  {
43  using std::max;
44  return max(t1,t2);
45  }
46  };
47 }
48 
49 #endif
Dune namespace.
Definition: alignedallocator.hh:13
auto min(const AlignedNumber< T, align > &a, const AlignedNumber< T, align > &b)
Definition: debugalign.hh:447
auto max(const AlignedNumber< T, align > &a, const AlignedNumber< T, align > &b)
Definition: debugalign.hh:425
Definition: binaryfunctions.hh:18
Type result_type
Definition: binaryfunctions.hh:23
Type operator()(const Type &t1, const Type &t2) const
Definition: binaryfunctions.hh:25
Type first_argument_type
Definition: binaryfunctions.hh:19
Type second_argument_type
Definition: binaryfunctions.hh:21
Definition: binaryfunctions.hh:34
Type operator()(const Type &t1, const Type &t2) const
Definition: binaryfunctions.hh:41
Type result_type
Definition: binaryfunctions.hh:39
Type first_argument_type
Definition: binaryfunctions.hh:35
Type second_argument_type
Definition: binaryfunctions.hh:37