This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: Compile error when using remove_if on a map
Levente Farkas wrote:
>
> "Eduardo T. Solis" wrote:
> >
> > I'm tried the two suggestions below but it still gives me the same compile
> > time error.
One intersting thing I note was that if I replace
map<int, int> m;
with
list<pair<int, int> > m;
it compiles without any error.
Ed
> ohh, yes of course remove_if just rearrange the elementns in the container
> (move the element to be deleted to the end of the sequance) which is not
> usable with map:-)
>
> ps. sorry for my first reply I was too lasy to think about it just
> notice the first problem;-)
>