Subject: Re: [boost] combinations and permutations
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-01-05 12:47:02
At Wed, 5 Jan 2011 12:20:16 +0000 (UTC),
> Howard Hinnant <howard.hinnant <at> gmail.com> writes:
> > I'm not sure if it is desirable
> > though. It is an awful lot of if-checking added to the algorithm.
> > All that checking would tend to penalize
> > those clients not wanting to break out early.
> Couldn't the checks for early breaks be removed at
> compile-time by using callable returning
> a convertible to bool instead of a bool ?
> At least it appears to do so when returning a
> boost::mpl::bool_<false> with g++ at default optimization level.[*]
yeah, for some years I've been re-thinking the "early break from BGL
algorithms" problem along these lines. I think it's an approach worth
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk