Back to Arangodb

BOOST_PP_AND

3rdParty/boost/1.78.0/libs/preprocessor/doc/ref/and.html

3.12.9.11.3 KB
Original Source

The BOOST_PP_AND macro expands to the logical AND of its operands.

Usage

BOOST_PP_AND (p, q)

Arguments

p The left operand of the operation. Valid values range from 0 to BOOST_PP_LIMIT_MAG. q The right operand of the operation. Valid values range from 0 to BOOST_PP_LIMIT_MAG.

Remarks

If both p and q are non-zero, this macro expands to 1. Otherwise, it expands to 0.

This macro performs a boolean conversion on each operand before performing the logical AND operation. If that conversion is not necessary, use BOOST_PP_BITAND instead.

See Also

Requirements

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

Sample Code

#include <[boost/preprocessor/logical/and.hpp](../headers/logical/and.html)>[BOOST\_PP\_AND](and.html)(4, 3) // expands to 1[BOOST\_PP\_AND](and.html)(5, 0) // expands to 0

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)