Boost logo

Boost :

From: pongba (pongba_at_[hidden])
Date: 2005-11-03 17:31:31


Eric Niebler <eric <at> boost-consulting.com> writes:

>
> I have an MPL sequence of metafunction classes. I want to apply<> each
> with mpl::transform. So I did this:
>

I'm afraid it's a design flaw.
*Every* mpl::apply is just a 6-ary meta-function, but mpl::lambda only support
up to 5-ary ones.

We call mpl::apply 5-ary meta-functions but mpl::lambdas don't thinks so, they
just see how much template parameters are there in the template-parameter-list.

Or I suspect that we really should call mpl::apply 6-ary meta-fun because it
really takes 6 arguments!

Incrementing the 'BOOST_MPL_..._LIMIT_ARITY'(I forgot the detail though)
doesn't help though, because the arity of mpl::apply will increase
correspondingly and will always be one more arity than that mpl::lambda can
support! It's inherent conflict or inconsistence.

Did I miss any obvious alternative?;-)


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