Boost logo

Boost :

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>> 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 :).

Best Regards,


Boost list run by bdawes at, gregod at, cpdaniel at, john at