220 23707 <ace3ea5b-b960-4052-8080-72113810da75@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: =?UTF-8?Q?Andrzej_Krzemie=C5=84ski?= <akrzemi1@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Default swap/hash_value
Date: Wed, 13 Jan 2016 23:47:12 -0800 (PST)
Lines: 149
Approved: news@gmane.org
Message-ID: <ace3ea5b-b960-4052-8080-72113810da75@isocpp.org>
References: <569582E5.1040108@wanadoo.fr>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_204_1714295254.1452757632758"
X-Trace: ger.gmane.org 1452757641 30657 80.91.229.3 (14 Jan 2016 07:47:21 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 14 Jan 2016 07:47:21 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDT2DGOJ34DBBAVF3W2AKGQESKCSOWA@isocpp.org Thu Jan 14 08:47:17 2016
Return-path: <std-proposals+bncBDT2DGOJ34DBBAVF3W2AKGQESKCSOWA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f197.google.com ([209.85.192.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDT2DGOJ34DBBAVF3W2AKGQESKCSOWA@isocpp.org>)
	id 1aJccm-0005zS-Bd
	for gclcip-std-proposals@m.gmane.org; Thu, 14 Jan 2016 08:47:16 +0100
Original-Received: by mail-pf0-f197.google.com with SMTP id 65sf406726888pfd.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 13 Jan 2016 23:47:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=J70lTTb9r16HQAiV1m8jtJxylwa9CuHaPnLtK8Wagcs=;
        b=XJ7YjKF66MYEu7P4ejynchPNMKQFzhMEQhqzISqa07RxOX6kBQsG7l2nGPr2xhelZj
         KKHnSnDqiOYXJEbGBfVlFc9JZeLzzYulbAm3drysFB4rS7MY109PATqTqNRByIIGWkzu
         g5XdDeVBU3MAU7O0aksWBAue9vTmHlTKPlV5uTOoRcbpYKImhhvoWr03om9jzmq5dkV1
         wGWZJ/ouEVuci1btsaxQaZxnNgGA68Q88/UV3g6cfaYu3p+bnIgKQCUMEh9nP6rsAyv0
         gweEvfjPi7onF9vE8WfwjMJM+5Puf+9rPQz5FepKO3rJTILaihu4aD9X5uSGNvURXsaE
         4etQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=J70lTTb9r16HQAiV1m8jtJxylwa9CuHaPnLtK8Wagcs=;
        b=tCEiohXXYj90WdcHJ1M9jpYfrf6OJryw4ud5emKgJWyy83uOi5IVd6tN3d9E5RTqrk
         YFP0K7GDpOlnyYNbErheaeZUKz1Be/78sCzq0ZIiEtxYfYBbbRYufXLsx7LMI8qDugx8
         ufXHl1gDdf10+foqv+tpgWCN1MDuNkdw7PQXph9/S+4+PwV6gYmxfCMWn42Cfv/cGPvY
         qqudrNM7TVCYFUSEHpDqF2q/HZtexGE6A7ql0N50KLGKtTyBAvEwasqBKNsfrLqf4LL6
         tK7QL2/V6a8ujHJ8a08NXRSh1+TC6OYr0RHiPS/Dc4iwSaRCb/48opT4RA4SA/SNXoHu
         Qwdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=J70lTTb9r16HQAiV1m8jtJxylwa9CuHaPnLtK8Wagcs=;
        b=GXOhlcDFsSV30muIS9fIa+pFZGgi31yA7TL+riDD3GKdnq56li1OWs+cInRlOL+y86
         o1MIFEtGAgwlEwOlleqozsIISfvHw8jf3SyoUMsinYa4FuejexDF7RscsJPI4MDFytvG
         irVPObGHU70nsqiRJ2vDI1ifGCkcD+e9kcAnEEMerUB40GwPBhj8kTrWU8rpSC2jehJo
         U7+yy6q+EJ4xHe0aROIaCbINFip4FNz6WYjZPvRrXhXDYIYzxvNEMkxl2hn3POdRRVc3
         JrQcs9qhVUC6ebhML3G6lL63o3gWP7Ck9UV07K15a9z/uNJ5n4eR2LPbHBaFWEL1iJi4
         uIAQ==
X-Gm-Message-State: ALoCoQmpfySgvEKeogopVNi+BVNwqmKgNqgnP33HGcubrx7elYahSk0wC9vGP7nzKkwzfWMUrnfu7uvBJffQL7bzS7Q6kSqkig==
X-Received: by 10.66.144.138 with SMTP id sm10mr2347574pab.4.1452757635164;
        Wed, 13 Jan 2016 23:47:15 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.129.70 with SMTP id nu6ls1474473igb.0.canary; Wed, 13 Jan
 2016 23:47:14 -0800 (PST)
X-Received: by 10.50.108.20 with SMTP id hg20mr101741igb.5.1452757633991;
        Wed, 13 Jan 2016 23:47:13 -0800 (PST)
In-Reply-To: <569582E5.1040108@wanadoo.fr>
X-Original-Sender: akrzemi1@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:23707
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/23707>

------=_Part_204_1714295254.1452757632758
Content-Type: multipart/alternative; 
	boundary="----=_Part_205_948825230.1452757632758"

------=_Part_205_948825230.1452757632758
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



W dniu wtorek, 12 stycznia 2016 23:49:14 UTC+1 u=C5=BCytkownik Vicente J. B=
otet=20
Escriba napisa=C5=82:
>
> Default swap/hash_value=20
>
> Defining swap and hash_value P0029R0=20
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0029r0.html> as=
=20
> well as comparison operators, as proposed in N4475=20
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4477.pdf>, for=
=20
> simple classes is tedious, repetitive, slightly error-prone, and easily=
=20
> automated.=20
>
> Any comments are welcome,
>
Hi Vicente,
My intuition tells me that it would be beneficial to make it two separate=
=20
proposals. I expect that swap and hash have different constraints, would=20
rise different concerns, different discussions, and perhaps different=20
outcomes as to whether include them or not. I can see that Howard only=20
commented on the hash part. I, in contrast, will only comment on the swap=
=20
part.

I would add to the rationale for swap. Additional benefit for a default=20
member-wise swap (rather than relying on the move-based) (apart from=20
performance) is that the former can sometimes offer a better noexcept=20
guarantee. E.g., for std::vector, swap can be always guaranteed to be=20
noexcept, whereas its move operations throw.

Regards,
&rzej

--=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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

------=_Part_205_948825230.1452757632758
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br>W dniu wtorek, 12 stycznia 2016 23:49:14 UTC+1 u=C5=BCytkownik Vice=
nte J. Botet Escriba napisa=C5=82:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><div bgcolor=3D"#FFFFFF" text=3D"#000000"><h1 style=3D"margin:20px 0p=
x 10px;padding:0px;font-weight:bold;font-size:28px;color:rgb(0,0,0);font-fa=
mily:Helvetica,arial,sans-serif;font-style:normal;font-variant:normal;lette=
r-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white=
-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">Default<s=
pan>=C2=A0</span><code style=3D"margin:0px 2px;padding:0px 5px;white-space:=
nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);=
border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-=
radius:3px;border-bottom-left-radius:3px;font-size:inherit">swap</code>/<co=
de style=3D"margin:0px 2px;padding:0px 5px;white-space:nowrap;border:1px so=
lid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radi=
us:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bo=
ttom-left-radius:3px;font-size:inherit">hash_value</code></h1>
    <p style=3D"margin:15px 0px;color:rgb(0,0,0);font-family:Helvetica,aria=
l,sans-serif;font-size:14px;font-style:normal;font-variant:normal;font-weig=
ht:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-trans=
form:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,=
255)">Defining<span>=C2=A0</span><code style=3D"margin:0px 2px;padding:0px =
5px;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:r=
gb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;bord=
er-bottom-right-radius:3px;border-bottom-left-radius:3px">swap</code><span>=
=C2=A0</span>and<span>=C2=A0</span><code style=3D"margin:0px 2px;padding:0p=
x 5px;white-space:nowrap;border:1px solid rgb(234,234,234);background-color=
:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;bo=
rder-bottom-right-radius:3px;border-bottom-left-radius:3px">hash_value</cod=
e><span>=C2=A0</span><a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs=
/papers/2015/p0029r0.html" title=3D"A Unified Proposal for Composable Hashi=
ng" style=3D"color:rgb(65,131,196)" target=3D"_blank" rel=3D"nofollow" onmo=
usedown=3D"this.href=3D&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.=
open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015%2Fp0029r0.html\46s=
a\75D\46sntz\0751\46usg\75AFQjCNFMJPkwLPkD7E9erH9GNLsuGh7rzA&#39;;return tr=
ue;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\75http%3A%2F%2=
Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2015%2Fp0029r0.htm=
l\46sa\75D\46sntz\0751\46usg\75AFQjCNFMJPkwLPkD7E9erH9GNLsuGh7rzA&#39;;retu=
rn true;">P<wbr>0029R0</a><span>=C2=A0</span>as
      well as comparison operators, as proposed in<span>=C2=A0</span><a hre=
f=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4477.pdf" tit=
le=3D"Default comparisons (R2)" style=3D"color:rgb(65,131,196)" target=3D"_=
blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.c=
om/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpape=
rs%2F2015%2Fn4477.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNGfPWSu84Bha502jWe_=
nTBMyuGcAQ&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.google=
..com/url?q\75http%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpa=
pers%2F2015%2Fn4477.pdf\46sa\75D\46sntz\0751\46usg\75AFQjCNGfPWSu84Bha502jW=
e_nTBMyuGcAQ&#39;;return true;">N4475</a>, for simple classes is tedious, r=
epetitive,
      slightly error-prone, and easily automated.<span> <br>
      </span></p><p style=3D"margin:15px 0px;color:rgb(0,0,0);font-family:H=
elvetica,arial,sans-serif;font-size:14px;font-style:normal;font-variant:nor=
mal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0=
px;text-transform:none;white-space:normal;word-spacing:0px;background-color=
:rgb(255,255,255)"><span>
        Any comments are welcome,<br></span></p></div></blockquote><div>Hi =
Vicente,<br>My intuition tells me that it would be beneficial to make it tw=
o separate proposals. I expect that swap and hash have different constraint=
s, would rise different concerns, different discussions, and perhaps differ=
ent outcomes as to whether include them or not. I can see that Howard only =
commented on the hash part. I, in contrast, will only comment on the swap p=
art.<br><br>I would add to the rationale for swap. Additional benefit for a=
 default member-wise swap (rather than relying on the move-based) (apart fr=
om performance) is that the former can sometimes offer a better noexcept gu=
arantee. E.g., for std::vector, swap can be always guaranteed to be noexcep=
t, whereas its move operations throw.<br><br>Regards,<br>&amp;rzej<br></div=
>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

------=_Part_205_948825230.1452757632758--
------=_Part_204_1714295254.1452757632758--

.
