220 28942 <CAOHCbivK2Hu5ch58FC9dPb5RfnKVDrd5Sj4b7hJMUKkTciZtng@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Tony V E <tvaneerd@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 12:29:23 -0400
Lines: 100
Approved: news@gmane.org
Message-ID: <CAOHCbivK2Hu5ch58FC9dPb5RfnKVDrd5Sj4b7hJMUKkTciZtng@mail.gmail.com>
References: <8a6731f7-1c9b-482d-817e-c2374fc9ae1b@isocpp.org> <nu53qp$lvv$1@blaine.gmane.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a1148e288073d69053f263282
X-Trace: blaine.gmane.org 1476808179 723 195.159.176.226 (18 Oct 2016 16:29:39 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 18 Oct 2016 16:29:39 +0000 (UTC)
To: Standard Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIOLG4ZYACRUBA4E3QQY@isocpp.org Tue Oct 18 18:29:35 2016
Return-path: <std-proposals+bncBCUZ5QWKNQIOLG4ZYACRUBA4E3QQY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f72.google.com ([209.85.215.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIOLG4ZYACRUBA4E3QQY@isocpp.org>)
	id 1bwXGV-0006z2-TL
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Oct 2016 18:29:23 +0200
Original-Received: by mail-lf0-f72.google.com with SMTP id x79sf14765508lff.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Oct 2016 09:29:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references: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=5bnwHEeviBl/Y21L3TH9sFKbV2Z/YpilzMbi6svQN2E=;
        b=GHOu1bW4gjfGHBajWXHw2FP4HXqVH2UaNJnocoEw0rGOCW/vtbLZArW9a9DfjNCaOk
         TKP/zi0uuac/jhDQhmGxj89Lh1cwsfdAatAR7fSwZ0PzEM3jTiMx/pWRTEon0OP8e4xG
         qrFbCy+bh5ef+IWd95BrvQjvmjtmsVb3hWvr9QGzE9QAtOcG7PgPBbojSB4Jz3s7CNyz
         tW/wvQvudRw1fN/BUMzDP0WQvhc4zaHKTkuAcLSt07MY8SbO1PqjzW2UETUHuyPo9lnj
         1B2sXivYQcFm9kgdhGpkcD/RS9Omc54YTWQrLy+XI6T8pT/2l41znksUgIxe/eFI4t4f
         ADpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references: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=5bnwHEeviBl/Y21L3TH9sFKbV2Z/YpilzMbi6svQN2E=;
        b=cPvJQaNUs+EWMXw1QVqrDsjdPlrUvQ9jwQ48Ld1Ah1pMdUxeuK6hejlZxmYZiqa85A
         RKH9F4ThPVnQr5EnOb0p9rQmTFlsTeTfwr7EGuOwg9mvuke4Fqh6oY4bFGdSSAOdX05S
         BJXDjWeEqR73DuNvT+m9W/Ao9AIYQnWdhc95XqferkQCvnAiezS9Nu/uWiNSOLaPxQKQ
         sKxCLKP1AeVLwC3AN/slRuVN9sTgEzUoayq09HWtX5872sDAwCUF/A4EyFZdXFRWqHYZ
         2lXU95To6yFUro9Tw4t9f5BfLEM4zX+IXn7E9lVbHq5mxRHkJNa7Oz8va57wSqLqFc5+
         KHQg==
X-Gm-Message-State: AA6/9RlmK4b8GGY/ErUwIJURkJwLj+8VqHtw/IeoI9+s59MRki3UaMexEnJsSTy8VPgzTg==
X-Received: by 10.25.190.206 with SMTP id o197mr107994lff.25.1476808166406;
        Tue, 18 Oct 2016 09:29:26 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.196.65 with SMTP id u62ls26535wmf.26.gmail; Tue, 18 Oct
 2016 09:29:24 -0700 (PDT)
X-Received: by 10.194.173.1 with SMTP id bg1mr799987wjc.119.1476808164715;
        Tue, 18 Oct 2016 09:29:24 -0700 (PDT)
Original-Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com. [2a00:1450:400c:c09::229])
        by mx.google.com with ESMTPS id 10si49743972wjf.6.2016.10.18.09.29.24
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 18 Oct 2016 09:29:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2a00:1450:400c:c09::229 as permitted sender) client-ip=2a00:1450:400c:c09::229;
Original-Received: by mail-wm0-x229.google.com with SMTP id d128so452990wmf.1
        for <std-proposals@isocpp.org>; Tue, 18 Oct 2016 09:29:24 -0700 (PDT)
X-Received: by 10.28.65.215 with SMTP id o206mr1318888wma.41.1476808164194;
 Tue, 18 Oct 2016 09:29:24 -0700 (PDT)
Original-Received: by 10.28.157.23 with HTTP; Tue, 18 Oct 2016 09:29:23 -0700 (PDT)
In-Reply-To: <nu53qp$lvv$1@blaine.gmane.org>
X-Original-Sender: tvaneerd@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of tvaneerd@gmail.com
 designates 2a00:1450:400c:c09::229 as permitted sender) smtp.mailfrom=tvaneerd@gmail.com;
       dmarc=pass (p=NONE dis=NONE) header.from=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:28942
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28942>

--001a1148e288073d69053f263282
Content-Type: text/plain; charset=UTF-8

On Tue, Oct 18, 2016 at 8:16 AM, Bo Persson <bop@gmb.dk> wrote:

>
>
> Having similar functions use the same names as functions of the slighlty
> smarter pointers, might help replacing those with an observer_pointer.
> Changing "release" into "stop_observing" (or something) doesn't appeal to
> me.
>
>
> If we look at a similar problem in merging "optional", "variant", and
> "any" into the draft standard, we ended up with two of them having a "bool
> has_value()" function, while the third got a "bool
> valueless_by_exception()".
>
> Not only do they have different names, but also different true/false
> return value for the same(?) condition - does it store anything.
>


This was very intentional.  optional and any are expected to be empty,
variant is not.  My personal suggestion is to never call
valueless_by_exception().  Depends on your codebase and type of product,
but in most cases, if your variant got into the valueless state, you have
bigger problems to worry about.



>    Bo Persson
>
>

-- 
Be seeing you,
Tony

-- 
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/CAOHCbivK2Hu5ch58FC9dPb5RfnKVDrd5Sj4b7hJMUKkTciZtng%40mail.gmail.com.

--001a1148e288073d69053f263282
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Tue, Oct 18, 2016 at 8:16 AM, Bo Persson <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:bop@gmb.dk" target=3D"_blank">bop@gmb.dk</a>&gt;</span> wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><br>
<br>
Having similar functions use the same names as functions of the slighlty sm=
arter pointers, might help replacing those with an observer_pointer. Changi=
ng &quot;release&quot; into &quot;stop_observing&quot; (or something) doesn=
&#39;t appeal to me.<br>
<br>
<br>
If we look at a similar problem in merging &quot;optional&quot;, &quot;vari=
ant&quot;, and &quot;any&quot; into the draft standard, we ended up with tw=
o of them having a &quot;bool has_value()&quot; function, while the third g=
ot a &quot;bool valueless_by_exception()&quot;.<br>
<br>
Not only do they have different names, but also different true/false return=
 value for the same(?) condition - does it store anything.<br></blockquote>=
<div><br></div><div><br>This was very intentional.=C2=A0 optional and any a=
re expected to be empty, variant is not.=C2=A0 My personal suggestion is to=
 never call valueless_by_exception().=C2=A0 Depends on your codebase and ty=
pe of product, but in most cases, if your variant got into the valueless st=
ate, you have bigger problems to worry about.<br><br><br></div><blockquote =
class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid=
;padding-left:1ex">
<br>
=C2=A0 =C2=A0Bo Persson<span class=3D""><br>
</span><br></blockquote></div><br clear=3D"all"><br>-- <br><div class=3D"gm=
ail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div>Be =
seeing you,<br></div>Tony<br></div></div>
</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/CAOHCbivK2Hu5ch58FC9dPb5RfnKVDrd5Sj4b=
7hJMUKkTciZtng%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOHCbivK2Hu5ch58=
FC9dPb5RfnKVDrd5Sj4b7hJMUKkTciZtng%40mail.gmail.com</a>.<br />

--001a1148e288073d69053f263282--

.
