220 2905 <511FFA5B.7050204@wanadoo.fr> article
Path: news.gmane.org!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: std::optional -- request for feedback on the wording
Date: Sat, 16 Feb 2013 22:30:03 +0100
Lines: 221
Approved: news@gmane.org
Message-ID: <511FFA5B.7050204@wanadoo.fr>
References: <c689b87e-bb6f-42a4-83d7-50d1e395d13d@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------010209000306010006010405"
X-Trace: ger.gmane.org 1361050205 12340 80.91.229.3 (16 Feb 2013 21:30:05 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 16 Feb 2013 21:30:05 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDH67CONY4PBBXXU76EAKGQEZ4GQ3HY@isocpp.org Sat Feb 16 22:30:27 2013
Return-path: <std-proposals+bncBDH67CONY4PBBXXU76EAKGQEZ4GQ3HY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wi0-f197.google.com ([209.85.212.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDH67CONY4PBBXXU76EAKGQEZ4GQ3HY@isocpp.org>)
	id 1U6pL0-0001Xk-5S
	for gclcip-std-proposals@m.gmane.org; Sat, 16 Feb 2013 22:30:26 +0100
Original-Received: by mail-wi0-f197.google.com with SMTP id hn17sf2733351wib.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 16 Feb 2013 13:30:06 -0800 (PST)
X-Received: by 10.180.75.8 with SMTP id y8mr1898364wiv.1.1361050206186;
        Sat, 16 Feb 2013 13:30:06 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.181.13.74 with SMTP id ew10ls274552wid.52.gmail; Sat, 16 Feb
 2013 13:30:05 -0800 (PST)
X-Received: by 10.14.3.133 with SMTP id 5mr24448154eeh.43.1361050205477;
        Sat, 16 Feb 2013 13:30:05 -0800 (PST)
X-Received: by 10.14.3.133 with SMTP id 5mr24448141eeh.43.1361050205432;
        Sat, 16 Feb 2013 13:30:05 -0800 (PST)
Original-Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr. [80.12.242.131])
        by mx.google.com with ESMTP id r44si23777547eeo.41.2013.02.16.13.30.05;
        Sat, 16 Feb 2013 13:30:05 -0800 (PST)
Received-SPF: neutral (google.com: 80.12.242.131 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.131;
Original-Received: from iMac-de-Vicente-Botet-Escriba.local ([2.11.125.164])
	by mwinf5d69 with ME
	id 19W41l0093YwBk2039W4S9; Sat, 16 Feb 2013 22:30:05 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
In-Reply-To: <c689b87e-bb6f-42a4-83d7-50d1e395d13d@isocpp.org>
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.131 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mail=vicente.botet@wanadoo.fr
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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:2905
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/2905>

This is a multi-part message in MIME format.
--------------010209000306010006010405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 15/02/13 14:46, Andrzej Krzemien'ski a =E9crit :
> Hi everyone,
> We have updated the proposal based on recent feedback. I enclose the=20
> latest draft. It is also available at:
> http://kojot.sggw.waw.pl/~akrzemi1/optional/tr2.optional.proposal.html=20
> <http://kojot.sggw.waw.pl/%7Eakrzemi1/optional/tr2.optional.proposal.html=
>
>
> We would appreciate your feedback, especially on the standardese.
>
>
Hi,

Next follows some remarks

* As optional references are part of the auxiliary proposal, shouldn't=20
the following be removed from 20.5.1?

An /optional object for lvalue reference types/ is an object capable of=20
storing the address of another object. The address stored by the=20
optional object can be changed or set to a value that does not represent=20
a valid address.

|* optional<T>::optional(const optional<T>& rhs);|

What about adding a post-condition on the copied value
|false =3D=3D bool(rhs)| || rhs.value() =3D=3D this->value()

What about adding noexecpt
|optional<T>::optional(const optional<T>& rhs) noecept(see below);
|
||Remarks:||The expression inside |noexcept| is equivalent to:|

    is_nothrow_copy_constructible<T>::value

|

|* optional<T>::optional(const T& v);
|

|I'm curious to know How the remark can be implemented in C++11
|

||Remarks:||If |T|'s selected constructor is a |constexpr| constructor,=20
this constructor shall be a |constexpr| constructor.

What about adding a post-condition on the copied value
v =3D=3D this->value()

What about noexcept(is_nothrow_copy_constructible<T>::value||) as before?

|
* There is an assignment from U, but not a constructor from U. Is this=20
missing?

|||
|* template <class T> constexpr bool operator=3D=3D(const optional<T>& x,=
=20
const optional<T>& y);


I don't understand the remark |

    Instantiations of this function template for which |*x =3D=3D *y| is a
    core constant expression, shall be |constexpr| functions.

|Is the function a constexpr or not?

Best,
Vicente


|

--=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/?hl=3Den.



--------------010209000306010006010405
Content-Type: text/html; charset=ISO-8859-1

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Le 15/02/13 14:46, Andrzej Krzemie&#324;ski
      a &eacute;crit&nbsp;:<br>
    </div>
    <blockquote
      cite="mid:c689b87e-bb6f-42a4-83d7-50d1e395d13d@isocpp.org"
      type="cite">Hi everyone,<br>
      We have updated the proposal based on recent feedback. I enclose
      the latest draft. It is also available at:<br>
      <a moz-do-not-send="true"
href="http://kojot.sggw.waw.pl/%7Eakrzemi1/optional/tr2.optional.proposal.html">http://kojot.sggw.waw.pl/~akrzemi1/optional/tr2.optional.proposal.html</a><br>
      <br>
      <p>We would appreciate your feedback, especially on the
        standardese.</p>
      <br>
    </blockquote>
    Hi,<br>
    <br>
    Next follows some remarks <br>
    <br>
    * As optional references are part of the auxiliary proposal,
    shouldn't the following be removed from 20.5.1?<br>
    <br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    An <em>optional object for lvalue reference types</em> is an object
    capable of storing the address of another object. The address stored
    by the optional object can be changed or set to a value that does
    not represent a valid address. <br>
    <br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <p class="function"> <code>* optional&lt;T&gt;::optional(const
        optional&lt;T&gt;&amp; <var>rhs</var>);</code><br>
    </p>
    <p class="function">What about adding a post-condition on the copied
      value<br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <code><var>false</var> == bool(rhs)</code> || rhs.value() ==
      this-&gt;value()<br>
    </p>
    What about adding noexecpt<br>
    <code>optional&lt;T&gt;::optional(const optional&lt;T&gt;&amp; <var>rhs</var>)
      noecept(see below);<br>
    </code><br>
    <code>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
    </code>Remarks:<code> </code>The expression inside <code>noexcept</code>
    is equivalent to:<code>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <dd>
        <pre>is_nothrow_copy_constructible&lt;T&gt;::value</pre>
      </dd>
    </code>
    <p>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
    </p>
    <p class="function"> <code>* optional&lt;T&gt;::optional(const
        T&amp; <var>v</var>);<br>
      </code></p>
    <p class="function"><code>I'm curious to know How the remark can be
        implemented in C++11<br>
      </code>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
    </p>
    <p class="function"><dt><code></code>Remarks:<code> </code>If <code>T</code>'s
        selected constructor is a <code>constexpr</code> constructor,
        this constructor shall be a <code>constexpr</code> constructor.</dt>
    </p>
    <p>What about adding a post-condition on the copied value<br>
      v == this-&gt;value()</p>
    <p>
      What about noexcept(is_nothrow_copy_constructible&lt;T&gt;::value<code></code>)
      as before?<br>
    </p>
    <code><br>
      * There is an assignment from U, but not a constructor from U. Is
      this missing?<br>
      <br>
    </code><code></code><br>
    <code>* template &lt;class T&gt; constexpr bool operator==(const
      optional&lt;T&gt;&amp; x, const optional&lt;T&gt;&amp; y);<br>
      <br>
      <br>
      I don't understand the remark </code>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <dd>
      <p>Instantiations of this function template for which <code>*x ==
          *y</code> is a core constant expression, shall be <code>constexpr</code>
        functions.</p>
    </dd>
    <code>Is the function a constexpr or not?<br>
      <br>
      Best,<br>
      Vicente<br>
      <br>
      <br>
    </code>
  </body>
</html>

<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 email 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="http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en">http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en</a>.<br />
&nbsp;<br />
&nbsp;<br />

--------------010209000306010006010405--

.
