[Bug libstdc++/5583] std::set::iterator is readonly
phil at jaj dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 26 01:24:00 GMT 2003
------- 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
More information about the Gcc-bugs
mailing list