Re: Erase in a map
- From: "freak" <farid.mehrabi@xxxxxxxxx>
- Date: 19 Mar 2007 09:41:51 -0700
On Mar 19, 3:09 pm, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
"freak" <farid.mehr...@xxxxxxxxx> wrote in message
news:1174297401.488107.309760@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 16, 9:35 pm, Charles Zhang <CharlesZh...@xxxxxxxxxxxxxxxxx>
wrote:
I want to erase items in a map based on some criteria.
use standard library:
std::remove_if
(connectionMap.begin(),connectionMap.end(),ConnExpired(current));
remove_if won't work on a map. It requires that elements of a container
be assignable, and map's elements aren't. Try it, it won't compile.
--
With best wishes,
Igor Tandetnik
I did and got nervous a bit.Looks like we have to write the code
manually.But I do not see any reason for assifnability.Maybe remove_if
needs to be changed to what we did here?
.
- Follow-Ups:
- Re: Erase in a map
- From: Igor Tandetnik
- Re: Erase in a map
- References:
- Erase in a map
- From: Charles Zhang
- Re: Erase in a map
- From: freak
- Re: Erase in a map
- From: Igor Tandetnik
- Erase in a map
- Prev by Date: Re: local type in template - C2918
- Next by Date: Re: Erase in a map
- Previous by thread: Re: Erase in a map
- Next by thread: Re: Erase in a map
- Index(es):
Relevant Pages
|
Loading