Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-04-19 05:37:53

On 04/19/2007 03:54 AM, Larry Evans wrote:
> On 04/18/2007 01:06 PM, Eric Niebler wrote:
>>Larry Evans wrote:
> [snip]
>>>I've just encounted a need for something like this. For example,
>>>if you have a list of types for which you want to apply the or_ to,
>>>however, that list must by calculated, then the only way to apply
>>>or to it is with a fold operation. Since mpl::fold takes
>>>an argument represening the initial state, this would naturally
>>>be proto::or_<> in case you want to proto::or_ together a list
>>>of types.
>>Interesting. In order for this to work, proto::or_ would need to be an
>>extensible mpl sequence, right?
> [snip]
> No. The input to fold has to be; however, the output produced doesn't.
I think the output could be adapted to conform to mpl sequence
requirements. I've got a fold_seq template which does this, in case
you're interested.

Boost list run by bdawes at, gregod at, cpdaniel at, john at