220 29882 <CAPCFJdRj+qTfY2oBKk3nOy41Sd-EBqv5t-2Vr1T2t=6-Nf53yg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: =?UTF-8?Q?Micha=C5=82_Dominiak?= <griwes@griwes.info>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: New smart pointer: CopyConstructible and
 CopyAssignable flavor of unique_ptr
Date: Sat, 17 Dec 2016 18:16:02 +0000
Lines: 136
Approved: news@gmane.org
Message-ID: <CAPCFJdRj+qTfY2oBKk3nOy41Sd-EBqv5t-2Vr1T2t=6-Nf53yg@mail.gmail.com>
References: <CAEddoJZxM5qe9qVfags_iNrd0YpvUo2xmSw-OqifnHJ+4wJtxA@mail.gmail.com>
 <67a9e9ed-8748-4098-a43b-33598b516464@isocpp.org> <ad1bfe2f-c769-4938-9f92-8f6b396f03e6@isocpp.org>
 <e30ffb82-0d5f-fafd-39b4-28e60d07c948@gmail.com> <20161217141109.GA22645@manuel-ThinkPad-L440.localdomain>
 <b1c473be-03c1-e4db-f0c4-a23f182c7154@gmail.com> <CAFk2RUYmdj2HwRpP2HhY=xujkFP1e5LYKkg6eOGBOF_yE-3Lcg@mail.gmail.com>
 <3df7e8eb-01a0-7804-f476-504b5a25a9fe@gmail.com> <CAFk2RUaY3+MnXkmvaC=LxgRA_RD_XQpFfX-HT6X3iq1wD7ggCg@mail.gmail.com>
 <20161217170428.GA10214@manuel-ThinkPad-L440.localdomain> <20161217171633.4919375.58072.21574@gmail.com>
 <CAEddoJaAZkeJS9Maj2z0vYGnfuNnJZ+qFFdjeQyesTF5itJxHA@mail.gmail.com>
 <15884364-3238-41c7-bc5a-aa5595a64ade@isocpp.org> <CAEddoJa4V_UFj7xcNwR_YNqCfbNtEMbXZgsYDyXCx=M51E2xdQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=94eb2c0b6858864dae0543deae3c
X-Trace: blaine.gmane.org 1481998577 7972 195.159.176.226 (17 Dec 2016 18:16:17 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 17 Dec 2016 18:16:17 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCA6D5ULVYBRB3UB23BAKGQEGMDX3JY@isocpp.org Sat Dec 17 19:16:11 2016
Return-path: <std-proposals+bncBCA6D5ULVYBRB3UB23BAKGQEGMDX3JY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f197.google.com ([209.85.216.197])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCA6D5ULVYBRB3UB23BAKGQEGMDX3JY@isocpp.org>)
	id 1cIJWk-0000ho-Dv
	for gclcip-std-proposals@m.gmane.org; Sat, 17 Dec 2016 19:16:10 +0100
Original-Received: by mail-qt0-f197.google.com with SMTP id x26sf80248083qtb.6
        for <gclcip-std-proposals@m.gmane.org>; Sat, 17 Dec 2016 10:16:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=Trz+N3pMOIEusB7qyHJdcEiC7wKmF/mb3N8PaGFtya0=;
        b=dDWsduOP2sFB6BIrrzz6e0ZL0T9S0uM6Bxx3/nG6wbhuiLIsjWUlztg9c8TAe6VfYf
         cEygmNed7sLc+gc2t6hTxNTtE7sH0ot/fbU+bhU0f9p3zNhW8LyVELDgA/8DKqVs0UsQ
         FVDf8L5oUxIstyOPJThGg9lGYmGvTU5iPTHk6A8JgvUZotyom/CiS1skLhI7UOxcTXeO
         ncZ493J9maiywEqeY2VchxMeOdgCeN+aEHm8lznqmbFmx7CT4j/PUUQpoLjzMFhBoMMQ
         2ShF7+CWK+0vy8Wtn/aW6TPaRUB2dcKA68+nKWMiqIpMYo6k+1TBNFzhIcDge/bF716+
         I/UQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Trz+N3pMOIEusB7qyHJdcEiC7wKmF/mb3N8PaGFtya0=;
        b=c8vv8jFcY0qnWlHu9hKpQI5F4/D/upWp0SSrzPVLKZ+igD3aPEM3LMNtOhN5EXjSO/
         gqIVD228Znw62AUEZbXEbIh6Vj6xgIZ5Pf3oIjCkxeZQBQdgpQRHr2FW/ZvlhwdJGOjM
         0eVxDaXK1QbZRdv+Z11+U8xIhJTtFM+BtPVjdzKI95+lgRZOE2iTxk1SegmXDpTb3mLW
         gWJ1nJfXA1qUOIjU5XpTA1zsy38TBrnrQFAt88NvrBFpnth81c02zahB2qTPce3/cNQ6
         yPf7iY+AifZywI+pAVXqcazv6P+iRvxmIWs81CJmTLKz2ex9wlxEkIq5Hf1z789FuOam
         kaHQ==
X-Gm-Message-State: AIkVDXLjlpbYg2zgB4qw9Py0SdtaQpmZCTKklZHXjGXhEkUp/2OoLdCQQyKA50Ika5y7dA==
X-Received: by 10.200.43.136 with SMTP id m8mr1959373qtm.3.1481998574645;
        Sat, 17 Dec 2016 10:16:14 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.45.195 with SMTP id g61ls10458831otb.37.gmail; Sat, 17 Dec
 2016 10:16:13 -0800 (PST)
X-Received: by 10.159.32.8 with SMTP id 8mr6010691uam.129.1481998573881;
        Sat, 17 Dec 2016 10:16:13 -0800 (PST)
Original-Received: from mail-ua0-x229.google.com (mail-ua0-x229.google.com. [2607:f8b0:400c:c08::229])
        by mx.google.com with ESMTPS id 61si3393423uay.227.2016.12.17.10.16.13
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 17 Dec 2016 10:16:13 -0800 (PST)
Received-SPF: neutral (google.com: 2607:f8b0:400c:c08::229 is neither permitted nor denied by best guess record for domain of admin@griwes.info) client-ip=2607:f8b0:400c:c08::229;
Original-Received: by mail-ua0-x229.google.com with SMTP id 12so67493068uas.2
        for <std-proposals@isocpp.org>; Sat, 17 Dec 2016 10:16:13 -0800 (PST)
X-Received: by 10.159.41.34 with SMTP id t31mr1221346uat.153.1481998573386;
 Sat, 17 Dec 2016 10:16:13 -0800 (PST)
In-Reply-To: <CAEddoJa4V_UFj7xcNwR_YNqCfbNtEMbXZgsYDyXCx=M51E2xdQ@mail.gmail.com>
X-Original-Sender: griwes@griwes.info
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@griwes-info.20150623.gappssmtp.com;       spf=neutral (google.com:
 2607:f8b0:400c:c08::229 is neither permitted nor denied by best guess record
 for domain of admin@griwes.info) smtp.mailfrom=admin@griwes.info
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:29882
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29882>

--94eb2c0b6858864dae0543deae3c
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

So you're saying that the standard should not contain tools targeted at
experts? (Just a note: it already does.)

On Sat, Dec 17, 2016 at 7:14 PM Jonathan M=C3=BCller <
jonathanmueller.dev@gmail.com> wrote:

> On Dec 17, 2016 7:04 PM, "Nicol Bolas" <jmckesson@gmail.com> wrote:
> >
> > I don't think "might be harmful" is a good enough reason to not have th=
e
> type.
>
> I think it's a very compelling reason. I rather have types that can be
> used without thinking, because misuse is a compiler error.
>
> > After all, such copying behavior won't break most standard library
> types. `vector<clone_ptr>` will work as expected, as will `any`,
> `optional<clone_ptr>`, `variant<clone_ptr>`, and so forth.
>
> All of these type work without copy constructing. The only reason you'd
> need copy constructing there is if you'd need to insert a copy or copy th=
e
> container. The first one is very easy, just call clone, the second requir=
es
> a for loop.
>
> > I think it's important to understand that `clone_ptr` is a solution to =
a
> very specific problem, one that isn't exactly common. You shouldn't see a
> huge number of these pointers lying around.
>
> Yeah, and that's why I can't really see a compelling use case for them.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAEddoJa4V_U=
Fj7xcNwR_YNqCfbNtEMbXZgsYDyXCx%3DM51E2xdQ%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAEddoJa4V_=
UFj7xcNwR_YNqCfbNtEMbXZgsYDyXCx%3DM51E2xdQ%40mail.gmail.com?utm_medium=3Dem=
ail&utm_source=3Dfooter>
> .
>

--=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/CAPCFJdRj%2BqTfY2oBKk3nOy41Sd-EBqv5t-2Vr1T2t%3D6=
-Nf53yg%40mail.gmail.com.

--94eb2c0b6858864dae0543deae3c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">So you&#39;re saying that the standard should not contain =
tools targeted at experts? (Just a note: it already does.)</div><br><div cl=
ass=3D"gmail_quote"><div dir=3D"ltr">On Sat, Dec 17, 2016 at 7:14 PM Jonath=
an M=C3=BCller &lt;<a href=3D"mailto:jonathanmueller.dev@gmail.com">jonatha=
nmueller.dev@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x"><p dir=3D"ltr" class=3D"gmail_msg">On Dec 17, 2016 7:04 PM, &quot;Nicol =
Bolas&quot; &lt;<a href=3D"mailto:jmckesson@gmail.com" class=3D"gmail_msg" =
target=3D"_blank">jmckesson@gmail.com</a>&gt; wrote:<br class=3D"gmail_msg"=
>
&gt;<br class=3D"gmail_msg">
&gt; I don&#39;t think &quot;might be harmful&quot; is a good enough reason=
 to not have the type.</p>
<p dir=3D"ltr" class=3D"gmail_msg">I think it&#39;s a very compelling reaso=
n. I rather have types that can be used without thinking, because misuse is=
 a compiler error.</p>
<p dir=3D"ltr" class=3D"gmail_msg">&gt; After all, such copying behavior wo=
n&#39;t break most standard library types. `vector&lt;clone_ptr&gt;` will w=
ork as expected, as will `any`, `optional&lt;clone_ptr&gt;`, `variant&lt;cl=
one_ptr&gt;`, and so forth.</p>
<p dir=3D"ltr" class=3D"gmail_msg">All of these type work without copy cons=
tructing. The only reason you&#39;d need copy constructing there is if you&=
#39;d need to insert a copy or copy the container. The first one is very ea=
sy, just call clone, the second requires a for loop.</p>
<p dir=3D"ltr" class=3D"gmail_msg">&gt; I think it&#39;s important to under=
stand that `clone_ptr` is a solution to a very specific problem, one that i=
sn&#39;t exactly common. You shouldn&#39;t see a huge number of these point=
ers lying around.</p>
<p dir=3D"ltr" class=3D"gmail_msg">Yeah, and that&#39;s why I can&#39;t rea=
lly see a compelling use case for them.</p>

<p class=3D"gmail_msg"></p>

-- <br class=3D"gmail_msg">
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br class=3D"gmail_msg=
">
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" class=3D"gm=
ail_msg" target=3D"_blank">std-proposals+unsubscribe@isocpp.org</a>.<br cla=
ss=3D"gmail_msg">
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" class=3D"gmail_msg" target=3D"_blank">std-proposals@isocpp.org</a>.<b=
r class=3D"gmail_msg">
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAEddoJa4V_UFj7xcNwR_YNqCfbNtEMbXZgsY=
DyXCx%3DM51E2xdQ%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoote=
r" class=3D"gmail_msg" target=3D"_blank">https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAEddoJa4V_UFj7xcNwR_YNqCfbNtEMbXZgsYDyXCx%3DM51=
E2xdQ%40mail.gmail.com</a>.<br class=3D"gmail_msg">
</blockquote></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/CAPCFJdRj%2BqTfY2oBKk3nOy41Sd-EBqv5t-=
2Vr1T2t%3D6-Nf53yg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAPCFJdRj%2Bq=
TfY2oBKk3nOy41Sd-EBqv5t-2Vr1T2t%3D6-Nf53yg%40mail.gmail.com</a>.<br />

--94eb2c0b6858864dae0543deae3c--

.
