On 2/21/11 11:27 PM, Jonathan M Davis wrote:
The typical way to remove an element in the STL is to use find to find an 
element
and then erase to remove it. remove in std.container is doing the same thing.
The problem is that you can't give the result of find to remove, because instead
of a single iterator, find gives you a whole range, and you probably don't want
to remove that whole range. You generally either want to remove the first 
element
or some set of elements at the front of the range.

This is the exact insight that made me recognize take() is an essential range type.

Andrei

Reply via email to