220 29839 <67a9e9ed-8748-4098-a43b-33598b516464@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Nicol Bolas <jmckesson@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: New smart pointer: CopyConstructible and
 CopyAssignable flavor of unique_ptr
Date: Fri, 16 Dec 2016 07:46:27 -0800 (PST)
Lines: 82
Approved: news@gmane.org
Message-ID: <67a9e9ed-8748-4098-a43b-33598b516464@isocpp.org>
References: <13702f32-32c2-447f-9996-3624fd678675@isocpp.org> <CAFk2RUY3c67YgivjPTSCB+FLUGfiFgi8F_8kcSSUwPeBp9tMmw@mail.gmail.com>
 <CAEddoJZxM5qe9qVfags_iNrd0YpvUo2xmSw-OqifnHJ+4wJtxA@mail.gmail.com>
 <e1e780b7-34ea-41bf-9aba-22a1eb6a5f3f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_774_728247322.1481903188016"
X-Trace: blaine.gmane.org 1481903196 3754 195.159.176.226 (16 Dec 2016 15:46:36 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 16 Dec 2016 15:46:36 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCEKFTV6ZUMBBVEY2DBAKGQE6QZZX3Q@isocpp.org Fri Dec 16 16:46:28 2016
Return-path: <std-proposals+bncBCEKFTV6ZUMBBVEY2DBAKGQE6QZZX3Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f198.google.com ([209.85.192.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCEKFTV6ZUMBBVEY2DBAKGQE6QZZX3Q@isocpp.org>)
	id 1cHuiH-0007hw-13
	for gclcip-std-proposals@m.gmane.org; Fri, 16 Dec 2016 16:46:25 +0100
Original-Received: by mail-pf0-f198.google.com with SMTP id y68sf126251591pfb.6
        for <gclcip-std-proposals@m.gmane.org>; Fri, 16 Dec 2016 07:46:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=v9kVr6GOY13v0bAmnYTy2Kdq2oJIp6IvXU7a50l37/c=;
        b=rHRRtEgCOjiliU9j4Rhu8qQp6QH3FIJuZj0jVNxfBoSw/T+IxNMq+XC1EGebZXUnX6
         +ULjTRqULJsYcFjoTTaMHJ/P29kKQ1nht64grCxzyF3Ku5H9SInmvsJU4qSQVIBskxfx
         hRNpJ5odOlwDYywp5gSNShwl75RcfGi3i6XMoiGiGhartAMneh9f1Hex46Pe3nDxxGSM
         lSnLqXQIliqNryqvjdKGlj0+pYoAdlqaiwZyorWSPrH27H9G3S5Ux4QilWC3RZCYbrWU
         jUszGhuPyK6RQt9i4NmfN6Qsy2VUBzaZ2LDjSneYfClZ/4irml1DN+BmyiH947o4CAkn
         9dXg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=v9kVr6GOY13v0bAmnYTy2Kdq2oJIp6IvXU7a50l37/c=;
        b=o8KqPYO8v1L8lL+di963MNm7/HUjxcyQQaYy2HuhyW1u6sdNkxt4b3mhPkInj27vYE
         UtDLmIMb551lKtTMyZqkb1tvj/+jB0KaDkzzn6tEOOlM1vrkSwW6yKM3FQYY8ah7lBR3
         lZDwLXx6jnSSe7pwuCDQlyu4VPelTNmKAuE88WFvZJb2DHVAYq/Be9VUO7JPvhHpqEcp
         9RM7wpPl73rrwiW+RDqQB26NOwD+gPAX7hHYWHE/b9mI+L/xaunsfxR5R9OXQWc0saVE
         bClS2cW28TMt2tn5QPPPDrYVi+VSZQZSOgHFEryfCGxBCWgurs6s/JaaDYIsa8Zr8oN4
         3ZKQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        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:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=v9kVr6GOY13v0bAmnYTy2Kdq2oJIp6IvXU7a50l37/c=;
        b=IxRTiVK+6IITc8P4WriI/Jn551fGAeWthXJV/FVTb90WhaVmx1w8a1MvB6pLrunBjl
         iPZHDrgDzv0U7CaA+xVG8xO28s9jhUMx/pTACtXXGo0Gnk3aeYKiHl7W5cXsA3VL+0lR
         d66iehcXAznNAe+Te3HySEzfQ6P6toFfalDFUeSDE1MLF5ppUuY6eXna6TqhiBfM1ItX
         1fYyPUQRK68tQRlNBH799puiBr3zzw1IgvORYfuDeZ2hMCKR0qzcC7L99z3vHu9TQ8iX
         Mmsm78fq4syzb2eIwQ2/krQcEESYloffUuyBYX64MFWHShLY+bGgX2UfN4srrQJkiqfS
         rzgQ==
X-Gm-Message-State: AKaTC02etoXkVGTDbHm0XHV9oF9oT/NL2lmtXxvn5yie92u+/jLHQ4hnwC2UjbXYfloHrQ==
X-Received: by 10.99.121.132 with SMTP id u126mr1826078pgc.1.1481903189083;
        Fri, 16 Dec 2016 07:46:29 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.17.166 with SMTP id v35ls8936779otf.0.gmail; Fri, 16 Dec
 2016 07:46:28 -0800 (PST)
X-Received: by 10.157.37.247 with SMTP id q110mr185610ota.5.1481903188454;
        Fri, 16 Dec 2016 07:46:28 -0800 (PST)
In-Reply-To: <e1e780b7-34ea-41bf-9aba-22a1eb6a5f3f@isocpp.org>
X-Original-Sender: jmckesson@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: <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:29839
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29839>

------=_Part_774_728247322.1481903188016
Content-Type: multipart/alternative; 
	boundary="----=_Part_775_1532963622.1481903188017"

------=_Part_775_1532963622.1481903188017
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Friday, December 16, 2016 at 6:58:40 AM UTC-5, Jonathan Wakely wrote:
>
> On Friday, 16 December 2016 11:44:40 UTC, Jonathan M=C3=BCller wrote:
>>
>> So it transfers ownership when moving and does a deep copy when copying?
>>
>> I don't think two so different semantics are a great idea.
>>
>>
>>
> That seems to work for std::vector, and many other types.
>

I really think this needs to be emphasized. Cheap-move+deep-copy are hardly=
=20
an uncommon set of semantics in C++. Every standard library container uses=
=20
these semantics.

The only question is how deep the copy goes: whether you're creating a `T`=
=20
itself or some class derived from `T`.

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/67a9e9ed-8748-4098-a43b-33598b516464%40isocpp.or=
g.

------=_Part_775_1532963622.1481903188017
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, December 16, 2016 at 6:58:40 AM UTC-5, Jonathan=
 Wakely wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
>On Friday, 16 December 2016 11:44:40 UTC, Jonathan M=C3=BCller  wrote:<blo=
ckquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><p dir=3D"ltr">So it transfers ownershi=
p when moving and does a deep copy when copying?</p>
<p dir=3D"ltr">I don&#39;t think two so different semantics are a great ide=
a.</p>
<p dir=3D"ltr"><br></p></blockquote><div><br></div><div>That seems to work =
for std::vector, and many other types.</div></div></blockquote><div><br>I r=
eally think this needs to be emphasized. Cheap-move+deep-copy are hardly an=
 uncommon set of semantics in C++. Every standard library container uses th=
ese semantics.<br><br>The only question is how deep the copy goes: whether =
you&#39;re creating a `T` itself or some class derived from `T`.<br></div><=
/div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/67a9e9ed-8748-4098-a43b-33598b516464%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/67a9e9ed-8748-4098-a43b-33598b516464=
%40isocpp.org</a>.<br />

------=_Part_775_1532963622.1481903188017--

------=_Part_774_728247322.1481903188016--

.
