This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/5583: std::set::iterator is readonly
- From: Carlo Wood <carlo at alinoe dot com>
- To: rodrigc at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mathias dot hasselmann at gmx dot de, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Tue, 5 Feb 2002 16:18:40 +0100
- Subject: Re: libstdc++/5583: std::set::iterator is readonly
- References: <20020205145609.10621.qmail@sources.redhat.com>
On Tue, Feb 05, 2002 at 02:56:09PM -0000, rodrigc@gcc.gnu.org wrote:
> Synopsis: std::set::iterator is readonly
>
> State-Changed-From-To: open->feedback
> State-Changed-By: rodrigc
> State-Changed-When: Tue Feb 5 06:56:09 2002
> State-Changed-Why:
> Your testcase in the "How-to-Repeat" section is
> incorrect and doesn't even compile.
> Can you submit a full testcase (including #include statements)
> which illustrates your problem?
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5583
I didn't look at the PR, but from the Subject I bet that
he means that (*iter) returns a constant object, even
for set<Non-Const-Type>::iterator.
If so, then this is not a bug: the elements of set<> have to be
constant, you are not allowed to change them because that would
change the ordering in the set<>.
--
Carlo Wood <carlo@alinoe.com>