3 <title>BOOST_PP_IF
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_IF
</b> macro chooses between to values based on a logical condition.
12 <b>BOOST_PP_IF
</b>(
<i>cond
</i>,
<i>t
</i>,
<i>f
</i>)
18 The condition that determines if the result is
<i>expr
</i> or nothing.
19 Valid values range from
<i>0</i> to
<b>BOOST_PP_LIMIT_MAG
</b>.
23 The result of the expansion if
<i>cond
</i> is non-zero.
27 The result of the expansion if
<i>cond
</i> is
<i>0</i>.
32 This macro performs a boolean conversion on its first argument.
33 If that conversion is unnecessary, use
<b>BOOST_PP_IIF
</b> instead.
37 <li><a href=
"iif.html">BOOST_PP_IIF
</a></li>
38 <li><a href=
"limit_mag.html">BOOST_PP_LIMIT_MAG
</a></li>
42 <b>Header:
</b> <a href=
"../headers/control/if.html"><boost/preprocessor/control/if.hpp
></a>
46 #include
<<a href=
"../headers/control/if.html">boost/preprocessor/control/if.hpp
</a>>
48 <a href=
"if.html">BOOST_PP_IF
</a>(
10, a, b) // expands to a
49 <a href=
"if.html">BOOST_PP_IF
</a>(
0, a, b) // expands to b
52 <div style=
"margin-left: 0px;">
53 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
54 </br><i>© Copyright Paul Mensonides
2002</i>
56 <div style=
"margin-left: 0px;">
57 <p><small>Distributed under the Boost Software License, Version
1.0. (See
58 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
60 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>