DUNE PDELab (git)

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
6namespace 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 namespace.
Definition: alignedallocator.hh:13
const T1 cond(bool b, const T1 &v1, const T2 &v2)
conditional evaluate
Definition: conditional.hh:28
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)