This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: STL in gcc 2.95.1
- To: avg at icyb dot kiev dot ua
- Subject: Re: STL in gcc 2.95.1
- From: Phil Edwards <pedwards at jaj dot com>
- Date: Mon, 25 Oct 1999 16:19:16 -0400
- Cc: gcc-bugs at gcc dot gnu dot org
> this is actually not a bug but rather some defficiency of STL
> implementation which goes with gcc-2.95.1.
There is no deficiency here; operator[] is not specified for the
multimap template class in the ISO Standard. It does not have to
be there. (Besides which, op[] doesn't exactly defeat the purpose
of multimap, but its semantics wouldn't be intuitive and obvious,
at least in my opinion.)
> Namely, there is no operator[] for multimap class and I think
> it should be there. I think just copying this operator from
> map class will help here, but am not sure.
Well, I have no authority here, but you're welcome to experiment
with adding that function. A large part of libstdc++-v3 is adapted
from the STL subset from SGI's implementation; I believe we use
their associative containers directly. I wouldn't expect somebody
else to do the work just because you think it should be there,
however. It definitely is not a defect according to the Standard,
and I myself wouldn't expect to see op[] in a standard multimap.
If you come up with a working implementation, suggest it on the
libstdc++-v3 mailing list and see what people think.
--
philip.edwards@{sn.wpafb,afrl}.af.mil
Targeting & Attack Radar PGP ID UFOs are real.
U.S. Air Force Research Labs 0xDBABC04F The Air Force
Senior Unix Systems Administrator doesn't exist.