• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3	<title>BOOST_PP_ENUM_SHIFTED_PARAMS</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_ENUM_SHIFTED_PARAMS</b> macro generates a comma-separated, shifted list of parameters.
9	</div>
10	<h4>Usage</h4>
11		<div class="code">
12			<b>BOOST_PP_ENUM_SHIFTED_PARAMS</b>(<i>count</i>, <i>param</i>)
13		</div>
14	<h4>Arguments</h4>
15		<dl>
16			<dt>count</dt>
17			<dd>
18				The number of parameters to generate.&nbsp;
19				Valid values range from <i>0</i> to <b>BOOST_PP_LIMIT_REPEAT</b>.
20			</dd>
21			<dt>param</dt>
22			<dd>
23				The text of the parameter.&nbsp;
24				<b>BOOST_PP_ENUM_SHIFTED_PARAMS</b> concatenates numbers ranging from <i>1</i> to <i>count</i> - <i>1</i>
25				to generate parameters.
26			</dd>
27		</dl>
28	<h4>Remarks</h4>
29		<div>
30			This macro expands to the comma-separated sequence:
31			<div>
32				<i>param</i> ## <i>1</i>, ... <i>param</i> ## <i>count</i> - <i>1</i>
33			</div>
34		</div>
35		<div>
36			This macro facilitates a typical usage of the library.&nbsp;
37			Shifted parameter lists are common in template metaprograms.
38		</div>
39		<div>
40			To use the <i>z</i> parameter passed from other macros that use <b>BOOST_PP_REPEAT</b>, see <b>BOOST_PP_ENUM_SHIFTED_PARAMS_Z</b>.
41		</div>
42		<div>
43			Previously, this macro could not be used recursively inside <b>BOOST_PP_REPEAT</b>.&nbsp;
44			This limitation no longer exists, as the library can automatically detect the next available repetition depth.
45		</div>
46	<h4>See Also</h4>
47		<ul>
48			<li><a href="limit_repeat.html">BOOST_PP_LIMIT_REPEAT</a></li>
49			<li><a href="enum_shifted_params_z.html">BOOST_PP_SHIFTED_ENUM_PARAMS_<i>z</i></a></li>
50		</ul>
51	<h4>Requirements</h4>
52		<div>
53			<b>Header:</b> &nbsp;<a href="../headers/repetition/enum_shifted_params.html">&lt;boost/preprocessor/repetition/enum_shifted_params.hpp&gt;</a>
54		</div>
55	<h4>Sample Code</h4>
56<div><pre>
57#include &lt;<a href="../headers/repetition/enum_shifted_params.html">boost/preprocessor/repetition/enum_shifted_params.hpp</a>&gt;
58
59<a href="enum_shifted_params.html">BOOST_PP_ENUM_SHIFTED_PARAMS</a>(3, class T) // expands to class T1, class T2
60</pre></div>
61	<hr size="1">
62	<div style="margin-left: 0px;">
63		<i>� Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
64		</br><i>� Copyright Paul Mensonides 2002</i>
65	</div>
66	<div style="margin-left: 0px;">
67		<p><small>Distributed under the Boost Software License, Version 1.0. (See
68		accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
69		copy at <a href=
70		"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
71	</div>
72</body>
73</html>
74