1 | <html> |
---|
2 | <head> |
---|
3 | <title>BOOST_PP_COUNTER</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_COUNTER</b> macro expands to the current counter value. |
---|
9 | </div> |
---|
10 | <h4>Usage</h4> |
---|
11 | <div class="code"> |
---|
12 | <b>BOOST_PP_COUNTER</b> |
---|
13 | </div> |
---|
14 | <h4>Remarks</h4> |
---|
15 | <div> |
---|
16 | This macro expands to an integer literal. |
---|
17 | Its initial value is <code>0</code>. |
---|
18 | Between usages of <b>BOOST_PP_UPDATE_COUNTER</b>, the value of <b>BOOST_PP_COUNTER</b> is constant. |
---|
19 | </div> |
---|
20 | <h4>See Also</h4> |
---|
21 | <ul> |
---|
22 | <li><a href="update_counter.html">BOOST_PP_UPDATE_COUNTER</a></li> |
---|
23 | </ul> |
---|
24 | <h4>Requirements</h4> |
---|
25 | <div> |
---|
26 | <b>Header:</b> <a href="../headers/slot/counter.html"><boost/preprocessor/slot/counter.hpp></a> |
---|
27 | </div> |
---|
28 | <h4>Sample Code</h4> |
---|
29 | <div><pre> |
---|
30 | #include <<a href="../headers/array/insert.html">boost/preprocessor/slot/counter.hpp</a>> |
---|
31 | |
---|
32 | <a href="counter.html">BOOST_PP_COUNTER</a> // 0 |
---|
33 | |
---|
34 | #include <a href="update_counter.html">BOOST_PP_UPDATE_COUNTER</a>() |
---|
35 | |
---|
36 | <a href="counter.html">BOOST_PP_COUNTER</a> // 1 |
---|
37 | |
---|
38 | #include <a href="update_counter.html">BOOST_PP_UPDATE_COUNTER</a>() |
---|
39 | |
---|
40 | <a href="counter.html">BOOST_PP_COUNTER</a> // 2 |
---|
41 | |
---|
42 | #include <a href="update_counter.html">BOOST_PP_UPDATE_COUNTER</a>() |
---|
43 | |
---|
44 | <a href="counter.html">BOOST_PP_COUNTER</a> // 3 |
---|
45 | </pre></div> |
---|
46 | <hr size="1"> |
---|
47 | <div style="margin-left: 0px;"> |
---|
48 | <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i> |
---|
49 | </br><i>© Copyright Paul Mensonides 2002</i> |
---|
50 | </div> |
---|
51 | <div style="margin-left: 0px;"> |
---|
52 | <p><small>Distributed under the Boost Software License, Version 1.0. (See |
---|
53 | accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or |
---|
54 | copy at <a href= |
---|
55 | "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p> |
---|
56 | </div> |
---|
57 | </body> |
---|
58 | </html> |
---|