Topic: stl associate containers
Author: "Wang,Xiaoguang\(Freeman\)" <freeman.wang@marconi.com>
Date: Thu, 6 Sep 2001 15:52:15 GMT Raw View
Hi,
What's the states of those iterators if somebody insert or erase one element
to or from an associated container?
Thanks
Freeman
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
Author: Attila Feher <Attila.Feher@lmf.ericsson.se>
Date: Thu, 6 Sep 2001 16:07:12 GMT Raw View
"Wang,Xiaoguang(Freeman)" wrote:
>
> Hi,
>
> What's the states of those iterators if somebody insert or erase one element
> to or from an associated container?
All remain valid, except the one you deleted.
A
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
Author: Ron Natalie <ron@sensor.com>
Date: Thu, 6 Sep 2001 16:13:39 GMT Raw View
"Wang,Xiaoguang(Freeman)" wrote:
>
> Hi,
>
> What's the states of those iterators if somebody insert or erase one element
> to or from an associated container?
>
On an associative container, insert has no affect on iterators. Erase invalidates
only the iterators that refer to the erased elements.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]