
"Pavel Vozenilek" <pavel_vozenilek@hotmail.com> wrote in message news:cgvjfh$arq$1@sea.gmane.org...
"Jonathan Turkanis" wrote:
I believe the attached file does what Pavel has in mind. Let someone
else
check it, though, since I'm not preprocessor expert.
The local iteration approach is bit simpler and would look like: ------------- #define BOOST_PP_LOCAL_MACRO( n ) \ template < BOOST_PP_ENUM_PARAMS(n, typename T) > \ explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \ : member( BOOST_PP_ENUM_PARAMS(n, x) ) \ {} \ /**/
#define BOOST_PP_LOCAL_LIMITS (1, BOOST_BASE_FROM_MEMBER_MAX_ARITY) #include BOOST_PP_LOCAL_ITERATE() -------------
Thank's, Pavel. I find the preprocessor library fascinating but hard to learn since the basic techniques and terminology are not explained very well in the documentation, and I don't have the stamina to read through the source. Jonathan