
21 Aug
2009
21 Aug
'09
8:21 p.m.
Ryan Gallagher wrote:
We were just upgrading from 1.34.1 to 1.39.0 and I ran into this issue which I note is still in the trunk (and I would assume the 1.40 candidate).
The definition of iterator_range::size is using operator- where it should be using std::distance as it did in boost 1.34 days:
<snip>
I'm not sure why it would have changed but it's no longer working with bi-directional iterators, etc. Can we put back the old version? Can we get this fixed for 1.40? Thanks,
This change is intentional. We decided that iterator_range::size should be O(1), or else it shouldn't compile. To get the old behavior, you can use boost::distance in boost/range/distance.hpp. HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com