220 28949 <df7f2588-4f7f-4cef-a337-fd186d4fef7f@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "T. C." <rs2740@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Is World's Dumbest Pointer still on the table?!?
Date: Tue, 18 Oct 2016 10:48:00 -0700 (PDT)
Lines: 145
Approved: news@gmane.org
Message-ID: <df7f2588-4f7f-4cef-a337-fd186d4fef7f@isocpp.org>
References: <8a6731f7-1c9b-482d-817e-c2374fc9ae1b@isocpp.org>
 <nu53qp$lvv$1@blaine.gmane.org> <7d817482-e7c3-4724-9501-738d4c9083d7@isocpp.org>
 <CAFk2RUYggLMwivpFr+thZmRBUXBgXC283iwAvyRQEnbT7xrqUA@mail.gmail.com>
 <f3d2848e-56f7-4ddd-a0a0-1a8c7b8db391@isocpp.org> <CAOHCbiskO5DpTwym8nH=yra+Ypa-+b-ycfSV+34JLjPqC8ST4g@mail.gmail.com>
 <4d9aa487-c824-490a-ae3a-ac90e2a2db3d@isocpp.org> <CAFk2RUZC6anr-MkMA37H3LKM235Uxh0Y6z58KyvRK-4h3R6+Rw@mail.gmail.com>
 <080a6163-4350-4246-a2d6-a3ae7f6db473@isocpp.org> <CAFk2RUandxAXbCfBrF5VuuZif=Z8Y__OqDWZpTbaHEjyAPQNQA@mail.gmail.com>
 <72ad1e5d-b7c0-414e-a9a1-ac56a43dd51c@isocpp.org>
 <CAFk2RUbk-+NuF0Vh0VggU6xPL-uzz_PXnuHVuM=KsSC3JQjGWA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2611_1516409800.1476812881087"
X-Trace: blaine.gmane.org 1476812921 25626 195.159.176.226 (18 Oct 2016 17:48:41 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 18 Oct 2016 17:48:41 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCQ43G7NQIIRBU6ATHAAKGQEOT766MI@isocpp.org Tue Oct 18 19:48:37 2016
Return-path: <std-proposals+bncBCQ43G7NQIIRBU6ATHAAKGQEOT766MI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f72.google.com ([209.85.218.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCQ43G7NQIIRBU6ATHAAKGQEOT766MI@isocpp.org>)
	id 1bwYUg-0002wl-NI
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Oct 2016 19:48:06 +0200
Original-Received: by mail-oi0-f72.google.com with SMTP id a195sf2580335oib.0
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Oct 2016 10:48:09 -0700 (PDT)
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=aP2GjqTuIXOyex3oRS+3C1cH5YX26PGynurH/TMlyPY=;
        b=rJTNNGtSC8iQfS1l+Q6ojjsoDfdHEA8jwfLoAGFWjPJr04JiSXQAh9lXlaH1z9QdxR
         jfslVhS6PubvjdFbbJub/QnNsRsh4quj9jjd13sCSU5hcLujQPt/esgF480eVZtzXUSh
         4ZKeM8TIBoiOu6g7KVc6sTR80Xkk8Xn9oDa45Li0AkFKibfm8mltE308fCnjza9FYoU+
         MkpC373eFlTSJXDS1X7D+lxPJ9R59K/5rCunfq7pCjvecM3+1pqxWEh08jHAAMq72Yr3
         0mMOO6CUW7b3gi1Sad2hFrx8iR7bZ2Fp6XPkrFMwgGtiSxFPkMwXXA3gtr1LFRj49Y65
         AAwA==
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
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=aP2GjqTuIXOyex3oRS+3C1cH5YX26PGynurH/TMlyPY=;
        b=aQT78+y/ky+NAm6lFIMxHRkjOAuQk2awNB6zdeVTTGZLCHOJKwQ6czcQiY/XVv85kL
         obMpLF/Imw5y0BrFga1+D2iFM2c3AeKUwYHxO81nfvXbLb2iPDkHtdvtop+Cgc276erE
         65bMa6GyXNqBU1qUJm8108wofAr1CLkhGsCnTtEwb2gkF9BY664CzaKYF+esODHS5qqy
         C8sQ00+dcmguE8mEzd2NuuIJFRWSV0VTq71SenJOZt2G2i+EaZPIc2bAxTZ+QYk/3P0i
         rW9EvIF1moFEoZXvgfcMRf4UMOYz81bw2B3nfgsVVicEcF9XvgUzrvvTjusLP4cfJcIX
         HTVw==
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:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=aP2GjqTuIXOyex3oRS+3C1cH5YX26PGynurH/TMlyPY=;
        b=GUx/oJYayEuus1YwaT4TGxRGjVjSj50HGvijpOPWFn34nXNFh0j5IZJhnrHmXw2ZxP
         8nBg84jg8ZKguENqCKDhARt6SfixJxhDX14fyS3I1Osk96kRHANwn35N0FSEcAbDjO7F
         ikPAH5f9xamQxzzW9s82huVmfR4XharTaSYrnRfyXXFaR9bQ0KlmvstAqf8+kyBPoufk
         9kV7esk+qBhwA4urrCY0WHIrqZZCv7ysRckAapUdiRY5kVxxUt1oklZz8IJpgkyNj/+X
         S2LZI9dPOTqAng3FKBy6Gl+K44Y6v0M66L42WeVZ3ujCSzitCyLwVuxY99zGx5J9osWy
         P/SQ==
X-Gm-Message-State: AA6/9RkI+h/xLyKVZJMuU4spzFSi3fzTToBULNn6qU422ZnH1LYzezb1rAuo12iMY4TD1g==
X-Received: by 10.157.21.88 with SMTP id z24mr514914otz.10.1476812888517;
        Tue, 18 Oct 2016 10:48:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.146.139 with SMTP id u133ls148408iod.49.gmail; Tue, 18 Oct
 2016 10:48:03 -0700 (PDT)
X-Received: by 10.36.225.205 with SMTP id n196mr236224ith.0.1476812882785;
        Tue, 18 Oct 2016 10:48:02 -0700 (PDT)
In-Reply-To: <CAFk2RUbk-+NuF0Vh0VggU6xPL-uzz_PXnuHVuM=KsSC3JQjGWA@mail.gmail.com>
X-Original-Sender: rs2740@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:28949
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28949>

------=_Part_2611_1516409800.1476812881087
Content-Type: multipart/alternative; 
	boundary="----=_Part_2612_1450826219.1476812881088"

------=_Part_2612_1450826219.1476812881088
Content-Type: text/plain; charset=UTF-8



On Tuesday, October 18, 2016 at 1:06:42 PM UTC-4, Ville Voutilainen wrote:
>
> On 18 October 2016 at 20:02,  <mihailn...@gmail.com <javascript:>> wrote: 
> > 
> > On Tuesday, October 18, 2016 at 7:43:11 PM UTC+3, Ville Voutilainen 
> wrote: 
> >> 
> >> .. 
> >> 
> >> I don't know how many times I need to point out that reset() on a 
> >> unique_ptr might have no 
> >> effect on the object lifetime, depending on the deleter. 
> > 
> > 
> >  cppreference.com: 
> > 
> >> std::unique_ptr is a smart pointer that retains sole ownership of an 
> >> object through a pointer and destroys that object when the unique_ptr 
> goes 
> >> out of scope. No two unique_ptr instances can manage the same object. 
> >> 
> >> The object is destroyed and its memory deallocated when either of the 
> >> following happens: 
> >>  the managing unique_ptr object is destroyed 
> >>  the managing unique_ptr object is assigned another pointer via 
> operator= 
> >> or reset(). 
> >> 
> >> The object is destroyed using a potentially user-supplied deleter by 
> >> calling Deleter(ptr). The deleter calls the destructor of the object 
> and 
> >> dispenses the memory. 
> > 
> > 
> > All else is a naughty corner case. 
>
>
> All else is subject to the semantics of any possible custom deleter 
> provided, and none of that nonsense 
> on cppreference applies to such custom deleters. The standard doesn't 
> make such incorrect claims about 
> how unique_ptr works. 
>

Fixed, I think. 

-- 
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/df7f2588-4f7f-4cef-a337-fd186d4fef7f%40isocpp.org.

------=_Part_2612_1450826219.1476812881088
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, October 18, 2016 at 1:06:42 PM UTC-4, =
Ville Voutilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: =
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 18 =
October 2016 at 20:02, =C2=A0&lt;<a href=3D"javascript:" target=3D"_blank" =
gdf-obfuscated-mailto=3D"89519rGbBgAJ" rel=3D"nofollow" onmousedown=3D"this=
..href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;jav=
ascript:&#39;;return true;">mihailn...@gmail.com</a>&gt; wrote:
<br>&gt;
<br>&gt; On Tuesday, October 18, 2016 at 7:43:11 PM UTC+3, Ville Voutilaine=
n wrote:
<br>&gt;&gt;
<br>&gt;&gt; ..
<br>&gt;&gt;
<br>&gt;&gt; I don&#39;t know how many times I need to point out that reset=
() on a
<br>&gt;&gt; unique_ptr might have no
<br>&gt;&gt; effect on the object lifetime, depending on the deleter.
<br>&gt;
<br>&gt;
<br>&gt; =C2=A0<a href=3D"http://cppreference.com" target=3D"_blank" rel=3D=
"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.com/url?q\x3dh=
ttp%3A%2F%2Fcppreference.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFfMEVs=
riPdiSLWG49XWK9zX_c5Ug&#39;;return true;" onclick=3D"this.href=3D&#39;http:=
//www.google.com/url?q\x3dhttp%3A%2F%2Fcppreference.com\x26sa\x3dD\x26sntz\=
x3d1\x26usg\x3dAFQjCNFfMEVsriPdiSLWG49XWK9zX_c5Ug&#39;;return true;">cppref=
erence.com</a>:
<br>&gt;
<br>&gt;&gt; std::unique_ptr is a smart pointer that retains sole ownership=
 of an
<br>&gt;&gt; object through a pointer and destroys that object when the uni=
que_ptr goes
<br>&gt;&gt; out of scope. No two unique_ptr instances can manage the same =
object.
<br>&gt;&gt;
<br>&gt;&gt; The object is destroyed and its memory deallocated when either=
 of the
<br>&gt;&gt; following happens:
<br>&gt;&gt; =C2=A0the managing unique_ptr object is destroyed
<br>&gt;&gt; =C2=A0the managing unique_ptr object is assigned another point=
er via operator=3D
<br>&gt;&gt; or reset().
<br>&gt;&gt;
<br>&gt;&gt; The object is destroyed using a potentially user-supplied dele=
ter by
<br>&gt;&gt; calling Deleter(ptr). The deleter calls the destructor of the =
object and
<br>&gt;&gt; dispenses the memory.
<br>&gt;
<br>&gt;
<br>&gt; All else is a naughty corner case.
<br>
<br>
<br>All else is subject to the semantics of any possible custom deleter
<br>provided, and none of that nonsense
<br>on cppreference applies to such custom deleters. The standard doesn&#39=
;t
<br>make such incorrect claims about
<br>how unique_ptr works.
<br></blockquote><div><br></div><div>Fixed, I think.=C2=A0</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/df7f2588-4f7f-4cef-a337-fd186d4fef7f%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/df7f2588-4f7f-4cef-a337-fd186d4fef7f=
%40isocpp.org</a>.<br />

------=_Part_2612_1450826219.1476812881088--

------=_Part_2611_1516409800.1476812881087--

.
