Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 31/01/12 15:55, Ivan Timofeev wrote:
31.01.2012 19:42, Noel Grandin пишет:
So I should be calling
maPages.erase( std::find(maPages.begin(), maPages.end(), pOldPage) );
??

maPages.erase( std::remove(maPages.begin(), maPages.end(), pOldPage), maPages.end() );

I'll fix that.

Ivan

nice catch, I admit not being familiar with this but I did read "http://en.cppreference.com/w/cpp/algorithm/remove"; and even read the second paragraph where it mentions the items are removed but fails ( imo ) to clearly indicate the removed items are not removed. Sure if you read it *very carefully* you get it :-/ ( appears I am not careful enough )

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.