forked from boostorg/preprocessor
Longer macro parameter names
[SVN r13459]
This commit is contained in:
@ -22,14 +22,14 @@
|
||||
<p>In other words, expands to the sequence:</p>
|
||||
|
||||
<pre>
|
||||
F(1,P), F(2,P), ..., F(BOOST_PP_DEC(N),P)
|
||||
MACRO(1,DATA), MACRO(2,DATA), ..., MACRO(BOOST_PP_DEC(COUNT),DATA)
|
||||
</pre>
|
||||
|
||||
<p>For example,</p>
|
||||
|
||||
<pre>
|
||||
#define TYPED_PARAM(I,P)\
|
||||
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,P),I) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,P),I)
|
||||
#define TYPED_PARAM(INDEX,DATA)\
|
||||
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,DATA),INDEX) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,DATA),INDEX)
|
||||
BOOST_PP_ENUM_SHIFTED(3,TYPED_PARAM,(X,x))
|
||||
</pre>
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<li>BOOST_PP_REPEAT()</li>
|
||||
</ul>
|
||||
*/
|
||||
#define BOOST_PP_ENUM_SHIFTED(N,F,P) BOOST_PP_ENUM(BOOST_PP_DEC(N),BOOST_PP_ENUM_SHIFTED_F,(F,P))
|
||||
#define BOOST_PP_ENUM_SHIFTED(COUNT,MACRO,DATA) BOOST_PP_ENUM(BOOST_PP_DEC(COUNT),BOOST_PP_ENUM_SHIFTED_F,(MACRO,DATA))
|
||||
|
||||
#if !defined(BOOST_NO_COMPILER_CONFIG) && defined(__MWERKS__)
|
||||
# define BOOST_PP_ENUM_SHIFTED_F(I,FP) BOOST_PP_TUPLE_ELEM(2,0,FP)(BOOST_PP_INC(I),BOOST_PP_TUPLE_ELEM(2,1,FP))
|
||||
|
Reference in New Issue
Block a user