This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: libstdc++/3552: missing hash function for std::string
- From: Vadim Ogranovich <vograno at arbitrade dot com>
- To: "'Phil Edwards'" <phil at jaj dot com>
- Cc: "'goswin dot brederlow at student dot uni-tuebingen dot de'" <goswin dot brederlow at student dot uni-tuebingen dot de>, "'gcc-gnats at gcc dot gnu dot org'" <gcc-gnats at gcc dot gnu dot org>, "'Laurent dot Bonnaud at inpg dot fr'" <Laurent dot Bonnaud at inpg dot fr>, "'87063-quiet at bugs dot debian dot org'" <87063-quiet at bugs dot debian dot org>, "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Date: Mon, 29 Apr 2002 14:34:18 -0500
- Subject: RE: libstdc++/3552: missing hash function for std::string
-----Original Message-----
From: Phil Edwards [mailto:phil@jaj.com]
Sent: Monday, April 29, 2002 12:10 PM
To: Vadim Ogranovich
Cc: 'goswin.brederlow@student.uni-tuebingen.de';
'gcc-gnats@gcc.gnu.org'; 'Laurent.Bonnaud@inpg.fr';
'87063-quiet@bugs.debian.org'; 'gcc-bugs@gcc.gnu.org'
Subject: Re: libstdc++/3552: missing hash function for std::string
On Sat, Apr 27, 2002 at 02:37:52PM -0500, Vadim Ogranovich wrote:
>> Hi, I independently came across this bug. It seems like it was classified
as
>> not a bug with no workaround posted. Is that the case? Thanks, Vadim
>Yes. How can we possibly guess what a good hash function would be for
>arbitrary strings? Efficiency of hashing is extremely dependant on the
>data being hashed.
Writing a generic library (STL in this case) necessarily involves making
guesses and choosing solutions that may be sub-optimal in specialized cases.
For most people std::string is a wrapper around char* and if one can make a
default choice for one I see no reason not to do the same choice for the
other.
I have even stronger opinion about the fact that no workaround is posted
along with the bug description.
Thanks, Vadim
--------------------------------------------------
DISCLAIMER
This e-mail, and any attachments thereto, is intended only for use by the
addressee(s) named herein and may contain legally privileged and/or
confidential information. If you are not the intended recipient of this
e-mail, you are hereby notified that any dissemination, distribution or
copying of this e-mail, and any attachments thereto, is strictly prohibited.
If you have received this e-mail in error, please immediately notify me and
permanently delete the original and any copy of any e-mail and any printout
thereof.
E-mail transmission cannot be guaranteed to be secure or error-free. The
sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of e-mail transmission.
NOTICE REGARDING PRIVACY AND CONFIDENTIALITY
Knight Trading Group may, at its discretion, monitor and review the content
of all e-mail communications.