
On 02/07/2013 11:39 AM, Neil Groves wrote:
On this particular ocassion the documentation is correct. The std::erase algorithm does not remove elements. Hence the erase - remove idiom is frequently useful: http://en.wikipedia.org/wiki/Erase-remove_idiom
I have then made this idiom available and directly supported in Boost.Range.
I know what std::erase, std::remove and the idiom are all about. The problem in the documentation is still there. 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? WBR, Adam Romanek