The BOOST_PP_IF macro chooses between to values based on a logical condition.

#### Usage

BOOST_PP_IF(cond, t, f)

#### Arguments

cond
  The condition that determines if the result is expr or nothing. Valid values range from 0 to BOOST_PP_LIMIT_MAG.
t
  The result of the expansion if cond is non-zero.
f
  The result of the expansion if cond is 0.

#### Remarks

This macro performs a boolean conversion on its first argument. If that conversion is unnecessary, use BOOST_PP_IIF instead.

#### See Also

- BOOST_PP_IIF
- BOOST_PP_LIMIT_MAG

#### Requirements

Header: <boost/preprocessor/control/if.hpp>

#### Sample Code

    #include <boost/preprocessor/control/if.hpp>

    BOOST_PP_IF(10, a, b) // expands to a
    BOOST_PP_IF(0, a, b) // expands to b