less_equal_d.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <html>
  2. <head>
  3. <title>BOOST_PP_LESS_EQUAL_D</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_LESS_EQUAL_D</b> macro compares two values for equality or lesser magnitude.&nbsp;
  9. It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
  10. </div>
  11. <h4>Usage</h4>
  12. <div class="code">
  13. <b>BOOST_PP_LESS_EQUAL_D</b>(<i>d</i>, <i>x</i>, <i>y</i>)
  14. </div>
  15. <h4>Arguments</h4>
  16. <dl>
  17. <dt>d</dt>
  18. <dd>
  19. The next available <b>BOOST_PP_WHILE</b> iteration.&nbsp;
  20. </dd>
  21. <dt>x</dt>
  22. <dd>
  23. The left operand of the comparison.&nbsp;
  24. Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
  25. </dd>
  26. <dt>y</dt>
  27. <dd>
  28. The right operand of the comparison.&nbsp;
  29. Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_MAG</b>.
  30. </dd>
  31. </dl>
  32. <h4>Remarks</h4>
  33. <div>
  34. If <i>x</i> is less than or equal to <i>y</i>, this macro expands to <i>1</i>.&nbsp;
  35. Otherwise, it expands to <i>0</i>.
  36. </div>
  37. <h4>See Also</h4>
  38. <ul>
  39. <li><a href="less_equal.html">BOOST_PP_LESS_EQUAL</a></li>
  40. <li><a href="limit_mag.html">BOOST_PP_LIMIT_MAG</a></li>
  41. </ul>
  42. <h4>Requirements</h4>
  43. <div>
  44. <b>Header:</b> &nbsp;<a href="../headers/comparison/less_equal.html">&lt;boost/preprocessor/comparison/less_equal.hpp&gt;</a>
  45. </div>
  46. <h4>Sample Code</h4>
  47. <div><pre>
  48. #include &lt;<a href="../headers/comparison/less_equal.html">boost/preprocessor/comparison/less_equal.hpp</a>&gt;
  49. #include &lt;<a href="../headers/list/filter.html">boost/preprocessor/list/filter.hpp</a>&gt;
  50. #define LIST (1, (2, (3, (4, (5, <a href="nil.html">BOOST_PP_NIL</a>)))))
  51. #define PRED(d, _, num) <a href="less_equal_d.html">BOOST_PP_LESS_EQUAL_D</a>(d, num, 4)
  52. <a href="list_filter.html">BOOST_PP_LIST_FILTER</a>(PRED, nil, LIST)
  53. // expands to (1, (2, (3, (4, <a href="nil.html">BOOST_PP_NIL</a>))))
  54. </pre></div>
  55. <hr size="1">
  56. <div style="margin-left: 0px;">
  57. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  58. </br><i>© Copyright Paul Mensonides 2002</i>
  59. </div>
  60. <div style="margin-left: 0px;">
  61. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  62. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  63. copy at <a href=
  64. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  65. </div>
  66. </body>
  67. </html>