This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Stl map problems, gcc 3.0, libstdc++ 3


I'm having an odd problem using the stl map and gcc 3.0. The map is a 
map<std::string, std::list<classObject>, std::less<std::string> > . The
problem is when using either the map member count or find. Their
behavior is erractic, it alternates between finding a key in the hash
and not finding it, though the key is there every time. I iterate
through the map printing out all the keys already in the map and the key
I am searching for is there, but then using the map like
mapVar.count("key") or iter = mapVar.find("key") it will randomly find
it and not find it. This same code works fine under gcc 2.95.x and
below; It finds the key every time. I have been using gcc 3.0 with this
code since it's stable release and this issue seems to have started
recenty though the code is more often built and used on a 2.91.66, so
maybe the issue hasn't been noticed untill now in my code. Is there an
issue I'm not aware of? Is there anything I could have done in my code
to introduce some sort of instabililty in the map?


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