]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <title>BOOST_PP_SEQ_REPLACE</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_REPLACE</b> macro replaces an element in a <i>seq</i>. | |
9 | </div> | |
10 | <h4> | |
11 | Usage | |
12 | </h4> | |
13 | <div class="code"> | |
14 | <b>BOOST_PP_SEQ_REPLACE</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> in which an element is to be replaced. | |
23 | </dd> | |
24 | <dt>i</dt> | |
25 | <dd> | |
26 | The zero-based position in <i>seq</i> of the element to be replaced. | |
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 replace the element at index <i>i</i> within <i>seq</i>. | |
32 | </dd> | |
33 | </dl> | |
34 | <h4> | |
35 | Remarks | |
36 | </h4> | |
37 | <div> | |
38 | This macro returns <i>seq</i> after replacing the element at index <i>i</i> with | |
39 | <i>elem</i>. | |
40 | </div> | |
41 | <h4> | |
42 | Requirements | |
43 | </h4> | |
44 | <div> | |
45 | <b>Header:</b> <a href="../headers/seq/replace.html"><boost/preprocessor/seq/replace.hpp></a> | |
46 | </div> | |
47 | <h4> | |
48 | Sample Code | |
49 | </h4> | |
50 | <div> | |
51 | <pre> | |
52 | #include <<a href="../headers/seq/replace.html">boost/preprocessor/seq/replace.hpp</a>> | |
53 | ||
54 | #define SEQ (a)(b)(x)(d) | |
55 | ||
56 | <a href="seq_replace.html">BOOST_PP_SEQ_REPLACE</a>(SEQ, 2, c) // expands to (a)(b)(c)(d) | |
57 | </pre> | |
58 | </div> | |
59 | <hr size="1"> | |
60 | <div style="margin-left: 0px;"> | |
61 |