Subject: Re: [boost] [mpl] is there a or_seq like logical metafunction?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-02-15 18:50:27
Larry Evans wrote:
> So, in summary, the and_ifops::if_ test has been replaced
> with the and_iter specialization of <End, End>, and
> the laziness is achieved by use of and_; however,
> why not just use eval_if to achieve the laziness:
Because, in theory, mpl::and_ should be just as efficient.
> #include <boost/mpl/eval_if.hpp>
> This shaved off a few instantiations (128 vs. 163 on my machine).
Watch out. My tool includes non templates in the instantiation
count. The total number of instantiations reported depends on
the #includes. To get a good comparison, you need to subtract
off the number of instantiations caused by just the #includes.
(You could look at the call graph, but it's unreliable still).
> BTW, Steven, do you know how to get timing? I've tried the following
> but nothing is output:
> __TIMING_RULE__ on and_seq_while-time = timing-rule ;
> compile and_seq_while.cpp
> : <include>.
> : and_seq_while-time
This doesn't work because __TIMIING_RULE__ affect bjam level targets,
but seq_while-time is the name of a Boost.Build main target.
obj and_seq_while.o : and_seq_while.cpp ;
time and_seq_while.time : and_seq_while.o ;