220 13970 <CAOfiQqkXfdp4mfXUR0pO5YpQ=bnNPzThAEmY_+um32H2oSS9=w@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Richard Smith <richard@metafoo.co.uk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Reconstruct function idea
Date: Thu, 16 Oct 2014 13:16:27 -0700
Lines: 81
Approved: news@gmane.org
Message-ID: <CAOfiQqkXfdp4mfXUR0pO5YpQ=bnNPzThAEmY_+um32H2oSS9=w@mail.gmail.com>
References: <ff612334-ae16-43d1-a650-580d0ce635f2@isocpp.org>
	<97aba3ad-71d1-46ef-88e5-ee00137df7fb@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c1a2365b849e05058fece8
X-Trace: ger.gmane.org 1413490595 5950 80.91.229.3 (16 Oct 2014 20:16:35 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 16 Oct 2014 20:16:35 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDVNBJG4YAIBBG6PQCRAKGQE4S3I7AY@isocpp.org Thu Oct 16 22:16:30 2014
Return-path: <std-proposals+bncBDVNBJG4YAIBBG6PQCRAKGQE4S3I7AY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f71.google.com ([209.85.220.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDVNBJG4YAIBBG6PQCRAKGQE4S3I7AY@isocpp.org>)
	id 1XerTK-0007ns-0n
	for gclcip-std-proposals@m.gmane.org; Thu, 16 Oct 2014 22:16:30 +0200
Original-Received: by mail-pa0-f71.google.com with SMTP id rd3sf22165261pab.10
        for <gclcip-std-proposals@m.gmane.org>; Thu, 16 Oct 2014 13:16:28 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:date
         :message-id:subject:from: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=xc+1WO4l/4UR5k7CTBRcVth/N/RSfgvrmKKV99wJl2Q=;
        b=Smn1BS/JJFhbVLJm9QwbpelS+lnu3joQzrkT2NrmbRoRdasjoUburdeubxVhmaNkhN
         vsAanGkGzvJ4NJEqhf4o6tmfGLFGS8TFOhRC8tkkiMdJxwdQVSJslhweW0hxLKDfioWC
         u1Smmhro6MEOnrU/EFuR/ENMKowLjfZg5eRat/zmFYChNlwjEhtRPvxgFM/8IXzlE7a2
         eYSXAT81SSi1wX0NGh8YyO36SwpZbbz7pl3SfihPfVdpCs/J3fLidW1IbuBe1fSU8p+X
         HvgPT2puMdUok0wG+0KDpTWLAAVUdmQrs/7FzJx9FGesVPv5ezhz4XYRzijReFQ8oo9W
         AhuA==
X-Gm-Message-State: ALoCoQmxb6R1piYMwnPOn6mCu8ED2NwytXTDcwHzqd1sOnIE0elZcVgl4u5bMHqwdXxuHAsXqeEq
X-Received: by 10.66.90.164 with SMTP id bx4mr2327194pab.2.1413490588307;
        Thu, 16 Oct 2014 13:16:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.29.71 with SMTP id a65ls916382qga.11.gmail; Thu, 16 Oct
 2014 13:16:27 -0700 (PDT)
X-Received: by 10.52.145.197 with SMTP id sw5mr2697866vdb.71.1413490587532;
        Thu, 16 Oct 2014 13:16:27 -0700 (PDT)
Original-Received: from mail-vc0-x230.google.com (mail-vc0-x230.google.com [2607:f8b0:400c:c03::230])
        by mx.google.com with ESMTPS id jl2si21979763vdb.15.2014.10.16.13.16.27
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Thu, 16 Oct 2014 13:16:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of metafoo@gmail.com designates 2607:f8b0:400c:c03::230 as permitted sender) client-ip=2607:f8b0:400c:c03::230;
Original-Received: by mail-vc0-f176.google.com with SMTP id hq11so3319164vcb.35
        for <std-proposals@isocpp.org>; Thu, 16 Oct 2014 13:16:27 -0700 (PDT)
X-Received: by 10.220.202.72 with SMTP id fd8mr3253623vcb.59.1413490587434;
 Thu, 16 Oct 2014 13:16:27 -0700 (PDT)
Original-Sender: metafoo@gmail.com
Original-Received: by 10.220.65.138 with HTTP; Thu, 16 Oct 2014 13:16:27 -0700 (PDT)
In-Reply-To: <97aba3ad-71d1-46ef-88e5-ee00137df7fb@isocpp.org>
X-Original-Sender: richard@metafoo.co.uk
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of metafoo@gmail.com designates 2607:f8b0:400c:c03::230 as permitted
 sender) smtp.mail=metafoo@gmail.com;       dkim=pass header.i=@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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13970
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13970>

--001a11c1a2365b849e05058fece8
Content-Type: text/plain; charset=UTF-8

On Wed, Oct 15, 2014 at 11:40 PM, Markus Grech <markus.grech@gmail.com>
wrote:

> I'm very surprised that nobody here knows how to write copy&swap correctly.
> T& operator =(T rhs)
> {
>     swap(rhs);
>     return *this;
> }
>

http://stackoverflow.com/questions/7458110/c-unified-assignment-operator-move-semantics/7458222#7458222
http://stackoverflow.com/questions/18303287/when-is-overloading-pass-by-reference-l-value-and-r-value-preferred-to-pass-by/18303787#18303787

-- 

--- 
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/.

--001a11c1a2365b849e05058fece8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On W=
ed, Oct 15, 2014 at 11:40 PM, Markus Grech <span dir=3D"ltr">&lt;<a href=3D=
"mailto:markus.grech@gmail.com" target=3D"_blank">markus.grech@gmail.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0p=
x 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);bo=
rder-left-style:solid;padding-left:1ex"><div dir=3D"ltr">I&#39;m very surpr=
ised that nobody here knows how to write copy&amp;swap correctly.<div><div =
style=3D"border:1px solid rgb(187,187,187);word-wrap:break-word;background-=
color:rgb(250,250,250)"><code><div><font color=3D"#660066"><span style=3D"c=
olor:rgb(0,0,0)">T</span><span style=3D"color:rgb(102,102,0)">&amp;</span><=
span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">=
operator</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"colo=
r:rgb(102,102,0)">=3D(</span><span style=3D"color:rgb(0,0,0)">T rhs</span><=
span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color:rgb(0,0,0)=
"><br></span><span style=3D"color:rgb(102,102,0)">{</span><span style=3D"co=
lor:rgb(0,0,0)"><br>=C2=A0 =C2=A0 swap</span><span style=3D"color:rgb(102,1=
02,0)">(</span><span style=3D"color:rgb(0,0,0)">rhs</span><span style=3D"co=
lor:rgb(102,102,0)">);</span><span style=3D"color:rgb(0,0,0)"><br></span></=
font><span style=3D"color:rgb(0,0,0)"><span style=3D"color:rgb(0,0,0)">=C2=
=A0 =C2=A0 </span><span style=3D"color:rgb(0,0,136)">return</span><span sty=
le=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">*</spa=
n><span style=3D"color:rgb(0,0,136)">this</span><span style=3D"color:rgb(10=
2,102,0)">;</span></span><font color=3D"#660066"><span style=3D"color:rgb(0=
,0,0)"><br></span><span style=3D"color:rgb(102,102,0)">}</span></font></div=
></code></div></div></div></blockquote><div><br></div><div><a href=3D"http:=
//stackoverflow.com/questions/7458110/c-unified-assignment-operator-move-se=
mantics/7458222#7458222">http://stackoverflow.com/questions/7458110/c-unifi=
ed-assignment-operator-move-semantics/7458222#7458222</a><br></div><div><a =
href=3D"http://stackoverflow.com/questions/18303287/when-is-overloading-pas=
s-by-reference-l-value-and-r-value-preferred-to-pass-by/18303787#18303787">=
http://stackoverflow.com/questions/18303287/when-is-overloading-pass-by-ref=
erence-l-value-and-r-value-preferred-to-pass-by/18303787#18303787</a></div>=
</div></div></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"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c1a2365b849e05058fece8--

.
