|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-11 11:58:38
Given the presence of BOOST_PP_ENUM_PARAMS, which generates a list like:
a0, a1, a2, a3, ... aN
it seems there should also be a way to generate:
T0 a0, T1 a1, T2 a2, ... TN aN
built into the library.
#define BOOST_PP_NUMBER_PAIR(Index, Pair) \
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,0,Pair),Index) \
BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2,1,Pair),Index)
#define BOOST_PP_ENUM_PARAMS2(N, Pair) BOOST_PP_ENUM(N,
BOOST_PP_NUMBER_PAIR, Pair)
Thoughts?
+---------------------------------------------------------------+
David Abrahams
C++ Booster (http://www.boost.org) O__ ==
Pythonista (http://www.python.org) c/ /'_ ==
resume: http://users.rcn.com/abrahams/resume.html (*) \(*) ==
email: david.abrahams_at_[hidden]
+---------------------------------------------------------------+
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk