220 23709 <2ca0a385-6399-4ac3-ba0d-609628ea4ec6@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Tomasz <tomaszkam@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Default swap/hash_value
Date: Thu, 14 Jan 2016 07:59:27 -0800 (PST)
Lines: 69
Approved: news@gmane.org
Message-ID: <2ca0a385-6399-4ac3-ba0d-609628ea4ec6@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_546_2134807463.1452787167649"
X-Trace: ger.gmane.org 1452787171 5683 80.91.229.3 (14 Jan 2016 15:59:31 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 14 Jan 2016 15:59:31 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDNPVXXG6IGBBYEL362AKGQECMZ6FLI@isocpp.org Thu Jan 14 16:59:31 2016
Return-path: <std-proposals+bncBDNPVXXG6IGBBYEL362AKGQECMZ6FLI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f70.google.com ([209.85.213.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDNPVXXG6IGBBYEL362AKGQECMZ6FLI@isocpp.org>)
	id 1aJkJ9-0006CL-7s
	for gclcip-std-proposals@m.gmane.org; Thu, 14 Jan 2016 16:59:31 +0100
Original-Received: by mail-vk0-f70.google.com with SMTP id i129sf437774722vkb.2
        for <gclcip-std-proposals@m.gmane.org>; Thu, 14 Jan 2016 07:59:30 -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=2nG/1u2l7dpNSuwEBiDhCXabljlcZAzobALZ08eAgas=;
        b=1Mix/i3t7hCFkbr4ULsbGldxKrdZWwIpx7S8+BBHadLd5saOIUIBqv4aehYLDGmcCS
         dQoKdRUhNgsJeCt3ub7yn8pnld5mG1r0c9NVsWPuogR3s74XkfxG9dIsxExEzn74ZMCO
         UmYYSD4LFbHFKwzBdVF1TyWA+P6fNLaNk7k8eEUWPmuDQ1YtWHWRL4uf122QPKvg11Jp
         WSJrq/01vW4dbl6F3TwgLP4203BXcCZw1QfmEJI3ky0cYbeL+70Y2i/q/ridvjnmh3ca
         wnl4ohgbPyFcU3hCxAIhy4I6HSwXvphsxHWpXoDdkPvlrl8Q8qt4b2xUDgvmaWsRrlIZ
         p6Lw==
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=2nG/1u2l7dpNSuwEBiDhCXabljlcZAzobALZ08eAgas=;
        b=zKnWHDA+p0WzAp0UJTRjkIpID58tib0IIfnwjSgRkxLKfuMhuo4EqatvSeKV7tjjDE
         b4/fkROdfqVmbTCmLchGYUnPI0/tW5E4UGG0WwRUrdsDD0qiH2nuyJq/Tiaq9xc00fjO
         D2OVoEyjyC6GCqOiunG84a+tr7x2MKxTLpD8TMwkUSIGwqL/nC4hcM8Javbt6PS5DGMD
         fhq9mTctRAejmIYwZMwnJcBJz4SVMx2f5JfzI0SMdTayjQGEOsb1nePZZr0Ikn4Ohne6
         Qw0IAoAqMdFy0rhzGp7ruG4ijqMKTStkc1b4sw7XSdYG2OfSa0o94uuQwXUwm7OdLg8U
         hRsw==
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=2nG/1u2l7dpNSuwEBiDhCXabljlcZAzobALZ08eAgas=;
        b=WmKi7xuOaqzCqM+aB5kgAv82k6VECrlsRzBQD2AVYf+CA6+VZEHGFQ6NNbJ76i+jPP
         JUSR1rPEpo5EFPurPyC5AyOPcxjq3KcN5hiSjsDepFwoi1rNrEfS4SbR7ZvFEd7113fA
         aBrLvkLorcrsCnESNxn570r76ZZIhl15L4GAwGxySzgvB9iWBFYVJh7JxIuuOT2tOieb
         1z5aPg+y3qG7NmfiROxQ0BDwkhJO3BkzeC2PIML7KI867gjIRpFbm3p98NrjvrUomjcd
         MfY2tZiEM8x4j0tT3ulQAFhk1Es1kltHEtCeegdFPexs2FGMBK15JfLqS58SuR2dS27Q
         yH1w==
X-Gm-Message-State: ALoCoQkbOc+CtmjyA/qekh2BjTWVj88swtHzGzLuGjK23tc+v0fhVL2/euQs11UZ7lSeOBps8dfHIljWhXcd206FCC9JJjH5IA==
X-Received: by 10.31.48.86 with SMTP id w83mr4139888vkw.5.1452787170076;
        Thu, 14 Jan 2016 07:59:30 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.79.133 with SMTP id j5ls1505237igx.21.canary; Thu, 14 Jan
 2016 07:59:28 -0800 (PST)
X-Received: by 10.50.55.2 with SMTP id n2mr175758igp.9.1452787168660;
        Thu, 14 Jan 2016 07:59:28 -0800 (PST)
In-Reply-To: <569582E5.1040108@wanadoo.fr>
X-Original-Sender: tomaszkam@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:23709
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/23709>

------=_Part_546_2134807463.1452787167649
Content-Type: multipart/alternative; 
	boundary="----=_Part_547_372731702.1452787167649"

------=_Part_547_372731702.1452787167649
Content-Type: text/plain; charset=UTF-8

I have a comment regarding a restricting generation of swap only in 
situation when it would be noexcept: 
If I the memberwise swap would not be generated, then I assume normal 
std::swap (3xmove) would be used instead. And if the member has throwing 
swap, then it would also have throwing move, so std::swap would also throw 
in this situation.
However, the std::swap will invoke move for other members of given class, 
that may be noexcept swapable but not noexcept moveable (same 
implementation of std::list), so the only outcome of avoiding generation of 
possibly throwing swap, would be use of swap that is less efficient and can 
throw in more cases.

Also language embraced throwing swap, by introduction of 
is_noexcept_swappable, so I think swap should be generated regardless of 
noexcept of member swap function, but have automatic noexcept specification 
(like other generated member functions).

-- 

--- 
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 email 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-proposals/.

------=_Part_547_372731702.1452787167649
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have a comment regarding a restricting generation of swa=
p only in situation when it would be noexcept: <br>If I the memberwise swap=
 would not be generated, then I assume normal std::swap (3xmove) would be u=
sed instead. And if the member has throwing swap, then it would also have t=
hrowing move, so std::swap would also throw in this situation.<br>However, =
the std::swap will invoke move for other members of given class, that may b=
e noexcept swapable but not noexcept moveable (same implementation of std::=
list), so the only outcome of avoiding generation of possibly throwing swap=
, would be use of swap that is less efficient and can throw in more cases.<=
br><br>Also language embraced throwing swap, by introduction of is_noexcept=
_swappable, so I think swap should be generated regardless of noexcept of m=
ember swap function, but have automatic noexcept specification (like other =
generated member functions).<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_547_372731702.1452787167649--
------=_Part_546_2134807463.1452787167649--

.
