...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Front Page / Metafunctions / Type Selection / eval_if_c |
template< bool c , typename F1 , typename F2 > struct eval_if_c { typedef unspecified type; };
Evaluates one of its two nullary-metafunction arguments, F1 or F2, depending
on the value of integral constant c. eval_if_c
#include <boost/mpl/eval_if.hpp>
Parameter | Requirement | Description |
---|---|---|
c | An integral constant | An evaluation condition. |
F1, F2 | Nullary Metafunction | Metafunctions to select for evaluation from. |
For any integral constant c and nullary Metafunctions f1, f2:
typedef eval_if_c::type t;
Return type: | Any type. |
---|---|
Semantics: | Equivalent to typedef eval_if< bool_ |
typedef eval_if_c< true, identity, identity >::type t1; typedef eval_if_c< false, identity , identity >::type t2; BOOST_MPL_ASSERT(( is_same )); BOOST_MPL_ASSERT(( is_same ));