This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/5583] std::set::iterator is readonly
- From: "phil at jaj dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2003 01:24:51 -0000
- Subject: [Bug libstdc++/5583] std::set::iterator is readonly
- References: <20020204110604.5583.mathias.hasselmann@gmx.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From phil at jaj dot com 2003-11-26 01:24 -------
Subject: Re: std::set::iterator is readonly
> Your assumption that operator< would examine the weight is
> certainly incorrect.
If you don't like assumptions, then don't leave out the code. I /have/ seen
op< where the weight is examined, so no, I don't feel particularly mistaken.
> This is a fine example of why you would want to be able to modify a value in a
> set, but I guess as of the defect report you'll have to pick a different data
> structure.
Yep. Trying to determine whether op< performs any "unsafe" operations is
(worst case) isomorphic to the halting problem. Actually, I hope somebody
can prove me wrong on that, but anyhow, a different data structure will
have to be used.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5583