$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (dave_at_[hidden])
Date: 2004-08-30 18:13:49
"Jonathan Turkanis" <technews_at_[hidden]> writes:
> "Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> wrote in message
> news:cgvjfh$arq$1_at_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
Have you looked at the new introduction which is linked through
http://www.boost-consulting.com/boost/libs/preprocessor?
> , and I don't have the stamina to read through the source.
Can't blame you.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com