220 27282 <CAOHCbitD0Hc9yt9q-x3vhiULYpZi02aVs0QqvAMdgxDjUHqQ5Q@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Tony V E <tvaneerd@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: What should the semantic of wrapper classes be?
Date: Tue, 26 Jul 2016 18:34:36 -0400
Lines: 99
Approved: news@gmane.org
Message-ID: <CAOHCbitD0Hc9yt9q-x3vhiULYpZi02aVs0QqvAMdgxDjUHqQ5Q@mail.gmail.com>
References: <5b59502b-2a34-46dd-990e-1a748301018d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a114b703a754f5e05389181a0
X-Trace: ger.gmane.org 1469572480 5761 80.91.229.3 (26 Jul 2016 22:34:40 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 26 Jul 2016 22:34:40 +0000 (UTC)
To: Standard Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUZ5QWKNQIP3SW7XQCRUBBEDE5NS@isocpp.org Wed Jul 27 00:34:40 2016
Return-path: <std-proposals+bncBCUZ5QWKNQIP3SW7XQCRUBBEDE5NS@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f69.google.com ([209.85.215.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCUZ5QWKNQIP3SW7XQCRUBBEDE5NS@isocpp.org>)
	id 1bSAvv-0008CW-4N
	for gclcip-std-proposals@m.gmane.org; Wed, 27 Jul 2016 00:34:39 +0200
Original-Received: by mail-lf0-f69.google.com with SMTP id p85sf2452683lfg.3
        for <gclcip-std-proposals@m.gmane.org>; Tue, 26 Jul 2016 15:34:38 -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=DeinmjYF6GanuR8DPDb5CbqEyIlDUFwWOf03cGEIh10=;
        b=EowbE7Vm+j8fK/d5JNfGc7EgbQ/2DL9Mtn7R/7tosvp6Y72J6dGKSQrJN4DuaInb8W
         lj38BZX9K353FS9O1hHC2GqvhjH1S8BX3BYxc86y+xOdizHaAPgoPSY8B6M0la76+uaB
         UUNYC+W/clSRRz60rg0Bc4BmGNkFWNcPg/yTTY0pvCfZSbxzo0sMRZOX4C3B9e/O4W/m
         F0DvFQt1Jv5cyfRdGpxKVABspAzG42OquDivTO+5Pm5zf3NzZs1PTp4QLbBlzBKScsY3
         oAbXcpwOdhc9FJs7pe9nWNRoEkjRSy4ICQY/hHWXkmFn7QOREksvFPVRoPKJ7cureWCl
         S6WQ==
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=DeinmjYF6GanuR8DPDb5CbqEyIlDUFwWOf03cGEIh10=;
        b=F4xmZ4Cq3olPOYueP3EePIfpiodi0n9btwa7pkUJQ9dEQAQTN4Bi4ImRaTLjDVXLaw
         2LU8SkudloOOzmpUqpGdwet6qNg7YtyKsaliGECYmj9M5nUjkp38hNFagW8XnpxAgjt2
         MjHYmUA6HU40ikXtZe6HmwYjSDTWXVSJjgj8NBKVj03TZrOY3SnNGlrurZOJiYUbjTso
         VTm1V7Uls0Bj/nEP41bgwD2VlK4aPcR5XO8MbWEaYBzg9Tvv+9m70dulsChdUXeXwm8m
         Ljrap3LzjANEJdASCaZJsrFvP725B6T+NCc3uEjfiF9pXZgPg8fL55smvC3nTLTPqy/A
         Um7g==
X-Gm-Message-State: AEkoouu8ZmN3cSrATACEz2r2AkEPsSKbGyzZyiuD57eNwyFztYx+51R8YRYNKiNwmsLOIA==
X-Received: by 10.28.31.15 with SMTP id f15mr3777802wmf.5.1469572478412;
        Tue, 26 Jul 2016 15:34:38 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.35.77 with SMTP id j74ls961296wmj.14.canary; Tue, 26 Jul
 2016 15:34:37 -0700 (PDT)
X-Received: by 10.28.154.21 with SMTP id c21mr29478539wme.63.1469572477406;
        Tue, 26 Jul 2016 15:34:37 -0700 (PDT)
Original-Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com. [2a00:1450:400c:c09::22c])
        by mx.google.com with ESMTPS id d62si31300479wmd.27.2016.07.26.15.34.37
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 26 Jul 2016 15:34:37 -0700 (PDT)
Received-SPF: pass (google.com: domain of tvaneerd@gmail.com designates 2a00:1450:400c:c09::22c as permitted sender) client-ip=2a00:1450:400c:c09::22c;
Original-Received: by mail-wm0-x22c.google.com with SMTP id o80so36497006wme.1
        for <std-proposals@isocpp.org>; Tue, 26 Jul 2016 15:34:37 -0700 (PDT)
X-Received: by 10.28.61.11 with SMTP id k11mr28981044wma.34.1469572476913;
 Tue, 26 Jul 2016 15:34:36 -0700 (PDT)
Original-Received: by 10.28.131.143 with HTTP; Tue, 26 Jul 2016 15:34:36 -0700 (PDT)
In-Reply-To: <5b59502b-2a34-46dd-990e-1a748301018d@isocpp.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::22c 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-Spam-Checked-In-Group: 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:27282
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27282>

--001a114b703a754f5e05389181a0
Content-Type: text/plain; charset=UTF-8

On Tue, Jul 26, 2016 at 2:05 AM, Vincent Reverdy <vince.rev@gmail.com>
wrote:

> Hello.
>
> Please find the document attached.
> It's not really a proposal... but we need help on this question and people
> really don't seem to agree.
> So... any help, advice, opinion is welcome.
>


I would say value<const T> makes no sense.

A value is a value.  All values are const.  17 is const.  It is always 17.
What may be NOT const is a variable holding the value 17.

So value<const T> should not exist.  It should be collapsed to value<T>.
const value<T> is fine.

pointer<const T> makes sense, because it is referring to a value living
somewhere else.
But for value<T> I assume the T lives within value<T>.

Alternatively, value<const T> should work the same as const value<T>.

What does auto do?

const int x = 17;
auto y = x; // y is not const?

What does optional<const T> do?

Based on the "essence" of optional, if it worked at all, it should allow
you to assign to it once (first assign is construction) and then fail
further assignments.
But I'm pretty sure we didn't make it throw an exception in that case.

-- 
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/CAOHCbitD0Hc9yt9q-x3vhiULYpZi02aVs0QqvAMdgxDjUHqQ5Q%40mail.gmail.com.

--001a114b703a754f5e05389181a0
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, Jul 26, 2016 at 2:05 AM, Vincent Reverdy <span dir=3D"ltr">&lt;=
<a href=3D"mailto:vince.rev@gmail.com" target=3D"_blank">vince.rev@gmail.co=
m</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">=
Hello.<br><br>Please find the document attached.<br>It&#39;s not really a p=
roposal... but we need help on this question and people really don&#39;t se=
em to agree.<br>So... any help, advice, opinion is welcome.<br></div></bloc=
kquote></div><br><br></div><div class=3D"gmail_extra">I would say value&lt;=
const T&gt; makes no sense.<br><br></div><div class=3D"gmail_extra">A value=
 is a value.=C2=A0 All values are const.=C2=A0 17 is const.=C2=A0 It is alw=
ays 17.<br></div><div class=3D"gmail_extra">What may be NOT const is a vari=
able holding the value 17.<br><br></div><div class=3D"gmail_extra">So value=
&lt;const T&gt; should not exist.=C2=A0 It should be collapsed to value&lt;=
T&gt;.=C2=A0 const value&lt;T&gt; is fine.<br><br></div><div class=3D"gmail=
_extra">pointer&lt;const T&gt; makes sense, because it is referring to a va=
lue living somewhere else.<br></div><div class=3D"gmail_extra">But for valu=
e&lt;T&gt; I assume the T lives within value&lt;T&gt;.<br><br></div><div cl=
ass=3D"gmail_extra">Alternatively, value&lt;const T&gt; should work the sam=
e as const value&lt;T&gt;.<br><br></div><div class=3D"gmail_extra">What doe=
s auto do?<br><br></div><div class=3D"gmail_extra">const int x =3D 17;<br><=
/div><div class=3D"gmail_extra">auto y =3D x; // y is not const?<br></div><=
div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">What does op=
tional&lt;const T&gt; do?<br><br></div><div class=3D"gmail_extra">Based on =
the &quot;essence&quot; of optional, if it worked at all, it should allow y=
ou to assign to it once (first assign is construction) and then fail furthe=
r assignments.<br></div><div class=3D"gmail_extra">But I&#39;m pretty sure =
we didn&#39;t make it throw an exception in that case.<br><br><br></div><di=
v class=3D"gmail_extra"><br></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/CAOHCbitD0Hc9yt9q-x3vhiULYpZi02aVs0Qq=
vAMdgxDjUHqQ5Q%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOHCbitD0Hc9yt9q=
-x3vhiULYpZi02aVs0QqvAMdgxDjUHqQ5Q%40mail.gmail.com</a>.<br />

--001a114b703a754f5e05389181a0--

.
