Subject: Re: [boost] combinations and permutations
From: bernardH (boost-dev.ml_at_[hidden])
Date: 2011-01-06 03:14:21
Howard Hinnant <howard.hinnant <at> gmail.com> writes:
> I've used a simple bool return rather than any of the fancier tricks.
> The speed hit didn't seem that severe and is actually zero if
> the compiler can see that the functor always returns false.
Fwiw, despite my previous messages, I think using plain bool
is the right thing to do.
For callables that would not need the test, the call will either be :
1Â°) out of line : the function call will dwarf the useless test
2Â°) inlined : the compiler will remove the useless test.
(Not even speaking of the actual processing performed by the callable).
I got carried away by my fondness for boost::mpl :).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk