From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-08-30 11:03:58
"Jonathan Turkanis" wrote:
> > I believe the attached file does what Pavel has in mind. Let someone
> > check it, though, since I'm not preprocessor expert.
> One last try ... the version I just posted had the include guards out of
The technique used here is called file iteration. It works well.
It is the most powerful mechanism in PP.
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)
I think file iteration makes no harm.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk