]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <title>BOOST_PP_BITXOR</title> | |
4 | <link rel="stylesheet" type="text/css" href="../styles.css"> | |
5 | ||
6 | </head> | |
7 | <body> | |
8 | <div style="margin-left: 0px;"> | |
9 | The <b>BOOST_PP_BITXOR</b> macro expands to the bitwise <i>XOR</i> of its operands. | |
10 | </div> | |
11 | <h4>Usage</h4> | |
12 | <div class="code"> | |
13 | <b>BOOST_PP_BITXOR</b>(<i>x</i>, <i>y</i>) | |
14 | </div> | |
15 | <h4>Arguments</h4> | |
16 | <dl> | |
17 | <dt>x</dt> | |
18 | <dd> | |
19 | The left operand of the operation. | |
20 | This value must expand to <i>0</i> or <i>1</i>. | |
21 | </dd> | |
22 | <dt>y</dt> | |
23 | <dd> | |
24 | The right operand of the operation. | |
25 | This value must expand to <i>0</i> or <i>1</i>. | |
26 | </dd> | |
27 | </dl> | |
28 | <h4>Remarks</h4> | |
29 | <div> | |
30 | If either <i>x</i> or <i>y</i> is <i>1</i> exclusively, this macro expands to <i>1</i>. | |
31 | Otherwise, it expands to <i>0</i>. | |
32 | </div> | |
33 | <div> | |
34 | This macro <i>does not</i> perform a boolean conversion on either operand before performing the bitwise <i>OR</i> operation. | |
35 | If that conversion is necessary, use <b>BOOST_PP_XOR</b> instead. | |
36 | </div> | |
37 | <h4>See Also</h4> | |
38 | <ul> | |
39 | <li><a href="xor.html">BOOST_PP_XOR</a></li> | |
40 | </ul> | |
41 | <h4>Requirements</h4> | |
42 | <div> | |
43 | <b>Header:</b> <a href="../headers/logical/bitxor.html"><boost/preprocessor/logical/bitxor.hpp></a> | |
44 | </div> | |
45 | <h4>Sample Code</h4> | |
46 | <div><pre> | |
47 | #include <<a href="../headers/logical/bitxor.html">boost/preprocessor/logical/bitxor.hpp</a>> | |
48 | ||
49 | <a href="bitxor.html">BOOST_PP_BITXOR</a>(0, 0) // expands to 0 | |
50 | <a href="bitxor.html">BOOST_PP_BITXOR</a>(0, 1) // expands to 1 | |
51 | <a href="bitxor.html">BOOST_PP_BITXOR</a>(1, 0) // expands to 1 | |
52 | <a href="bitxor.html">BOOST_PP_BITXOR</a>(1, 1) // expands to 0 | |
53 | </pre></div> | |
54 | <hr size="1"> | |
55 | <div style="margin-left: 0px;"> | |
56 |