
AMDG 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> <snip> 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:
<snip> __TIMING_RULE__ on and_seq_while-time = timing-rule ; compile and_seq_while.cpp : <include>. <link>static : 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. Try: obj and_seq_while.o : and_seq_while.cpp ; time and_seq_while.time : and_seq_while.o ; In Christ, Steven Watanabe