Brian Silverman | f27e085 | 2018-08-04 23:56:45 -0700 | [diff] [blame^] | 1 | <html> |
| 2 | <head> |
| 3 | <title>BOOST_PP_SEQ_FIRST_N</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_FIRST_N</b> macro expands to a <i>seq</i> of the first <i>n</i> |
| 9 | elements of a <i>seq</i>. |
| 10 | </div> |
| 11 | <h4> |
| 12 | Usage |
| 13 | </h4> |
| 14 | <div class="code"> |
| 15 | <b>BOOST_PP_SEQ_FIRST_N</b>(<i>n</i>, <i>seq</i>) |
| 16 | </div> |
| 17 | <h4> |
| 18 | Arguments |
| 19 | </h4> |
| 20 | <dl> |
| 21 | <dt>n</dt> |
| 22 | <dd> |
| 23 | The number of elements to extract. |
| 24 | </dd> |
| 25 | <dt>seq</dt> |
| 26 | <dd> |
| 27 | The <i>seq</i> from which the elements are extracted. |
| 28 | </dd> |
| 29 | </dl> |
| 30 | <h4> |
| 31 | Remarks |
| 32 | </h4> |
| 33 | <div> |
| 34 | This macro extracts <i>n</i> elements from the beginning of <i>seq</i> and |
| 35 | returns them as a new <i>seq</i> |
| 36 | </div> |
| 37 | <h4> |
| 38 | See Also |
| 39 | </h4> |
| 40 | <ul> |
| 41 | <li> |
| 42 | <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a></li> |
| 43 | </ul> |
| 44 | <h4> |
| 45 | Requirements |
| 46 | </h4> |
| 47 | <div> |
| 48 | <b>Header:</b> <a href="../headers/seq/first_n.html"><boost/preprocessor/seq/first_n.hpp></a> |
| 49 | </div> |
| 50 | <h4> |
| 51 | Sample Code |
| 52 | </h4> |
| 53 | <div> |
| 54 | <pre>#include <<a href="../headers/seq/first_n.html">boost/preprocessor/seq/first_n.hpp</a>><br><br>#define SEQ (a)(b)(c)(d)(e)<br><br><a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a>(2, SEQ) // expands to (a)(b)<br></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="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> |
| 65 | </div> |
| 66 | </body> |
| 67 | </html> |