dune-common  2.5.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
conditional.hh
Go to the documentation of this file.
1 #ifndef DUNE_COMMON_CONDITIONAL_HH
2 #define DUNE_COMMON_CONDITIONAL_HH
3 
4 namespace 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
const T1 cond(bool b, const T1 &v1, const T2 &v2)
conditional evaluate
Definition: conditional.hh:26