BOOST_PP_XOR

The BOOST_PP_XOR macro expands to the logical XOR of its operands.

#### Usage

BOOST_PP_XOR(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 either p or q is non-zero exclusively, this macro expands to 1. Otherwise, it expands to 0.
This macro performs a boolean conversion on each operand before performing the logical XOR operation. If that conversion is not necessary, use BOOST_PP_BITXOR instead.

#### See Also

- BOOST_PP_BITXOR
- BOOST_PP_LIMIT_MAG

#### Requirements

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

#### Sample Code

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

    BOOST_PP_XOR(4, 3) // expands to 0
    BOOST_PP_XOR(5, 0) // expands to 1