The BOOST_PP_BOOL macro performs a boolean conversion on its operand.

#### Usage

BOOST_PP_BOOL(x)

#### Arguments

x
  The value to be converted. Valid values range from 0 to BOOST_PP_LIMIT_MAG*.

#### Remarks

If x is 0, this macro expands to 0. Otherwise it expands to 1.
*If BOOST_PP_CONFIG_FLAGS does not include BOOST_PP_CONFIG_EDG, this macro can convert an infinite range--e.g. BOOST_PP_BOOL(123456789). However, it is not safe to rely on this behavior unless it is known that EDG-based compilers will never be used.

#### See Also

- BOOST_PP_LIMIT_MAG

#### Requirements

Header: <boost/preprocessor/logical/bool.hpp>

#### Sample Code

    #include <boost/preprocessor/logical/bool.hpp>

    BOOST_PP_BOOL(6) // expands to 1
    BOOST_PP_BOOL(0) // expands to 0

    #if ~BOOST_PP_CONFIG_FLAGS & BOOST_PP_CONFIG_EDG

    BOOST_PP_BOOL(123456789) // expands to 1

    #endif