libstdc++/3552: missing hash function for std::string

Vadim Ogranovich vograno@arbitrade.com
Mon Apr 29 12:56:00 GMT 2002


The following reply was made to PR libstdc++/3552; it has been noted by GNATS.

From: Vadim Ogranovich <vograno@arbitrade.com>
To: "'Phil Edwards'" <phil@jaj.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 14:34:18 -0500

 -----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. 
 



More information about the Gcc-prs mailing list