220 23728 <56981C83.2030804@wanadoo.fr> article
Path: news.gmane.org!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Default swap/hash_value
Date: Thu, 14 Jan 2016 23:09:07 +0100
Lines: 38
Approved: news@gmane.org
Message-ID: <56981C83.2030804@wanadoo.fr>
References: <569582E5.1040108@wanadoo.fr>
 <2ca0a385-6399-4ac3-ba0d-609628ea4ec6@isocpp.org>
 <5697EAD8.8080104@wanadoo.fr>
 <ae07821d-6fe7-4565-804d-961e87606c82@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1452809359 26962 80.91.229.3 (14 Jan 2016 22:09:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 14 Jan 2016 22:09:19 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBBNZ4C2AKGQEDRPO4WY@isocpp.org Thu Jan 14 23:09:10 2016
Return-path: <std-proposals+bncBDH67CONY4PBBBNZ4C2AKGQEDRPO4WY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f197.google.com ([209.85.217.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDH67CONY4PBBBNZ4C2AKGQEDRPO4WY@isocpp.org>)
	id 1aJq4s-0004Ir-EY
	for gclcip-std-proposals@m.gmane.org; Thu, 14 Jan 2016 23:09:10 +0100
Original-Received: by mail-lb0-f197.google.com with SMTP id p10sf28169292lbo.0
        for <gclcip-std-proposals@m.gmane.org>; Thu, 14 Jan 2016 14:09:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-type:content-transfer-encoding
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=jQKkprBbIk1u3Dm2LAGU3o8KDmie6W1oDIdMQSpwp/M=;
        b=XwSLp2BySirmaw54tC6QA1DNoIAfeY9d4vTyQhZNF28m7/Ii+XWmHXZSdY032OxlDm
         lAGv35WQeeceydkSMkffTu1RXEfjUzHVIWIz9j2Bd0wW3W7KuzRpf0V1KdfzYDD3oczT
         7vqknAjgIxhjF3t6X0AO8ZB0L6criPJCGyPa2cj9apqEKMAocJG+Cc14EQd58awrXrrZ
         uG5D2BU6AhWp6oPB5uLhYoTTg7FvHtGQ3T2iXMynR6Adcr6gfopOa3wzCj/L5qK28gsT
         4ChQksX24Nqv97hzryvPXPwztnU05R7p1vI+OeXMupr7AwQfBnLWyN9l4SEpt 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-type
         :content-transfer-encoding:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=jQKkprBbIk1u3Dm2LAGU3o8KDmie6W1oDIdMQSpwp/M=;
        b=FvMuM4AAVPzr/uibjUMoSYhkyW0vP2/NPLS4TtHb+xR67smuSzyKvsCVh9/uG/0HvA
         2VA1I1kLf0tPzk/P+vPirRwXQK/O5Gfpi55bwZR1UHK3+c3kyHmc7edb8EtqAkqeplJH
         LwrR+OOkj7CJLw/v7/eMNzp1xmzGsVmMBZwSqwcb0VPu5BhJso2o6rOXlrdSxOuSF9lz
         TcNhalQBgvifXQQjYh1fzfselF3KIDTONGW6j9kSa4iFUP2hPRRD2+XQeuPX7krddC5f
         5r2/VbSoEFgkdSSgWIK58MMUVDl+3De4Ao/wpj4keSxPMj4 
X-Gm-Message-State: ALoCoQlnkZ9ENZVbke060F1Yza+Dc0Xv4x+yU3D77oaPBdAu9SArn3P2bbd3nUP94kPfMZGe6i5kQcjxy/pOo/fB/7hBvzx59Q==
X-Received: by 10.25.153.145 with SMTP id b139mr759928lfe.0.1452809349934;
        Thu, 14 Jan 2016 14:09:09 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.101.84 with SMTP id z81ls1165679wmb.5.canary; Thu, 14 Jan
 2016 14:09:08 -0800 (PST)
X-Received: by 10.28.68.68 with SMTP id r65mr7591250wma.95.1452809348732;
        Thu, 14 Jan 2016 14:09:08 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr. [80.12.242.128])
        by mx.google.com with ESMTPS id g65si3527787wma.77.2016.01.14.14.09.08
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Thu, 14 Jan 2016 14:09:08 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.128 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.128;
Original-Received: from new-host.home ([92.139.160.222])
	by mwinf5d64 with ME
	id 5y971s00T4oBxcU03y98Ff; Thu, 14 Jan 2016 23:09:08 +0100
X-ME-Helo: new-host.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Thu, 14 Jan 2016 23:09:08 +0100
X-ME-IP: 92.139.160.222
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0)
 Gecko/20100101 Thunderbird/38.4.0
In-Reply-To: <ae07821d-6fe7-4565-804d-961e87606c82@isocpp.org>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.128 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
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:23728
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/23728>

Le 14/01/2016 22:02, Tomasz a =C3=A9crit :
> I see the reasoning between making the generation of hash_value=20
> depended on the generation of the operator=3D=3D, as we must guarantee=20
> that o1 =3D=3D o2 implies that hash_value(o1) =3D=3D hash_value(o2). Howe=
ver I=20
> do not see any correlation between generation of swap and operator=3D=3D.=
=20
> If move-constructor can be generated then we will have default=20
> implementation of swap (via std::swap). I think that you should=20
> generate swap for every class that have generated move operations (no=20
> user defined: copy/move constructor, copy/move assignment and destructor)=
..
>
> I may be beneficial to have proper rule of six: i.e. non of following=20
> copy constructor/assigment, move constructor/assignment, swap,=20
> destructor is generated if at least on of them is defined. However=20
> this would be breaking change (as we may already have classes with=20
> swap, that uses compiler generated special functions), so I would=20
> stick to making swap depended on other five.
>
> Also the dependency on rule of five, would also lead of question if we=20
> should support defining swap on request via =3Ddefault.
Thanks for your comments. I need to think a little bit about. I will=20
come back later on, maybe tomorrow.

Vicente

--=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/.

.
