Boost logo

Boost :

Subject: Re: [boost] [mpl] is there a or_seq like logical metafunction?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2009-06-17 13:34:51


On 02/12/09 11:52, vicente.botet wrote:
> ----- Original Message -----
> From: "Larry Evans" <cppljevans_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Thursday, February 12, 2009 6:22 PM
> Subject: Re: [boost] [mpl] is there a or_seq like logical metafunction?
>
>
>> On 02/10/09 13:21, Larry Evans wrote:
>>> On 02/10/09 12:45, vicente.botet wrote:
>> [snip]
>>> > Oh! this is quite interesting. I will try it to see how it
>>> > works. WHich implementation should perdorms better if any
>>> > difference?
>> [snip]
>>> BTW, what about the while_ template mentioned in my other recent
>>> post. It seems that would be most general, and it just uses template
>>> recursion and eval_if. If simplified implementation *usually* means
>>> faster execution, then maybe while_ would be fastest. I know the
>>> non-variadic and_ uses recursion (as I mentioned in my reply to
>>> David), so; I don't think that would be a disadvantage.
[snip]
> Aleksey, do you think that it is worth to include them on Boost.MPL?
>
> Thanks Larry,
> Vicente
>

Sure. However, IIUC, the recent proposed change to iter_fold_if:

https://svn.boost.org/trac/boost/ticket/3044#comment:2

should enable iter_fold_if to be used to do what you want.
However, whether that patch to ifer_fold_if is better than
a replacement of iter_fold_if with the while_recur mentioned
here:

https://svn.boost.org/trac/boost/ticket/3044#comment:3

is an open question, IMHO. This questions involved are
mentioned near the bottom of:

http://article.gmane.org/gmane.comp.lib.boost.devel/190527

However, so far, there doesn't seem to be much interest
in while_recur; so, I'm guessing you could get by with
Steven's patch to iter_fold_if_impl.

-Larry


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