220 8346 <320a5135-1841-4fae-9dca-e0b3c582db85@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: fmatthew5876@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: Default swap operation
Date: Wed, 1 Jan 2014 18:33:13 -0800 (PST)
Lines: 151
Approved: news@gmane.org
Message-ID: <320a5135-1841-4fae-9dca-e0b3c582db85@isocpp.org>
References: <c505e517-1c73-4486-b9dd-9ec15af1e649@isocpp.org> <25282740.R0qdXlWiI6@tjmaciei-mobl2> <52C46F6D.7080303@gmail.com> <4890722.aJTBCHXWVh@tjmaciei-mobl2>
 <ECFDA64E-E347-4D50-8838-6DF5A2BA3588@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_636_28550004.1388629993893"
X-Trace: ger.gmane.org 1388629998 3482 80.91.229.3 (2 Jan 2014 02:33:18 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 2 Jan 2014 02:33:18 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDELF54RTIGRB2U7SOLAKGQE5LOTLTY@isocpp.org Thu Jan 02 03:33:24 2014
Return-path: <std-proposals+bncBDELF54RTIGRB2U7SOLAKGQE5LOTLTY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f69.google.com ([209.85.219.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDELF54RTIGRB2U7SOLAKGQE5LOTLTY@isocpp.org>)
	id 1VyY62-0000d1-89
	for gclcip-std-proposals@m.gmane.org; Thu, 02 Jan 2014 03:33:18 +0100
Original-Received: by mail-oa0-f69.google.com with SMTP id h16sf69762117oag.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 01 Jan 2014 18:33:15 -0800 (PST)
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
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=80hQKRf6APDjmKgutylS1GczYayoRVv4+XyiIa64Uh0=;
        b=Ct9TvKEkBG4hJwnqr1hoxAQ5N4U2Nr3wNurgq1gwS0IgEjwd/qYKHqznhFR+rHEvsH
         LEdXiwGTdQNfjhyLhjEqkUplRhcO3RUBuzQTJl8yTPH3krYVI5H9JpCc+0St9rPInLjN
         tEY6xGnhMQpbhGZliWAvrALkY6dslTeBhUj7dL9WRVPyWU941HqyDC6tN8aLJxRjhH9Q
         MKbh8TFs1MHFLVLlkJqZa1GOaimKzkmX7f5NU7YvCDsPLnUq1ucdA+ta4Kxi1A4Mz0Jf
         L92S+QmkYVyqVm5zrcDtzKbJ2+rbZt7o9J0wAFEBBwQo0uXHc22SAfydNx9/kKLL8Gyh
         24ug==
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:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=80hQKRf6APDjmKgutylS1GczYayoRVv4+XyiIa64Uh0=;
        b=E1jFk1NLzdS7vHV658YtLtJoYRdtoAYMsQBvCme0sNdlgSn1WGSsbzmz5hPcdefOEk
         yVU2SrLblmvipUnoZSTggDGfqK0LUfZOzTZ0kH+7M8GU/WXDHg42y2AJ0JTjjgXoxjpr
         Ii1T/+CLnTtGoYw7iL6AKv7SC3pGFTlHEKjRfPYTZAe3i2AmjgEsBxptkIxluffwNGsx
         hlcN/H509hR/gajcoXtuw6cZXrOYMHoSwhxSEkI3tYEGg+vPE26jvgFWEHYKU0Q/uKO4
         Kx8S9gxDT8CwPMXe5O7uNQDP94EsTn8Ju6YFWBbZaLILCqYiDz65OdEAvJbFb1/1EtNE
         FvTg==
X-Gm-Message-State: ALoCoQlXmO+GfAvzQtphQxpPkO6Lb8j+PeHZzDXe2+NMflt+h3yhL+Z+SDs2Sp88y72r11CSOwfy
X-Received: by 10.43.161.202 with SMTP id mh10mr8688804icc.23.1388629995012;
        Wed, 01 Jan 2014 18:33:15 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.4.138 with SMTP id k10ls4195048qek.13.gmail; Wed, 01 Jan
 2014 18:33:14 -0800 (PST)
X-Received: by 10.49.35.11 with SMTP id d11mr628qej.8.1388629994476;
        Wed, 01 Jan 2014 18:33:14 -0800 (PST)
In-Reply-To: <ECFDA64E-E347-4D50-8838-6DF5A2BA3588@gmail.com>
X-Original-Sender: fmatthew5876@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:8346
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8346>

------=_Part_636_28550004.1388629993893
Content-Type: text/plain; charset=ISO-8859-1



On Wednesday, January 1, 2014 8:23:01 PM UTC-5, Howard Hinnant wrote:
>
> On Jan 1, 2014, at 8:00 PM, Thiago Macieira <thi...@macieira.org<javascript:>> 
> 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)? 
>
>
It has. Everyone, can we get back on topic with the idea of a defaulted 
swap operator?
 

> 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/.

------=_Part_636_28550004.1388629993893
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, January 1, 2014 8:23:01 PM UTC-5, Ho=
ward Hinnant wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Jan 1, 2=
014, at 8:00 PM, Thiago Macieira &lt;<a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"k_5pTxZtkcMJ" onmousedown=3D"this.href=3D'java=
script:';return true;" onclick=3D"this.href=3D'javascript:';return true;">t=
hi...@macieira.org</a>&gt; wrote:
<br>
<br>&gt; On quarta-feira, 1 de janeiro de 2014 14:41:33, Matthew Woehlke wr=
ote:
<br>&gt;&gt;&gt; And quite frankly I don't see the benefit. This destructor=
 can't be from
<br>&gt;&gt;&gt; other translation units under the conditions you described=
..
<br>&gt;&gt;=20
<br>&gt;&gt; Yes. This would need to be changed for the idea to be useful. =
So there
<br>&gt;&gt; is still something that could be changed here; specifying that=
 '=3D
<br>&gt;&gt; default' should make the definition accessible to other transl=
ation
<br>&gt;&gt; units the same as if a user definition had been provided. (If =
it is not
<br>&gt;&gt; possible to change the behavior of '=3D default', then I would=
 propose '=3D
<br>&gt;&gt; extern default' instead to explicitly specify that a symbol sh=
ould be
<br>&gt;&gt; emitted.)
<br>&gt;=20
<br>&gt; This part of the discussion was probably wrong on my part.
<br>&gt;=20
<br>&gt;&gt;&gt; This destructor cannot be trivial either under your condit=
ion: if all of
<br>&gt;&gt;&gt; them were trivial, then you could have left the declaratio=
n in the
<br>&gt;&gt;&gt; header.
<br>&gt;&gt; Right. If '=3D default' appears in the .cpp and not in the .h,=
 the
<br>&gt;&gt; compiler shall (be free to) assume that it is non-trivial. Bec=
ause in
<br>&gt;&gt; practice, if you need it in the .cpp and not the .h it is like=
ly
<br>&gt;&gt; (always?) because it is non-trivial anyway.
<br>&gt;=20
<br>&gt; But this one is still right. This may be allowed, but I don't see =
the point in=20
<br>&gt; doing it this way, since the code produced will be exactly the sam=
e.
<br>&gt;=20
<br>&gt; You may disagree with me here, but whenever two syntaxes produce t=
he exactly=20
<br>&gt; same thing with no overhead and no difference in readability, I'd =
choose the=20
<br>&gt; older syntax.
<br>
<br>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 thr=
ead)?
<br>
<br></blockquote><div><br></div><div>It has. Everyone, can we get back on t=
opic with the idea of a defaulted swap operator?</div><div>&nbsp;</div><blo=
ckquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-=
left: 1px #ccc solid;padding-left: 1ex;">Howard
<br>
<br></blockquote></div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_636_28550004.1388629993893--

.
