3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/eval-if-c.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Metafunctions / Type Selection / eval_if_c |
template<
bool c
, typename F1
, typename F2
>
struct[eval\_if\_c](./eval-if-c.html){
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<c,f1,f2>::type is a shorcut notation for eval_if< bool_<c>,f1,f2 >::type.
#include <[boost/mpl/eval\_if.hpp](../../../../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](./eval-if-c.html)<c,f1,f2>::type t;
| Return type: | Any type. | | Semantics: | Equivalent to typedef eval_if< bool_<c>,f1,f2 >::type t; |
typedef[eval\_if\_c](./eval-if-c.html)< true,[identity](./identity.html)<char>,[identity](./identity.html)<long> >::type t1;
typedef[eval\_if\_c](./eval-if-c.html)< false,[identity](./identity.html)<char>,[identity](./identity.html)<long> >::type t2;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<t1,char> ));[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<t2,long> ));
Metafunctions, Integral Constant, eval_if, if_, bool_
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |