Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-11-05 22:25:05


"Eric Niebler" <eric_at_[hidden]> writes:

> David Abrahams wrote:
>> pongba <pongba_at_[hidden]> writes:
>>
>>
>>>Eric Niebler <eric <at> boost-consulting.com> writes:
>>>
>>>
>>>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?;-)
>>
>>
>> Eric can use the appropriate applyN template.
>>
>
> Ah, thanks. Using applyN instead of apply fixes the problem. The fact
> that apply doesn't work here seems like a bug to me. Is it fixable?

Not really, without changing how it is used. It's the arity problem
that pongba pointed out. You'd have to write something like:

    apply<some_lambda_expression>::to<a, b, c>

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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