empty.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <html>
  2. <head>
  3. <title>BOOST_PP_EMPTY</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_EMPTY</b> macro is a nullary utility macro that expands to nothing.
  9. </div>
  10. <h4>Usage</h4>
  11. <div class="code">
  12. <b>BOOST_PP_EMPTY</b>()
  13. </div>
  14. <h4>Remarks</h4>
  15. <div>
  16. This macro is helps avoid inefficient macro-expansion.&nbsp;
  17. It is primarily useful as arguments to <b>BOOST_PP_IF</b> or <b>BOOST_PP_IIF</b>.
  18. </div>
  19. <h4>Requirements</h4>
  20. <div>
  21. <b>Header:</b> &nbsp;<a href="../headers/facilities/empty.html">&lt;boost/preprocessor/facilities/empty.hpp&gt;</a>
  22. </div>
  23. <h4>Sample Code</h4>
  24. <div><pre>
  25. #include &lt;<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>&gt;
  26. #include &lt;<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>&gt;
  27. #define X() result
  28. #define MACRO(c) <a href="if.html">BOOST_PP_IF</a>(c, X, <a href="empty.html">BOOST_PP_EMPTY</a>)()
  29. MACRO(0) // expands to nothing
  30. MACRO(1) // expands to result
  31. </pre></div>
  32. <hr size="1">
  33. <div style="margin-left: 0px;">
  34. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  35. </br><i>© Copyright Paul Mensonides 2002</i>
  36. </div>
  37. <div style="margin-left: 0px;">
  38. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  39. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  40. copy at <a href=
  41. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  42. </div>
  43. </body>
  44. </html>