libstdc++/3552: missing hash function for std::string
Phil Edwards
phil@jaj.com
Mon Apr 29 12:46:00 GMT 2002
The following reply was made to PR libstdc++/3552; it has been noted by GNATS.
From: Phil Edwards <phil@jaj.com>
To: Vadim Ogranovich <vograno@arbitrade.com>
Cc: "'goswin.brederlow@student.uni-tuebingen.de'" <goswin.brederlow@student.uni-tuebingen.de>,
"'gcc-gnats@gcc.gnu.org'" <gcc-gnats@gcc.gnu.org>,
"'Laurent.Bonnaud@inpg.fr'" <Laurent.Bonnaud@inpg.fr>,
"'87063-quiet@bugs.debian.org'" <87063-quiet@bugs.debian.org>,
"'gcc-bugs@gcc.gnu.org'" <gcc-bugs@gcc.gnu.org>
Subject: Re: libstdc++/3552: missing hash function for std::string
Date: Mon, 29 Apr 2002 15:44:47 -0400
On Mon, Apr 29, 2002 at 02:34:18PM -0500, Vadim Ogranovich wrote:
> I have even stronger opinion about the fact that no workaround is posted
> along with the bug description.
The "workaround" is to treat string as you would treat any of your
own classes which you want to store in a hashed container: write a
specialization for it.
The hashing components came from SGI. Here is their documentation:
http://www.sgi.com/tech/stl/HashFunction.html
Read the notes at the end, and follow the "hash model" link for more
examples.
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams
More information about the Gcc-prs
mailing list