220 3654 <d37374ae-7973-44e2-84c6-4eb830fa6848@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?R=C3=B3bert_D=C3=A1vid?= <lrdxgm@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: N3573: Why heterogenous extensions to unordered
 containers will not work
Date: Tue, 9 Apr 2013 06:11:14 -0700 (PDT)
Lines: 95
Approved: news@gmane.org
Message-ID: <d37374ae-7973-44e2-84c6-4eb830fa6848@isocpp.org>
References: <ed957851-6769-4e9e-9244-36b31112799c@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_5299_1564840.1365513074550"
X-Trace: ger.gmane.org 1365513076 11224 80.91.229.3 (9 Apr 2013 13:11:16 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 9 Apr 2013 13:11:16 +0000 (UTC)
Cc: jgottman6@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDMKHJ4B6MARB45GSCFQKGQEJPM2N3A@isocpp.org Tue Apr 09 15:11:20 2013
Return-path: <std-proposals+bncBDMKHJ4B6MARB45GSCFQKGQEJPM2N3A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vb0-f69.google.com ([209.85.212.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDMKHJ4B6MARB45GSCFQKGQEJPM2N3A@isocpp.org>)
	id 1UPYKS-0002Vg-RB
	for gclcip-std-proposals@m.gmane.org; Tue, 09 Apr 2013 15:11:17 +0200
Original-Received: by mail-vb0-f69.google.com with SMTP id p12sf9221438vbe.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 09 Apr 2013 06:11:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:date:from:to:cc:message-id
         :in-reply-to:references:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=N4Tf49eH9c08rLXWULW9wVRMhMgcP4OzaATBBPDYNI4=;
        b=ec+E4fqTVKJKb9r5UckZBUS6FqPpkiuNDQRj3c2AZFmZxDyrCFHOlst2nVCkh65VDq
         GYqvsvOjctPWeAc/GES7oHrdBQ+O0Au8YFqWvxJ+9/eP/TEtagySNj/s99uZXomWBnQA
         Kw6YwgJ8i94CrkOMFuMspyT+UuMUXwHnjks/GMsi9JhJIH0gwPQmeiBpsJ+QcSLjYD9X
         CohrGRES33b0LmxzRH7CDIxGRQwbzfBklIt7vnWfFP72Nwo0+h9Wh966srzpdXtC77GP
         xgwZhCep1MKJEu5C8IQj+j9G5jy5sp5/RtlBSsVjBmF577ROIChIrwnEjzR7qm670NOh
         TUiA==
X-Received: by 10.236.174.6 with SMTP id w6mr278078yhl.25.1365513075984;
        Tue, 09 Apr 2013 06:11:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.118.70 with SMTP id kk6ls1580512qeb.9.gmail; Tue, 09 Apr
 2013 06:11:14 -0700 (PDT)
X-Received: by 10.49.120.105 with SMTP id lb9mr2045673qeb.17.1365513074888;
        Tue, 09 Apr 2013 06:11:14 -0700 (PDT)
In-Reply-To: <ed957851-6769-4e9e-9244-36b31112799c@isocpp.org>
X-Original-Sender: lrdxgm@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:3654
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3654>

------=_Part_5299_1564840.1365513074550
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable



2013. =E1prilis 9., kedd 2:36:46 UTC+2 id=F5pontban jgot...@gmail.com a=20
k=F6vetkez=F5t =EDrta:
>
> While this would be useful, there is too much chance of two types being=
=20
> equality-comparable but having incompatible hashes.  For example, under g=
cc=20
> 8.0,=20
> std::hash<long>(-1L) =3D=3D 18446744073709551615
> and
> std::hash<double>(-1.0) =3D=3D 11078049357879903929
>
>
>
If a =3D=3D b, then I would expect that hash(a) =3D=3D hash(b). If a langua=
ge does=20
not exhibit this, then there is something wrong - from a user's perspective=
=20
hashing is useless if it produces different results for equal values...=20
Implementer's perspective is a different question..

Regards, Robert

PS: What is gcc 8.0?

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/?hl=3Den.



------=_Part_5299_1564840.1365513074550
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<br><br>2013. =E1prilis 9., kedd 2:36:46 UTC+2 id=F5pontban jgot...@gmail.c=
om a k=F6vetkez=F5t =EDrta:<blockquote class=3D"gmail_quote" style=3D"margi=
n: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Whi=
le this would be useful, there is too much chance of two types being equali=
ty-comparable but having incompatible hashes.&nbsp; For example, under gcc =
8.0, <div style=3D"background-color:rgb(250,250,250);border-color:rgb(187,1=
87,187);border-style:solid;border-width:1px;word-wrap:break-word"><code><di=
v><span style=3D"color:#000">std</span><span style=3D"color:#660">::</span>=
<span style=3D"color:#000">hash</span><span style=3D"color:#080">&lt;long&g=
t;</span><span style=3D"color:#660">(-</span><span style=3D"color:#066">1L<=
/span><span style=3D"color:#660">)</span><span style=3D"color:#000"> </span=
><span style=3D"color:#660">=3D=3D</span><span style=3D"color:#000"> </span=
><span style=3D"color:#066">18446744073709551615</span><span style=3D"color=
:#000"><br></span></div></code></div>and<br><div style=3D"background-color:=
rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-wi=
dth:1px;word-wrap:break-word"><code><div><span style=3D"color:#000">std</sp=
an><span style=3D"color:#660">::</span><span style=3D"color:#000">hash</spa=
n><span style=3D"color:#080">&lt;double&gt;</span><span style=3D"color:#660=
">(-</span><span style=3D"color:#066">1.0</span><span style=3D"color:#660">=
)</span><span style=3D"color:#000"> </span><span style=3D"color:#660">=3D=
=3D</span><span style=3D"color:#000"> </span><span style=3D"color:#066">110=
78049357879903929</span><span style=3D"color:#000"><br></span></div></code>=
</div><br><br></blockquote><div><br>If a =3D=3D b, then I would expect that=
 hash(a) =3D=3D hash(b). If a language does not exhibit this, then there is=
 something wrong - from a user's perspective hashing is useless if it produ=
ces different results for equal values... Implementer's perspective is a di=
fferent question..<br><br>Regards, Robert<br><br>PS: What is gcc 8.0?<br></=
div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_5299_1564840.1365513074550--

.
