seq_insert.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <html>
  2. <head>
  3. <title>BOOST_PP_SEQ_INSERT</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_SEQ_INSERT</b> macro inserts an element into an <i>seq</i>.
  9. </div>
  10. <h4>
  11. Usage
  12. </h4>
  13. <div class="code">
  14. <b>BOOST_PP_SEQ_INSERT</b>(<i>seq</i>, <i>i</i>, <i>elem</i>)
  15. </div>
  16. <h4>
  17. Arguments
  18. </h4>
  19. <dl>
  20. <dt>seq</dt>
  21. <dd>
  22. The <i>seq</i> into which an element is to be inserted.
  23. </dd>
  24. <dt>i</dt>
  25. <dd>
  26. The zero-based position in <i>seq</i> where an element is to be inserted.&nbsp;
  27. Valid values range from <i>0</i> to <b>BOOST_PP_SEQ_SIZE</b>(<i>seq</i>) - <i>1</i>.
  28. </dd>
  29. <dt>elem</dt>
  30. <dd>
  31. The element to insert.
  32. </dd>
  33. </dl>
  34. <h4>
  35. Remarks
  36. </h4>
  37. <div>
  38. This macro inserts <i>elem</i> before the element at index <i>i</i>.
  39. </div>
  40. <h4>
  41. Requirements
  42. </h4>
  43. <div>
  44. <b>Header:</b> &nbsp;<a href="../headers/seq/insert.html">&lt;boost/preprocessor/seq/insert.hpp&gt;</a>
  45. </div>
  46. <h4>
  47. Sample Code
  48. </h4>
  49. <div>
  50. <pre>
  51. #include &lt;<a href="../headers/seq/insert.html">boost/preprocessor/seq/insert.hpp</a>&gt;
  52. #define SEQ (a)(b)(d)
  53. <a href="seq_insert.html">BOOST_PP_SEQ_INSERT</a>(SEQ, 2, c) // expands to (a)(b)(c)(d)
  54. </pre>
  55. </div>
  56. <hr size="1">
  57. <div style="margin-left: 0px;">
  58. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  59. </br><i>© Copyright Paul Mensonides 2002</i>
  60. </div>
  61. <div style="margin-left: 0px;">
  62. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  63. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  64. copy at <a href=
  65. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  66. </div>
  67. </body>
  68. </html>