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