Boost logo

Boost :

Subject: Re: [boost] [Boost.Range] An issue with the documentation of 'remove_erase_if' algorithm
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2013-02-07 10:48:57


2013/2/7 Neil Groves <neil_at_[hidden]>

> On Thu, Feb 7, 2013 at 10:46 AM, Adam Romanek <romanek.adam_at_[hidden]
> >wrote:
>
> > Check the documentation of "remove_erase" algorithm. It says:
> >
> > "(...) This is in contrast to the *remove* algorithm which merely
> > rearranges elements. (...)"
> >
> > On the other hand, the documentation of "remove_erase_if" algorithm says:
> >
> > "(...) This is in contrast to the *erase* algorithm which merely
> > rearranges elements. (...)"
> >
> > Can you see the difference?
> >
> I can see the defect now that the relevant section has been highlighted. I
> understand that you meant that the documentation for remove_erase is
> incorrect rather than remove_erase_if. I shall correct this for the next
> release.
>

Hi,

I think you got it the other way around: remove "merely rearranges
elements", while erase -- deletes a specified range of iterators to
nonexistence.

So from the above quotes of the docs: remove_erase_if docs seem to be wrong.

Regards,
Kris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk