220 7037 <CAFk2RUaR7NdhofpKgE0+fQP=SriiTg=AcefvKzFgO9x3J+D_UA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: More converting constructors for Optional
Date: Sat, 5 Oct 2013 21:57:50 +0300
Lines: 93
Approved: news@gmane.org
Message-ID: <CAFk2RUaR7NdhofpKgE0+fQP=SriiTg=AcefvKzFgO9x3J+D_UA@mail.gmail.com>
References: <417ebcd9-ff0b-49d8-b055-bd098e97dddc@isocpp.org>
	<CAGsORuDeQpG4MOW8t9TeAxNSN=zcrP3nAf5bNxX-d-2xfFY6cQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a11c227e8e0f9c204e802fed7
X-Trace: ger.gmane.org 1380999468 9122 80.91.229.3 (5 Oct 2013 18:57:48 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 5 Oct 2013 18:57:48 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBLWCYGJAKGQE3XUZLHQ@isocpp.org Sat Oct 05 20:57:52 2013
Return-path: <std-proposals+bncBC5JHI7A7ALRBLWCYGJAKGQE3XUZLHQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ea0-f199.google.com ([209.85.215.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBLWCYGJAKGQE3XUZLHQ@isocpp.org>)
	id 1VSX31-0007sw-Ql
	for gclcip-std-proposals@m.gmane.org; Sat, 05 Oct 2013 20:57:51 +0200
Original-Received: by mail-ea0-f199.google.com with SMTP id r16sf6676077ead.10
        for <gclcip-std-proposals@m.gmane.org>; Sat, 05 Oct 2013 11:57:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=fWY09uUTnIlZNlEdU52QjzSE3s2YspZHtjaWwo+UdPQ=;
        b=d8vkIrcz1WeME4+r9pPqdgNhsSklBSodm/6nqfKkQmgv5j4ImIODULihMwxLaYMkIT
         e6gLXFDCwLVz6lozpwpxE8YQisWpPrU9cPTbpIzM9qxLCK32Uu54LcyEhHLx4617x3JL
         RKR9m8ZS8nUiuyonAoF7a/Hoo6U8b3HbMQTAYudlfLBYvD0qcnWyIrV1pVl67zrz3i9n
         HQdD+PSbKD7US1ZwkQxpwzblLA9q6yicH3xJP7IOK/Q0gswYzAGlolj/4NuCBGuzwFJg
         mWsIL7s+ujkZKNrBEMaW+62KW6b7wTY7I4v3gAjnmuuLjkfUKcPuT6+cJ6+mrALdfvzj
         ZMBA==
X-Received: by 10.180.149.135 with SMTP id ua7mr5841722wib.0.1380999471241;
        Sat, 05 Oct 2013 11:57:51 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.14.227 with SMTP id s3ls574923wic.50.canary; Sat, 05 Oct
 2013 11:57:50 -0700 (PDT)
X-Received: by 10.194.93.105 with SMTP id ct9mr17713731wjb.6.1380999470668;
        Sat, 05 Oct 2013 11:57:50 -0700 (PDT)
Original-Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [2a00:1450:400c:c03::22b])
        by mx.google.com with ESMTPS id gd10si4919979wic.44.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 05 Oct 2013 11:57:50 -0700 (PDT)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2a00:1450:400c:c03::22b as permitted sender) client-ip=2a00:1450:400c:c03::22b;
Original-Received: by mail-we0-f171.google.com with SMTP id p61so6282077wes.30
        for <std-proposals@isocpp.org>; Sat, 05 Oct 2013 11:57:50 -0700 (PDT)
X-Received: by 10.180.13.174 with SMTP id i14mr12454831wic.49.1380999470576;
 Sat, 05 Oct 2013 11:57:50 -0700 (PDT)
Original-Received: by 10.194.42.70 with HTTP; Sat, 5 Oct 2013 11:57:50 -0700 (PDT)
In-Reply-To: <CAGsORuDeQpG4MOW8t9TeAxNSN=zcrP3nAf5bNxX-d-2xfFY6cQ@mail.gmail.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2a00:1450:400c:c03::22b as
 permitted sender) smtp.mail=ville.voutilainen@gmail.com;       dkim=pass
 header.i=@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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7037
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7037>

--001a11c227e8e0f9c204e802fed7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 5 October 2013 21:55, Zhihao Yuan <zy@miator.net> wrote:

> On Sat, Oct 5, 2013 at 1:14 PM, Andrzej Krzemie=C5=84ski <akrzemi1@gmail.=
com>
> wrote:
> > Hi Everyone,
> > It was suggested by LEWG that the following converting constructor
> should be
> > added to optional:
> >
> >   optional<string> os =3D "str";
> >   optional<unique_ptr<Base>> op =3D unique_ptr<Derived>{};
> >
> > and probably also this should work:
> >
> >   optional<unique_ptr<Base>> op =3D optional<unique_ptr<Derived>>{};
>
> I don't expect these to work.  Within the optional
> domain, we know T -> optional<T> is safe; but
> outside this domain, it does not seem to be a good
> idea to judge which kind of conversion is safe with
> optional instead of just take the decision of C++.
>
>
>
Well, the LEWG guidance to explore these conversions was clear.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a11c227e8e0f9c204e802fed7
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On 5 October 2013 21:55, Zhihao Yuan <span dir=3D"ltr">&lt;<a href=
=3D"mailto:zy@miator.net" target=3D"_blank">zy@miator.net</a>&gt;</span> wr=
ote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex">
<div class=3D"im">On Sat, Oct 5, 2013 at 1:14 PM, Andrzej Krzemie=F1ski &lt=
;<a href=3D"mailto:akrzemi1@gmail.com">akrzemi1@gmail.com</a>&gt; wrote:<br=
>
&gt; Hi Everyone,<br>
&gt; It was suggested by LEWG that the following converting constructor sho=
uld be<br>
&gt; added to optional:<br>
&gt;<br>
&gt; =A0 optional&lt;string&gt; os =3D &quot;str&quot;;<br>
&gt; =A0 optional&lt;unique_ptr&lt;Base&gt;&gt; op =3D unique_ptr&lt;Derive=
d&gt;{};<br>
&gt;<br>
&gt; and probably also this should work:<br>
&gt;<br>
&gt; =A0 optional&lt;unique_ptr&lt;Base&gt;&gt; op =3D optional&lt;unique_p=
tr&lt;Derived&gt;&gt;{};<br>
<br>
</div>I don&#39;t expect these to work. =A0Within the optional<br>
domain, we know T -&gt; optional&lt;T&gt; is safe; but<br>
outside this domain, it does not seem to be a good<br>
idea to judge which kind of conversion is safe with<br>
optional instead of just take the decision of C++.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br><br></font></span></bloc=
kquote><div><br></div><div>Well, the LEWG guidance to explore these convers=
ions was clear. <br></div></div><br></div></div>

<p></p>

-- <br />
&nbsp;<br />
--- <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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a11c227e8e0f9c204e802fed7--

.
