]> git.lyx.org Git - lyx.git/blob - boost/boost/preprocessor/enum_shifted_params.hpp
update
[lyx.git] / boost / boost / preprocessor / enum_shifted_params.hpp
1 #ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP
2 #define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP
3
4 /* Copyright (C) 2001
5  * Housemarque Oy
6  * http://www.housemarque.com
7  *
8  * Permission to copy, use, modify, sell and distribute this software is
9  * granted provided this copyright notice appears in all copies. This
10  * software is provided "as is" without express or implied warranty, and
11  * with no claim as to its suitability for any purpose.
12  *
13  * See http://www.boost.org for most recent version.
14  */
15
16 #include <boost/preprocessor/cat.hpp>
17 #include <boost/preprocessor/enum_shifted.hpp>
18
19 /** <p>Generates a comma separated list of shifted actual parameters.</p>
20
21 <p>In other words, expands to the sequence:</p>
22
23 <pre>
24 BOOST_PP_CAT(PARAM,1), BOOST_PP_CAT(PARAM,2), ..., BOOST_PP_CAT(PARAM,BOOST_PP_DEC(COUNT))
25 </pre>
26 <p>For example,</p>
27
28 <pre>
29 BOOST_PP_ENUM_SHIFTED_PARAMS(3,x)
30 </pre>
31
32 <p>expands to:</p>
33
34 <pre>
35 x1, x2
36 </pre>
37
38 <h3>Uses</h3>
39 <ul>
40   <li>BOOST_PP_REPEAT()</li>
41 </ul>
42
43 <h3>Rationale</h3>
44 <ul>
45   <li>This macro facilitates a typical usage of the library. Shifted parameter
46       lists are common in template metaprograms.</li>
47 </ul>
48
49 <h3>Test</h3>
50 <ul>
51   <li><a href="../../test/repeat_2nd_test.cpp">repeat_2nd_test.cpp</a></li>
52 </ul>
53 */
54 #define BOOST_PP_ENUM_SHIFTED_PARAMS(COUNT,PARAM) BOOST_PP_ENUM_SHIFTED(COUNT,BOOST_PP_ENUM_SHIFTED_PARAMS_F,PARAM)
55
56 #define BOOST_PP_ENUM_SHIFTED_PARAMS_F(I,P) BOOST_PP_CAT(P,I)
57 #endif