220 8344 <4890722.aJTBCHXWVh@tjmaciei-mobl2> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Wed, 01 Jan 2014 23:00:38 -0200
Lines: 56
Approved: news@gmane.org
Message-ID: <4890722.aJTBCHXWVh@tjmaciei-mobl2>
References: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org> <25282740.R0qdXlWiI6@tjmaciei-mobl2> <52C46F6D.7080303@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart1751862.VONXlpbYM5"; micalg="pgp-sha1"; protocol="application/pgp-signature"
X-Trace: ger.gmane.org 1388624447 21367 80.91.229.3 (2 Jan 2014 01:00:47 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 2 Jan 2014 01:00:47 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBQ7USKLAKGQEK23TL3Q@isocpp.org Thu Jan 02 02:00:52 2014
Return-path: <std-proposals+bncBCB4TK757YBRBQ7USKLAKGQEK23TL3Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ea0-f200.google.com ([209.85.215.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBQ7USKLAKGQEK23TL3Q@isocpp.org>)
	id 1VyWea-00041h-4C
	for gclcip-std-proposals@m.gmane.org; Thu, 02 Jan 2014 02:00:52 +0100
Original-Received: by mail-ea0-f200.google.com with SMTP id k10sf25718036eaj.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Jan 2014 17:00:51 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=nx9g5/Ub02aUp5Djkcw0TSBoce7AYNPe/2xiA/s6pV4=;
        b=AiHsbBZWobqBIgNCMW97UxseaOjXFuj0qhqHyoWRwoX0Sh2uHrq+YtikLs3yZl/Y+6
         5vCGKGmoMDT/R4HRPbCWP8O4YUhvyBOPagzVkvvCIBXmaxD+24FR4jRPWK9tAJ+JJctN
         HHMZpM3DoR1+nfHHMk20LSqkVBIfIKd5V8EBjJEJ5l5XoSqkmPypabx4fihBJ+OtBWTD
         clYFz2NYo/c3TBRxIWy6KnWG0gvbKH5mgJsoXZj7fi1UYysMNFyQzsk7S2NMNh9XR0Sb
         QUjXAyX3Ruh+kLmnRlFU8NS49GJq9zsLv4XdkOxTEVwuDJ364TZFrQQDQ0M7kjSgSr/A
         Cg1A==
X-Gm-Message-State: ALoCoQldpIaa26Ja6XcXNRlfibRnhWE16F8l6u/dAiIu4ABfcU2GnxUmi1Qd3OuUSEi5vHQ/22Md
X-Received: by 10.112.130.196 with SMTP id og4mr20074898lbb.13.1388624451583;
        Wed, 01 Jan 2014 17:00:51 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.181.8.199 with SMTP id dm7ls1584644wid.28.gmail; Wed, 01 Jan
 2014 17:00:50 -0800 (PST)
X-Received: by 10.180.77.49 with SMTP id p17mr51682344wiw.30.1388624450923;
        Wed, 01 Jan 2014 17:00:50 -0800 (PST)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id ge7si20824620wic.56.2014.01.01.17.00.50
        for <std-proposals@isocpp.org>;
        Wed, 01 Jan 2014 17:00:50 -0800 (PST)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl2.localnet (unknown [179.209.204.181])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 70EC211B5B5
	for <std-proposals@isocpp.org>; Wed,  1 Jan 2014 17:00:50 -0800 (PST)
User-Agent: KMail/4.12 pre (Linux/3.9.10-100+i915fix.fc17.x86_64; KDE/4.11.60; x86_64; git-8054221; 2013-08-01)
In-Reply-To: <52C46F6D.7080303@gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mail=thiago@macieira.org
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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8344
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8344>


--nextPart1751862.VONXlpbYM5
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

On quarta-feira, 1 de janeiro de 2014 14:41:33, Matthew Woehlke wrote:
> > And quite frankly I don't see the benefit. This destructor can't be from
> > other translation units under the conditions you described.
> 
> Yes. This would need to be changed for the idea to be useful. So there
> is still something that could be changed here; specifying that '=
> default' should make the definition accessible to other translation
> units the same as if a user definition had been provided. (If it is not
> possible to change the behavior of '= default', then I would propose '=
> extern default' instead to explicitly specify that a symbol should be
> emitted.)

This part of the discussion was probably wrong on my part.

> > This destructor cannot be trivial either under your condition: if all of
> > them were trivial, then you could have left the declaration in the
> > header.
> Right. If '= default' appears in the .cpp and not in the .h, the
> compiler shall (be free to) assume that it is non-trivial. Because in
> practice, if you need it in the .cpp and not the .h it is likely
> (always?) because it is non-trivial anyway.

But this one is still right. This may be allowed, but I don't see the point in 
doing it this way, since the code produced will be exactly the same.

You may disagree with me here, but whenever two syntaxes produce the exactly 
same thing with no overhead and no difference in readability, I'd choose the 
older syntax.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--nextPart1751862.VONXlpbYM5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iD8DBQBSxLo9M/XwBW70U1gRAsnPAKC2amKCC3WfnBELgfsE7xMKhRmM5ACfa1aO
JTGTgXt/rNc2NkTDc6my8JA=
=rHNW
-----END PGP SIGNATURE-----

--nextPart1751862.VONXlpbYM5--


.
