This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++ bug with gcc version 2.95-2
- To: Sunil Rottoo <sunil at gdc dot ca>
- Subject: Re: C++ bug with gcc version 2.95-2
- From: Ross Smith <ross dot s at ihug dot co dot nz>
- Date: Fri, 17 Dec 1999 10:04:21 +1300
- CC: gcc-bugs at gcc dot gnu dot org
- Organization: The Internet Group
- References: <38590129.C7D4A924@gdc.ca>
Sunil Rottoo wrote:
>
> Hi,
>
> The following code which compiled with version 2.91 of gcc no longer
> works with version 2.95-2.
> It appears that all mutating STL algorithms which operate on a map have
> the same problem.
The compiler is right. Many of the mutating algorithms don't work on
associative containers, because the algorithms rely on being able to
rearrange the elements, but in associative containers, the order of
elements is fixed.
--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
"Be careful about using the following code -- I've only proven
that it works, I haven't tested it." -- Donald Knuth