dune-common 3.0-git
conditional.hh
Go to the documentation of this file.
1#ifndef DUNE_COMMON_CONDITIONAL_HH
2#define DUNE_COMMON_CONDITIONAL_HH
3
4namespace Dune
5{
6
25 template<typename T1, typename T2>
26 const T1 cond(bool b, const T1 & v1, const T2 & v2)
27 {
28 return (b ? v1 : v2);
29 }
30
31} // end namespace Dune
32
33#endif // DUNE_COMMON_CONDITIONAL_HH
Dune namespace.
Definition alignment.hh:11
const T1 cond(bool b, const T1 &v1, const T2 &v2)
conditional evaluate
Definition conditional.hh:26