
On 07.02.2013, at 16:48, Krzysztof Czainski wrote:
2013/2/7 Neil Groves <neil@grovescomputing.com>
On Thu, Feb 7, 2013 at 10:46 AM, Adam Romanek <romanek.adam@gmail.com
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.
Yes. std::remove and std::remove_if are the algorithms. erase is the member function that does the real deletion. When you fix remove_erase_if, make sure you reference remove_if, not remove. Sebastian