containers, iteration, and removal

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Aug 27 12:46:21 PDT 2012


On 08/24/2012 12:23 PM, JN wrote:
> I feel kinda stupid here, what's wrong with C++ remove_if (
> http://www.cplusplus.com/reference/algorithm/remove_if/ )?
>

you mean something like

c.erase(remove_if(c.begin(), c.end(), predicate), c.end())

?

That actually is the sort of thing one could accomplish with position 
ranges:

c.remove(filter!(anti_predicate)(c.position_range()));


More information about the Digitalmars-d mailing list