The BOOST_PP_NOT macro performs a logical NOT on its operand.

Usage

BOOST_PP_NOT(x)

Arguments

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

Remarks

If x is zero, this macro expands to 1.  Otherwise, it expands to 0.
This macro performs a boolean conversion on its operand before performing the logical NOT operation.  If that conversion is not necessary, use BOOST_PP_COMPL instead.

See Also

Requirements

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

Sample Code

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

BOOST_PP_NOT(55) // expands to 0
BOOST_PP_NOT(0) // expands to 1

© Copyright Housemarque Oy 2002
© Copyright Paul Mensonides 2002

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt)