This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/5583] std::set::iterator is readonly


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]