DUNE
Distributed and Unified Numerics Environment
DUNE-FEM (unstable)
dune
common
conditional.hh
1
// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
#ifndef DUNE_COMMON_CONDITIONAL_HH
4
#define DUNE_COMMON_CONDITIONAL_HH
5
6
namespace
Dune
7
{
8
27
template
<
typename
T1,
typename
T2>
28
const
T1
cond
(
bool
b,
const
T1 & v1,
const
T2 & v2)
29
{
30
return
(b ? v1 : v2);
31
}
32
33
}
// end namespace Dune
34
35
#endif
// DUNE_COMMON_CONDITIONAL_HH
Dune
Dune namespace.
Definition:
alignedallocator.hh:13
Dune::cond
const T1 cond(bool b, const T1 &v1, const T2 &v2)
conditional evaluate
Definition:
conditional.hh:28
|
Legal Statements / Impressum
| Hosted by
TU Dresden
| generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)