220 8345 <ECFDA64E-E347-4D50-8838-6DF5A2BA3588@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Howard Hinnant <howard.hinnant@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Wed, 1 Jan 2014 20:23:01 -0500
Lines: 43
Approved: news@gmane.org
Message-ID: <ECFDA64E-E347-4D50-8838-6DF5A2BA3588@gmail.com>
References: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org> <25282740.R0qdXlWiI6@tjmaciei-mobl2> <52C46F6D.7080303@gmail.com> <4890722.aJTBCHXWVh@tjmaciei-mobl2>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1388625780 419 80.91.229.3 (2 Jan 2014 01:23:00 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 2 Jan 2014 01:23:00 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCK2HM4L6YERB5X6SKLAKGQEKHQJ5QI@isocpp.org Thu Jan 02 02:23:06 2014
Return-path: <std-proposals+bncBCK2HM4L6YERB5X6SKLAKGQEKHQJ5QI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f70.google.com ([209.85.220.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCK2HM4L6YERB5X6SKLAKGQEKHQJ5QI@isocpp.org>)
	id 1VyX04-0006w9-K7
	for gclcip-std-proposals@m.gmane.org; Thu, 02 Jan 2014 02:23:05 +0100
Original-Received: by mail-pa0-f70.google.com with SMTP id fa1sf43969523pad.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Jan 2014 17:23:03 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date
         :message-id:references:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=QhYoRwmwH8R4KZxTOV/2vBRHS0fV36JHieHyB6qBGf0=;
        b=IlxBg2lWiN9g+qTQ2KoQlwZU0TqMrAcex4QtsKqJMSzDm+sSwCjrtK7+KDmzkdk2T1
         4EphmHphJVvrMDBpUWs1JLNFWWGNe0M/5PGuwruZis824BJFmHQ2a7qvH0m6cILhqea6
         g9xXa3vEHUOb8vyR+zP6m3k22Enbl/2TF7FCHT9xnS9Iw0mJP2K9hoK5+C7ccPKM2bTB
         s/3O8GPoqrMhHQ0Ai7CJCppyvKYnY50AyUPlOQIsatxnLaXhZMW6xTKiXmUkA1M+Cy1e
         2ldM5UMcXlHyfePFReezK4m0fdbBH+G5niRjzlTknhjKwddu9ObX4ws5JQ1LEyXoy4Ba
         PT6w==
X-Gm-Message-State: ALoCoQkQOGoW+w8HYe7OXGXdlpyeHK8Nzefk7saIeLgb5F4WyAj6LBRrdtCUZ2zmoK4K8xuA7vha
X-Received: by 10.66.231.74 with SMTP id te10mr36656622pac.16.1388625783464;
        Wed, 01 Jan 2014 17:23:03 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.106.132 with SMTP id gu4ls4133229qeb.8.gmail; Wed, 01 Jan
 2014 17:23:02 -0800 (PST)
X-Received: by 10.236.60.228 with SMTP id u64mr26063565yhc.34.1388625782734;
        Wed, 01 Jan 2014 17:23:02 -0800 (PST)
Original-Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [2607:f8b0:4001:c05::22e])
        by mx.google.com with ESMTPS id l26si56988933yhg.62.2014.01.01.17.23.02
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 01 Jan 2014 17:23:02 -0800 (PST)
Received-SPF: pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c05::22e as permitted sender) client-ip=2607:f8b0:4001:c05::22e;
Original-Received: by mail-ig0-f174.google.com with SMTP id hk11so40594663igb.1
        for <std-proposals@isocpp.org>; Wed, 01 Jan 2014 17:23:02 -0800 (PST)
X-Received: by 10.51.17.11 with SMTP id ga11mr69964893igd.36.1388625782292;
        Wed, 01 Jan 2014 17:23:02 -0800 (PST)
Original-Received: from [10.0.1.4] (cpe-24-59-186-27.twcny.res.rr.com. [24.59.186.27])
        by mx.google.com with ESMTPSA id ft2sm69736336igb.5.2014.01.01.17.23.01
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 01 Jan 2014 17:23:01 -0800 (PST)
In-Reply-To: <4890722.aJTBCHXWVh@tjmaciei-mobl2>
X-Mailer: Apple Mail (2.1510)
X-Original-Sender: howard.hinnant@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of howard.hinnant@gmail.com designates 2607:f8b0:4001:c05::22e as
 permitted sender) smtp.mail=howard.hinnant@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=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>, <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:8345
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8345>

On Jan 1, 2014, at 8:00 PM, Thiago Macieira <thiago@macieira.org> wrote:

> 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.

Is it me, or does the subject of this thread seem completely unrelated to the subject line in the mail (for the vast majority of posts in this thread)?

Howard

-- 

--- 
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 http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
