Subject: Re: [boost] [mpl] is there a or_seq like logical metafunction?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2009-02-12 12:22:42
On 02/10/09 13:21, Larry Evans wrote:
> On 02/10/09 12:45, vicente.botet wrote:
> > Oh! this is quite interesting. I will try it to see how it
> > works. WHich implementation should perdorms better if any
> > difference?
> 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.
In the vault, under "Template Metaprogramming", there's a profile,
in and_seq_profile.zip, of the find_if method and the while_ method
for implementing and_seq. The while_ method shows 100 fewer
instantiations for a 3 element vector of nullary logical metafunctions.
BTW, the profile was not put in the variadic_templates vault directory
because I realized that while_ doesn't need to use the variadic
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk