Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Sacado_mpl_if.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Sacado Package
4 //
5 // Copyright 2006 NTESS and the Sacado contributors.
6 // SPDX-License-Identifier: LGPL-2.1-or-later
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef SACADO_MPL_IF_HPP
11 #define SACADO_MPL_IF_HPP
12 
13 #include "Sacado_mpl_type_wrap.hpp"
14 
15 namespace Sacado {
16 
17  namespace mpl {
18 
19  template <bool cond, class T1, class T2> struct mpl_if_c {};
20  template <class T1, class T2> struct mpl_if_c<true,T1,T2> :
21  type_wrap<T1> {};
22  template <class T1, class T2> struct mpl_if_c<false,T1,T2> :
23  type_wrap<T2> {};
24 
25  template <class C, class T1, class T2> struct mpl_if :
26  mpl_if_c<C::value,T1,T2> {};
27 
28  }
29 
30 }
31 
32 #endif // SACADO_MPL_IF_HPP
expr true
#define T2(r, f)
Definition: Sacado_rad.hpp:558
#define T1(r, f)
Definition: Sacado_rad.hpp:583
expr expr expr bar false