compl.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.&nbsp;
  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>.&nbsp;
  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.&nbsp;
  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> &nbsp;<a href="../headers/logical/compl.html">&lt;boost/preprocessor/logical/compl.hpp&gt;</a>
  38. </div>
  39. <h4>Sample Code</h4>
  40. <div><pre>
  41. #include &lt;<a href="../headers/logical/compl.html">boost/preprocessor/logical/compl.hpp</a>&gt;
  42. <a href="compl.html">BOOST_PP_COMPL</a>(1) // expands to 0
  43. <a href="compl.html">BOOST_PP_COMPL</a>(0) // expands to 1
  44. </pre></div>
  45. <hr size="1">
  46. <div style="margin-left: 0px;">
  47. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  48. </br><i>© Copyright Paul Mensonides 2002</i>
  49. </div>
  50. <div style="margin-left: 0px;">
  51. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  52. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  53. copy at <a href=
  54. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  55. </div>
  56. </body>
  57. </html>