Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-08-30 12:37:23


"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, and I don't have the stamina to read through the source.

Jonathan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk