Dune Core Modules (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
14namespace 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
auto min(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::min()
Definition: defaults.hh:89
auto max(ADLTag< 0 >, const V &v1, const V &v2)
implements binary Simd::max()
Definition: defaults.hh:81
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)