Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] Strange!
From: Albert Yiamakis (vkicefire_at_[hidden])
Date: 2014-09-08 07:53:48


On 29/08/14 17:16, Eric Niebler wrote:
> On 8/29/2014 1:21 AM, Neil Groves wrote:
>> Clearly I can make the Boost.Range boost::distance O(1) by altering the
>> implementation to not forward to the standard implementation. This would
>> be required for almost all of the standard algorithms, hence I'd have to
>> rewrite them all.
> Yes. IMO, Boost.Algorithm should have versions of ALL the standard
> library algorithm, rewritten to work with the new-style iterator
> categories. And yes, it's a lot of work, but not as much as you might
> think. I should know, I'm just about finished my own complete
> reimplementation of the algorithms for my range work.

Hello,

Although I 'm not familiar with the problem you discuss, reimplementing
algorithms seems against avoiding duplication.
I have a pull request on Boost.Algorithm arguing the opposite for any_of:

https://github.com/boostorg/algorithm/pull/3

The optimizations STL implementers may have come up with and the user's
choice of an implementation are thrown out of the window. Am I missing
something?

Albert


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net