220 33046 <2991b2b2-2f62-42e2-83d1-f42dae9c32c1@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Barry Revzin <barry.revzin@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::optional - support for sentinel values
Date: Fri, 30 Jun 2017 12:28:12 -0700 (PDT)
Lines: 68
Approved: news@gmane.org
Message-ID: <2991b2b2-2f62-42e2-83d1-f42dae9c32c1@isocpp.org>
References: <6e23864f-827a-4bdb-89de-a60d8f5be993@isocpp.org>
 <c44c5d09-9124-488f-aa92-f9ab59797268@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_593_15458201.1498850892787"
X-Trace: blaine.gmane.org 1498850894 12740 195.159.176.226 (30 Jun 2017 19:28:14 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 30 Jun 2017 19:28:14 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCJJTG7CS4ARBTOM3LFAKGQEQA53P5Y@isocpp.org Fri Jun 30 21:28:10 2017
Return-path: <std-proposals+bncBCJJTG7CS4ARBTOM3LFAKGQEQA53P5Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f72.google.com ([209.85.213.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCJJTG7CS4ARBTOM3LFAKGQEQA53P5Y@isocpp.org>)
	id 1dR1aL-000326-Ud
	for gclcip-std-proposals@m.gmane.org; Fri, 30 Jun 2017 21:28:10 +0200
Original-Received: by mail-vk0-f72.google.com with SMTP id o190sf45187931vka.10
        for <gclcip-std-proposals@m.gmane.org>; Fri, 30 Jun 2017 12:28:15 -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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=1RCNR6uPHFmGt/WS1kI0FdWBgMEXl61Jok6M1XEZWGk=;
        b=LZbdultKS+3wZlfQJ9XAWNTdkQfXV21wGrZTCf/N2NMNc1guMQC3MPSaEYmEjmtyFF
         clJRI2D9Zd0eQ0eRYFyCITA7WiT2K8VImAIDtEk6/eCioK8vdmwMaLybbHlEwwbfK5P6
         pyQx63zREkxh7bsqa4esW1NrDmNRXcpdvdETOFYFf6GILXT/hwWjX87eBbXhuofXrZTc
         y3ErUWdibfrX4SoF8ULX/lL4WkiKvlRxB+HpFwLg2DQWJ8CiAOaa1jdZmcjfW8wIcriz
         ujTR+at3JdxrEQReenZylmwr5BuYX6IJlzSXBQM6QA5wHBeeUDkvi43zfTEOAFRd3QgA
         1nyw==
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
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=1RCNR6uPHFmGt/WS1kI0FdWBgMEXl61Jok6M1XEZWGk=;
        b=pzqjUZQCI149+U/BZjTjmdvPuBvocnZaabbYI+ClyYu1GgWGi9HwJdJcqVpwISplHi
         QOPQRGhZfRE1W3sCo3PEWlokRxzT9CPWV8CpINJMO8MLwS1YcPz78uY1KexdzCGbfv/Y
         Y2EGiJ0L1R5atGnpYc3i+uCC4TvON95ZOR+4mL5uTeSmTA8LFpSsxIIF+PnwBr/RgOkj
         Ntl9LmaDmtwtf/t78cFsbmR6gEWopNrX3m1pgNGOpaE0vIbcPczghLuUkZz7QyCQNd9q
         2fmzq9o7m2M2aZk/qFg8ZLQvnbgIVufJdfqDg0oQ4uaMJFzPyTXLAH5XNd16/AuOVekR
         6ZwA==
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=1RCNR6uPHFmGt/WS1kI0FdWBgMEXl61Jok6M1XEZWGk=;
        b=E+wMyQooDw9icibOtYglf3R7695rO4vgspL/f+iFA6oP+h96E9eCOxao9+pBe58hfw
         9aeLtcUlIZOyTB8zqClZG31vnFlRgRnthyu//G9ra9ppDFPDMpZZpEgxlaMhCCSG9Yet
         B7UUFZCudJOkf95j3HTjLktJtAVZGFnGgA73zuqCBWQ66/84gzwjHoRevy3w8IhWvU1V
         JpsXU8qYTr9lAIGpT2SItTkiUPwwWkkQylVkzR7RdIEUDw2gJ3OxR2ppDD2ltoi1trF4
         epM+Pb+fnPOxAWQ2gMODz7vOIh+p8gfwm3YdFfQUfT8OLt+Z4GXZHEG5lHjrLbiW63AH
         EmKA==
X-Gm-Message-State: AKS2vOw/1gaNy7YsmBi281V+RCXe25wbQsoYFq2stVwHAVqTGL8bJGeM
	cJt3++rkLHxZI7zl
X-Received: by 10.176.92.28 with SMTP id q28mr7284268uaf.12.1498850895066;
        Fri, 30 Jun 2017 12:28:15 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.36.94.142 with SMTP id h136ls3229901itb.0.gmail; Fri, 30 Jun
 2017 12:28:13 -0700 (PDT)
X-Received: by 10.36.46.202 with SMTP id i193mr653094ita.8.1498850893349;
        Fri, 30 Jun 2017 12:28:13 -0700 (PDT)
In-Reply-To: <c44c5d09-9124-488f-aa92-f9ab59797268@isocpp.org>
X-Original-Sender: Barry.Revzin@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:33046
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33046>

------=_Part_593_15458201.1498850892787
Content-Type: multipart/alternative; 
	boundary="----=_Part_594_530934191.1498850892787"

------=_Part_594_530934191.1498850892787
Content-Type: text/plain; charset="UTF-8"


>
>
> This is optional<reference_wrapper<T>>.
> As for why optional<T&> is a terrible, horrible, no-good, very bad idea, 
> please see Matt Calabrese's talk 
> <https://www.youtube.com/watch?v=hKIYbf1fsLw> from C++Now.
>
>
That's not at all the impression I got from that talk. One of the things he 
specifically mentions as a good idea is to support references for 
optional/variant, but internally wrap the references so that they behave as 
regular types (that is, like pointers. so operator= would rebind 
references, not assign through 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/2991b2b2-2f62-42e2-83d1-f42dae9c32c1%40isocpp.org.

------=_Part_594_530934191.1498850892787
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><br></div><div>This is optional&lt;reference_wrapper&lt;T&gt;&gt;<=
wbr>.</div><div>As for why optional&lt;T&amp;&gt; is a terrible, horrible, =
no-good, very bad idea, please see <a href=3D"https://www.youtube.com/watch=
?v=3DhKIYbf1fsLw" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.hr=
ef=3D&#39;https://www.youtube.com/watch?v\x3dhKIYbf1fsLw&#39;;return true;"=
 onclick=3D"this.href=3D&#39;https://www.youtube.com/watch?v\x3dhKIYbf1fsLw=
&#39;;return true;">Matt Calabrese&#39;s talk</a> from C++Now.</div><div><b=
r></div></div></blockquote><div><br></div><div>That&#39;s not at all the im=
pression I got from that talk. One of the things he specifically mentions a=
s a good idea is to support references for optional/variant, but internally=
 wrap the references so that they behave as regular types (that is, like po=
inters. so operator=3D would rebind references, not assign through them).</=
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/2991b2b2-2f62-42e2-83d1-f42dae9c32c1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2991b2b2-2f62-42e2-83d1-f42dae9c32c1=
%40isocpp.org</a>.<br />

------=_Part_594_530934191.1498850892787--

------=_Part_593_15458201.1498850892787--

.
