Topic: RFC: Adding Coherency Between any and optional<T>


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 24 Jan 2015 10:44:56 +0100
Raw View
This is a multi-part message in MIME format.
--------------010900010507030203050507
Content-Type: text/plain; charset=UTF-8; format=flowed


Hi,

I have written a draft proposal for an some coherency issues between any
and optional [1].

Any comments or contributions are welcome.

Vicente

[1]
https://github.com/viboes/std-make/blob/master/doc/proposal/any_optional/fundamental_ts_improvements.md

P.S.Is the .md a valid format for a proposal? are there some .md to
html/pdf converters?

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--------------010900010507030203050507
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <br>
    <font size=3D"+1">Hi,<br>
      <br>
      I have written a draft proposal for an some coherency issues
      between any and optional </font><font size=3D"+1">[1].<br>
      <br>
      Any comments or contributions are welcome.<br>
      <br>
    </font><font size=3D"+1">Vicente</font><br>
    <br>
    <font size=3D"+1">[1]
<a class=3D"moz-txt-link-freetext" href=3D"https://github.com/viboes/std-ma=
ke/blob/master/doc/proposal/any_optional/fundamental_ts_improvements.md">ht=
tps://github.com/viboes/std-make/blob/master/doc/proposal/any_optional/fund=
amental_ts_improvements.md</a></font><br>
    <br>
    P.S.<font size=3D"+1"> Is the .md a valid format for a proposal? are
      there some .md to html/pdf converters?</font>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------010900010507030203050507--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sat, 24 Jan 2015 12:16:33 +0200
Raw View
On 24 January 2015 at 11:44, Vicente J. Botet Escriba
<vicente.botet@wanadoo.fr> wrote:
> P.S. Is the .md a valid format for a proposal? are there some .md to
> html/pdf converters?


Yes, accepted formats are html, pdf and plain text, and .md counts as
plain text.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 24 Jan 2015 11:52:05 +0100
Raw View
This is a multi-part message in MIME format.
--------------080902090203000701000204
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 24/01/15 11:16, Ville Voutilainen a =C3=A9crit :
> On 24 January 2015 at 11:44, Vicente J. Botet Escriba
> <vicente.botet@wanadoo.fr> wrote:
>> P.S. Is the .md a valid format for a proposal? are there some .md to
>> html/pdf converters?
>
> Yes, accepted formats are html, pdf and plain text, and .md counts as
> plain text.
>
Ok, thanks.
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/.

--------------080902090203000701000204
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 24/01/15 11:16, Ville Voutilainen a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
cite=3D"mid:CAFk2RUaTPxkNjzPpRg-FW1od6WZfMKzDYC7PWRk_dZKHhdZLjA@mail.gmail.=
com"
      type=3D"cite">
      <pre wrap=3D"">On 24 January 2015 at 11:44, Vicente J. Botet Escriba
<a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:vicente.botet@wanadoo.fr"=
>&lt;vicente.botet@wanadoo.fr&gt;</a> wrote:
</pre>
      <blockquote type=3D"cite">
        <pre wrap=3D"">P.S. Is the .md a valid format for a proposal? are t=
here some .md to
html/pdf converters?
</pre>
      </blockquote>
      <pre wrap=3D"">

Yes, accepted formats are html, pdf and plain text, and .md counts as
plain text.

</pre>
    </blockquote>
    <font size=3D"+1">Ok, thanks.<br>
      Vicente<br>
    </font>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------080902090203000701000204--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sat, 24 Jan 2015 11:57:34 +0100
Raw View
This is a multi-part message in MIME format.
--------------090402060808070702050005
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 24/01/15 11:16, Ville Voutilainen a =C3=A9crit :
> On 24 January 2015 at 11:44, Vicente J. Botet Escriba
> <vicente.botet@wanadoo.fr> wrote:
>> P.S. Is the .md a valid format for a proposal? are there some .md to
>> html/pdf converters?
>
> Yes, accepted formats are html, pdf and plain text, and .md counts as
> plain text.
>
I have found some answers to the last question here

http://stackoverflow.com/questions/7694887/is-there-a-command-line-utility-=
for-rendering-github-flavored-markdown

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/.

--------------090402060808070702050005
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 24/01/15 11:16, Ville Voutilainen a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
cite=3D"mid:CAFk2RUaTPxkNjzPpRg-FW1od6WZfMKzDYC7PWRk_dZKHhdZLjA@mail.gmail.=
com"
      type=3D"cite">
      <pre wrap=3D"">On 24 January 2015 at 11:44, Vicente J. Botet Escriba
<a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:vicente.botet@wanadoo.fr"=
>&lt;vicente.botet@wanadoo.fr&gt;</a> wrote:
</pre>
      <blockquote type=3D"cite">
        <pre wrap=3D"">P.S. Is the .md a valid format for a proposal? are t=
here some .md to
html/pdf converters?
</pre>
      </blockquote>
      <pre wrap=3D"">

Yes, accepted formats are html, pdf and plain text, and .md counts as
plain text.

</pre>
    </blockquote>
    <font size=3D"+1">I have found some answers to the last question here<b=
r>
      <br>
<a class=3D"moz-txt-link-freetext" href=3D"http://stackoverflow.com/questio=
ns/7694887/is-there-a-command-line-utility-for-rendering-github-flavored-ma=
rkdown">http://stackoverflow.com/questions/7694887/is-there-a-command-line-=
utility-for-rendering-github-flavored-markdown</a><br>
      <br>
      Vicente<br>
    </font>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------090402060808070702050005--

.


Author: Miro Knejp <miro.knejp@gmail.com>
Date: Sat, 24 Jan 2015 20:15:36 +0100
Raw View
This is a multi-part message in MIME format.
--------------090705070800010301020107
Content-Type: text/plain; charset=UTF-8; format=flowed

Here are some observations:

  * Do we need the distinction between nullopt_t and none_t? Can't we
    use none_t/none as a universal tag type to specify "nothing" in the
    standard library and replace nullopt_t with none_t in the draft?
  * You introduce the type<T> tag to specify the type to be forward
    constructed in any::any(type<T>, in_place_t, ...) but chose to use
    any::emplace<T>() instead. Wouldn't it be more consistent to go with
    any::emplace(type<T>, ...) as well? I get that you can't specify the
    template argument in the constructor and thus need the tag type
    which is not the case for ordinary member functions. However I can't
    recall the last time I had to specify a template argument in the
    member function of a standard library type...
  * Does any::any(type<T>, in_place_t, ...) require the in_place_t
    argument? When passing in type<T> you already state the intent of
    constructing an instance of type T, which can only be done by
    forwarding all other arguments to its constructor. As far as I can
    see there is no remaining ambiguity.

Miro

Am 24.01.2015 um 10:44 schrieb Vicente J. Botet Escriba:
>
> Hi,
>
> I have written a draft proposal for an some coherency issues between
> any and optional [1].
>
> Any comments or contributions are welcome.
>
> Vicente
>
> [1]
> https://github.com/viboes/std-make/blob/master/doc/proposal/any_optional/fundamental_ts_improvements.md
>
> P.S.Is the .md a valid format for a proposal? are there some .md to
> html/pdf converters? --
>
> ---
> 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
> <mailto:std-proposals+unsubscribe@isocpp.org>.
> To post to this group, send email to std-proposals@isocpp.org
> <mailto:std-proposals@isocpp.org>.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--------------090705070800010301020107
Content-Type: text/html; charset=UTF-8

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Here are some observations:<br>
    <ul>
      <li>Do we need the distinction between nullopt_t and none_t? Can't
        we use none_t/none as a universal tag type to specify "nothing"
        in the standard library and replace nullopt_t with none_t in the
        draft?</li>
      <li>You introduce the type&lt;T&gt; tag to specify the type to be
        forward constructed in any::any(type&lt;T&gt;, in_place_t, ...)
        but chose to use any::emplace&lt;T&gt;() instead. Wouldn't it be
        more consistent to go with any::emplace(type&lt;T&gt;, ...) as
        well? I get that you can't specify the template argument in the
        constructor and thus need the tag type which is not the case for
        ordinary member functions. However I can't recall the last time
        I had to specify a template argument in the member function of a
        standard library type...<br>
      </li>
      <li>Does any::any(type&lt;T&gt;, in_place_t, ...) require the
        in_place_t argument? When passing in type&lt;T&gt; you already
        state the intent of constructing an instance of type T, which
        can only be done by forwarding all other arguments to its
        constructor. As far as I can see there is no remaining ambiguity.<br>
      </li>
    </ul>
    Miro<br>
    <br>
    <div class="moz-cite-prefix">Am 24.01.2015 um 10:44 schrieb Vicente
      J. Botet Escriba:<br>
    </div>
    <blockquote cite="mid:54C36998.3070600@wanadoo.fr" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <br>
      <font size="+1">Hi,<br>
        <br>
        I have written a draft proposal for an some coherency issues
        between any and optional </font><font size="+1">[1].<br>
        <br>
        Any comments or contributions are welcome.<br>
        <br>
      </font><font size="+1">Vicente</font><br>
      <br>
      <font size="+1">[1]
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/viboes/std-make/blob/master/doc/proposal/any_optional/fundamental_ts_improvements.md">https://github.com/viboes/std-make/blob/master/doc/proposal/any_optional/fundamental_ts_improvements.md</a></font><br>
      <br>
      P.S.<font size="+1"> Is the .md a valid format for a proposal? are
        there some .md to html/pdf converters?</font> -- <br>
      <br>
      --- <br>
      You received this message because you are subscribed to the Google
      Groups "ISO C++ Standard - Future Proposals" group.<br>
      To unsubscribe from this group and stop receiving emails from it,
      send an email to <a moz-do-not-send="true"
        href="mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br>
      To post to this group, send email to <a moz-do-not-send="true"
        href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br>
      Visit this group at <a moz-do-not-send="true"
        href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br>
    </blockquote>
    <br>
  </body>
</html>

<p></p>

-- <br />
<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 <a href="mailto:std-proposals+unsubscribe@isocpp.org">std-proposals+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href="mailto:std-proposals@isocpp.org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href="http://groups.google.com/a/isocpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/</a>.<br />

--------------090705070800010301020107--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Sat, 24 Jan 2015 23:09:49 -0500
Raw View
--001a11c26986669e1c050d7231b3
Content-Type: text/plain; charset=UTF-8

On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp <miro.knejp@gmail.com> wrote:

>  Here are some observations:
>
>    - Do we need the distinction between nullopt_t and none_t? Can't we
>    use none_t/none as a universal tag type to specify "nothing" in the
>    standard library and replace nullopt_t with none_t in the draft?
>
>
In the optional<> discussions, we discussed this, and decided to make
nullopt_t specific to optional (and not use nullptr_t or create a
std::none_t, etc) for a few reasons:

- "better safe than sorry" - we didn't want to tackle more than just
optional.  A generic none_t would get used by users in user-defined types
in who knows what ways.

- we wanted optional<X> opx = nullopt to be clear.  If it was optional<X>
opx = none and X took none_t in its constructor, you wouldn't know whether
the programmer meant an empty optional, or a engaged optional holding an
X(none). (ie consider optional<any>).  Currently we still have that exact
problem with optional<optional<T>> but hopefully that happens less often.

A library-wide none_t could be useful, but the more useful it is, the more
likely it is to introduce ambiguities (either does-not-compile ambiguities,
or "I'm not sure if that's what they expected" ambiguities").

I _think_ a none_t with *consistent* usage (ie either none_t is always
assigned to the inner-most type, or none_t is always assigned to the
outer-most type, but pick one rule and never break it) could be useful.
But it would take some thought, and we didn't want to have that stopping
optional from proceeding. (Although we slowed down optional for other
reasons anyhow....)


>
>    - You introduce the type<T> tag to specify the type to be forward
>    constructed in any::any(type<T>, in_place_t, ...) but chose to use
>    any::emplace<T>() instead. Wouldn't it be more consistent to go with
>    any::emplace(type<T>, ...) as well? I get that you can't specify the
>    template argument in the constructor and thus need the tag type which is
>    not the case for ordinary member functions. However I can't recall the last
>    time I had to specify a template argument in the member function of a
>    standard library type...
>
>
could we make both work? (Maybe that would be too complicated/tricky and/or
just not worth it)

>
>    -
>    - Does any::any(type<T>, in_place_t, ...) require the in_place_t
>    argument? When passing in type<T> you already state the intent of
>    constructing an instance of type T, which can only be done by forwarding
>    all other arguments to its constructor. As far as I can see there is no
>    remaining ambiguity.
>
>
I haven't read the proposal yet, but that makes sense to me.


>
>    -
>
> Miro
>


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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c26986669e1c050d7231b3
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 Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:miro.knejp@gmail.com" target=3D"_blank">miro.knejp@gmail.com</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    Here are some observations:<br>
    <ul>
      <li>Do we need the distinction between nullopt_t and none_t? Can&#39;=
t
        we use none_t/none as a universal tag type to specify &quot;nothing=
&quot;
        in the standard library and replace nullopt_t with none_t in the
        draft?</li></ul></div></blockquote><div><br></div><div>In the optio=
nal&lt;&gt; discussions, we discussed this, and decided to make nullopt_t s=
pecific to optional (and not use nullptr_t or create a std::none_t, etc) fo=
r a few reasons:<br><br></div><div>- &quot;better safe than sorry&quot; - w=
e didn&#39;t want to tackle more than just optional.=C2=A0 A generic none_t=
 would get used by users in user-defined types in who knows what ways.<br><=
br></div><div>- we wanted optional&lt;X&gt; opx =3D nullopt to be clear.=C2=
=A0 If it was optional&lt;X&gt; opx =3D none and X took none_t in its const=
ructor, you wouldn&#39;t know whether the programmer meant an empty optiona=
l, or a engaged optional holding an X(none). (ie consider optional&lt;any&g=
t;).=C2=A0 Currently we still have that exact problem with optional&lt;opti=
onal&lt;T&gt;&gt; but hopefully that happens less often.<br><br></div><div>=
A library-wide none_t could be useful, but the more useful it is, the more =
likely it is to introduce ambiguities (either does-not-compile ambiguities,=
 or &quot;I&#39;m not sure if that&#39;s what they expected&quot; ambiguiti=
es&quot;).<br><br></div><div>I _think_ a none_t with *consistent* usage (ie=
 either none_t is always assigned to the inner-most type, or none_t is alwa=
ys assigned to the outer-most type, but pick one rule and never break it) c=
ould be useful.=C2=A0 But it would take some thought, and we didn&#39;t wan=
t to have that stopping optional from proceeding. (Although we slowed down =
optional for other reasons anyhow....)<br></div><div>=C2=A0<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><div bgcolor=3D"#FFFFFF" text=3D"#000000"><ul>
      <li>You introduce the type&lt;T&gt; tag to specify the type to be
        forward constructed in any::any(type&lt;T&gt;, in_place_t, ...)
        but chose to use any::emplace&lt;T&gt;() instead. Wouldn&#39;t it b=
e
        more consistent to go with any::emplace(type&lt;T&gt;, ...) as
        well? I get that you can&#39;t specify the template argument in the
        constructor and thus need the tag type which is not the case for
        ordinary member functions. However I can&#39;t recall the last time
        I had to specify a template argument in the member function of a
        standard library type...<br></li></ul></div></blockquote><div><br><=
/div><div>could we make both work? (Maybe that would be too complicated/tri=
cky and/or just not worth it) <br></div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
 bgcolor=3D"#FFFFFF" text=3D"#000000"><ul><li>
      </li>
      <li>Does any::any(type&lt;T&gt;, in_place_t, ...) require the
        in_place_t argument? When passing in type&lt;T&gt; you already
        state the intent of constructing an instance of type T, which
        can only be done by forwarding all other arguments to its
        constructor. As far as I can see there is no remaining ambiguity.<b=
r></li></ul></div></blockquote><div><br></div><div>I haven&#39;t read the p=
roposal yet, but that makes sense to me.<br>=C2=A0<br></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div bgcolor=3D"#FFFFFF" text=3D"#000000"><ul><li>
      </li>
    </ul>
    Miro<br></div></blockquote><div>=C2=A0</div><div><br></div><div>Tony<br=
></div></div></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c26986669e1c050d7231b3--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Sat, 24 Jan 2015 23:18:40 -0500
Raw View
--001a11c3440e027b35050d725111
Content-Type: text/plain; charset=UTF-8

   - Does any::any(type<T>, in_place_t, ...) require the in_place_t
   argument? When passing in type<T> you already state the intent of
   constructing an instance of type T, which can only be done by forwarding
   all other arguments to its constructor. As far as I can see there is no
   remaining ambiguity.


> I haven't read the proposal yet, but that makes sense to me.
>
>

Alternatively, not sure if it is a good idea, but throwing it out there,
basically rename type<T> to in_place_t<T>.  Something like

    namespace std {
        in_place_t<void> in_place;
    }


    optional<X> opx(in_place, xarg1, xarg2);
    any<X, Y, Z> axyz(in_place_t<X>, xarg1, xarg2);


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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c3440e027b35050d725111
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div bgcolor=3D"#FFFFFF=
" text=3D"#000000"><ul><li>Does any::any(type&lt;T&gt;, in_place_t, ...) re=
quire the
        in_place_t argument? When passing in type&lt;T&gt; you already
        state the intent of constructing an instance of type T, which
        can only be done by forwarding all other arguments to its
        constructor. As far as I can see there is no remaining ambiguity.<b=
r></li></ul></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote"><sp=
an class=3D""><div><br></div></span><div>I haven&#39;t read the proposal ye=
t, but that makes sense to me.<br>=C2=A0<br></div></div></div></div></block=
quote><div><br></div><div>Alternatively, not sure if it is a good idea, but=
 throwing it out there, basically rename type&lt;T&gt; to in_place_t&lt;T&g=
t;.=C2=A0 Something like<br><br></div><div>=C2=A0=C2=A0=C2=A0 namespace std=
 {<br></div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 in_place_t&lt;void&gt; in_plac=
e;<br>=C2=A0=C2=A0=C2=A0 }<br><br><br></div><div>=C2=A0 =C2=A0 optional&lt;=
X&gt; opx(in_place, xarg1, xarg2);<br></div><div>=C2=A0 =C2=A0 any&lt;X, Y,=
 Z&gt; axyz(in_place_t&lt;X&gt;, xarg1, xarg2);<br><br><br></div><div>Tony<=
br></div></div></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c3440e027b35050d725111--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 25 Jan 2015 11:44:10 +0100
Raw View
This is a multi-part message in MIME format.
--------------090105070607040302000001
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 25/01/15 05:18, Tony V E a =C3=A9crit :
>
>
>   * Does any::any(type<T>, in_place_t, ...) require the in_place_t
>     argument? When passing in type<T> you already state the intent of
>     constructing an instance of type T, which can only be done by
>     forwarding all other arguments to its constructor. As far as I can
>     see there is no remaining ambiguity.
>
>
>     I haven't read the proposal yet, but that makes sense to me.
>
>
> Alternatively, not sure if it is a good idea, but throwing it out=20
> there, basically rename type<T> to in_place_t<T>.  Something like
>
>     namespace std {
>         in_place_t<void> in_place;
>     }
>
>
>     optional<X> opx(in_place, xarg1, xarg2);
>     any<X, Y, Z> axyz(in_place_t<X>, xarg1, xarg2);
>
>
>
This is a valid option Andreej proposed to me. This will however need to=20
change the optional class.

An alternative that make the code more homogeneous is to declare=20
in_place as a variable template

template <class ...T> in_place_t {};
constexpr in_place_t<> in_place {}

but this change the optional user code in addition to the optional=20
constructor

     optional<X> opx(in_place<>, xarg1, xarg2); // "Create in place,=20
deduce what".
     any<X, Y, Z> axyz(in_place<X>, xarg1, xarg2);

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/.

--------------090105070607040302000001
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 25/01/15 05:18, Tony V E a =C3=A9crit=
=C2=A0:<br>
    </div>
    <blockquote
cite=3D"mid:CAOHCbivBqmYY7iqCsWfy=3DmEw2piEurm=3DkhEjn6ZNSEejEH+mnw@mail.gm=
ail.com"
      type=3D"cite">
      <div dir=3D"ltr"><br>
        <div class=3D"gmail_extra"><br>
          <div bgcolor=3D"#FFFFFF" text=3D"#000000">
            <ul>
              <li>Does any::any(type&lt;T&gt;, in_place_t, ...) require
                the in_place_t argument? When passing in type&lt;T&gt;
                you already state the intent of constructing an instance
                of type T, which can only be done by forwarding all
                other arguments to its constructor. As far as I can see
                there is no remaining ambiguity.<br>
              </li>
            </ul>
          </div>
          <div class=3D"gmail_quote">
            <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir=3D"ltr">
                <div class=3D"gmail_extra">
                  <div class=3D"gmail_quote"><span class=3D"">
                      <div><br>
                      </div>
                    </span>
                    <div>I haven't read the proposal yet, but that makes
                      sense to me.<br>
                      =C2=A0<br>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Alternatively, not sure if it is a good idea, but
              throwing it out there, basically rename type&lt;T&gt; to
              in_place_t&lt;T&gt;.=C2=A0 Something like<br>
              <br>
            </div>
            <div>=C2=A0=C2=A0=C2=A0 namespace std {<br>
            </div>
            <div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 in_place_t&lt;void&gt; in_plac=
e;<br>
              =C2=A0=C2=A0=C2=A0 }<br>
              <br>
              <br>
            </div>
            <div>=C2=A0 =C2=A0 optional&lt;X&gt; opx(in_place, xarg1, xarg2=
);<br>
            </div>
            <div>=C2=A0 =C2=A0 any&lt;X, Y, Z&gt; axyz(in_place_t&lt;X&gt;,=
 xarg1,
              xarg2);<br>
              <br>
              <br>
            </div>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    This is a valid option Andreej proposed to me. This will however
    need to change the optional class.<br>
    <br>
    An alternative that make the code more homogeneous is to declare
    in_place as a variable template<br>
    <br>
    template &lt;class ...T&gt; in_place_t {};<br>
    constexpr in_place_t&lt;&gt; in_place {}<br>
    <br>
    but this change the optional user code in addition to the optional
    constructor<br>
    <br>
    <div>=C2=A0 =C2=A0 optional&lt;X&gt; opx(in_place&lt;&gt;, xarg1, xarg2=
); //
      "Create in place, deduce what".</div>
    =C2=A0 =C2=A0 any&lt;X, Y, Z&gt; axyz(in_place&lt;X&gt;, xarg1, xarg2);=
<br>
    <br>
    Vicente<br>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------090105070607040302000001--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 25 Jan 2015 11:49:36 +0100
Raw View
This is a multi-part message in MIME format.
--------------010404060901010506080509
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 24/01/15 20:15, Miro Knejp a =C3=A9crit :
> Here are some observations:
>
>   * Do we need the distinction between nullopt_t and none_t? Can't we
>     use none_t/none as a universal tag type to specify "nothing" in
>     the standard library and replace nullopt_t with none_t in the draft?
>
As Tony has explained, using none_t widely would increase the=20
ambiguities opportunities.
>
>   * You introduce the type<T> tag to specify the type to be forward
>     constructed in any::any(type<T>, in_place_t, ...) but chose to use
>     any::emplace<T>() instead. Wouldn't it be more consistent to go
>     with any::emplace(type<T>, ...) as well? I get that you can't
>     specify the template argument in the constructor and thus need the
>     tag type which is not the case for ordinary member functions.
>     However I can't recall the last time I had to specify a template
>     argument in the member function of a standard library type...
>
Well, this can be done, but I don't see the advantage in the case of a=20
function. What others think?
>
>  *
>   * Does any::any(type<T>, in_place_t, ...) require the in_place_t
>     argument? When passing in type<T> you already state the intent of
>     constructing an instance of type T, which can only be done by
>     forwarding all other arguments to its constructor. As far as I can
>     see there is no remaining ambiguity.
>
>
You are right, that in_place_t here is not necessary. However the=20
parameter in_place reinforce the semantic of the constructor. Let see if=20
we could adopt instead in_place<T>.

Thanks,
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/.

--------------010404060901010506080509
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 24/01/15 20:15, Miro Knejp a =C3=A9cr=
it=C2=A0:<br>
    </div>
    <blockquote cite=3D"mid:54C3EF58.8050707@gmail.com" type=3D"cite">
      <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Ty=
pe">
      Here are some observations:<br>
      <ul>
        <li>Do we need the distinction between nullopt_t and none_t?
          Can't we use none_t/none as a universal tag type to specify
          "nothing" in the standard library and replace nullopt_t with
          none_t in the draft?</li>
      </ul>
    </blockquote>
    As Tony has explained, using none_t widely would increase the
    ambiguities opportunities.<br>
    <blockquote cite=3D"mid:54C3EF58.8050707@gmail.com" type=3D"cite">
      <ul>
        <li>You introduce the type&lt;T&gt; tag to specify the type to
          be forward constructed in any::any(type&lt;T&gt;, in_place_t,
          ...) but chose to use any::emplace&lt;T&gt;() instead.
          Wouldn't it be more consistent to go with
          any::emplace(type&lt;T&gt;, ...) as well? I get that you can't
          specify the template argument in the constructor and thus need
          the tag type which is not the case for ordinary member
          functions. However I can't recall the last time I had to
          specify a template argument in the member function of a
          standard library type...<br>
        </li>
      </ul>
    </blockquote>
    Well, this can be done, but I don't see the advantage in the case of
    a function. What others think?<br>
    <blockquote cite=3D"mid:54C3EF58.8050707@gmail.com" type=3D"cite">
      <ul>
        <li> </li>
        <li>Does any::any(type&lt;T&gt;, in_place_t, ...) require the
          in_place_t argument? When passing in type&lt;T&gt; you already
          state the intent of constructing an instance of type T, which
          can only be done by forwarding all other arguments to its
          constructor. As far as I can see there is no remaining
          ambiguity.<br>
        </li>
      </ul>
      <br>
    </blockquote>
    You are right, that in_place_t here is not necessary. However the
    parameter in_place reinforce the semantic of the constructor. Let
    see if we could adopt instead in_place&lt;T&gt;.<br>
    <br>
    Thanks,<br>
    Vicente<br>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------010404060901010506080509--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Mon, 26 Jan 2015 11:42:54 -0500
Raw View
On 2015-01-24 23:09, Tony V E wrote:
> On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp <miro.knejp@gmail.com> wrote:
>>  Here are some observations:
>>
>>    - Do we need the distinction between nullopt_t and none_t? Can't we
>>    use none_t/none as a universal tag type to specify "nothing" in the
>>    standard library and replace nullopt_t with none_t in the draft?
>
> In the optional<> discussions, we discussed this, and decided to make
> nullopt_t specific to optional (and not use nullptr_t or create a
> std::none_t, etc) for a few reasons:
>
> - "better safe than sorry" - we didn't want to tackle more than just
> optional.  A generic none_t would get used by users in user-defined types
> in who knows what ways.

Hmm... now that you mention it, I'd love to have a generic none_t / none
for implementing flags... this would allow defaulting flags as '= none',
which is more logical than '= nullptr', and doesn't run afoul of
forbidden integer conversions as does '= 0'. (That said, since we'd be
requiring presumably C++17 at that point, '= {}' works also, but isn't
as readable as '= none', or passing 'none' vs. '{}' as a required flags
parameter.)

FWIW, I'll note that Python does have a 'None' and gets a lot of mileage
out of it. I can certainly see having a none_t that can mean any of
empty optional, empty variant/any, no flags, etc. (Probably it should
also implicitly convert to nullptr_t?)

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Mon, 26 Jan 2015 13:28:45 -0500
Raw View
--089e0158b86e09991d050d924ff5
Content-Type: text/plain; charset=UTF-8

On Mon, Jan 26, 2015 at 11:42 AM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:

> On 2015-01-24 23:09, Tony V E wrote:
> > On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp <miro.knejp@gmail.com>
> wrote:
> >>  Here are some observations:
> >>
> >>    - Do we need the distinction between nullopt_t and none_t? Can't we
> >>    use none_t/none as a universal tag type to specify "nothing" in the
> >>    standard library and replace nullopt_t with none_t in the draft?
> >
> > In the optional<> discussions, we discussed this, and decided to make
> > nullopt_t specific to optional (and not use nullptr_t or create a
> > std::none_t, etc) for a few reasons:
> >
> > - "better safe than sorry" - we didn't want to tackle more than just
> > optional.  A generic none_t would get used by users in user-defined types
> > in who knows what ways.
>
> Hmm... now that you mention it, I'd love to have a generic none_t / none
> for implementing flags... this would allow defaulting flags as '= none',
> which is more logical than '= nullptr', and doesn't run afoul of
> forbidden integer conversions as does '= 0'. (That said, since we'd be
> requiring presumably C++17 at that point, '= {}' works also, but isn't
> as readable as '= none', or passing 'none' vs. '{}' as a required flags
> parameter.)
>
>
= {} also works for optional.  Maybe it will become the generic 'none'.

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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0158b86e09991d050d924ff5
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 Mon, Jan 26, 2015 at 11:42 AM, Matthew Woehlke <span dir=3D"ltr">&lt=
;<a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank">mw_tri=
ad@users.sourceforge.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><span class=3D"">On 2015-01-24 23:09, Tony V E wrote:<br>
&gt; On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp &lt;<a href=3D"mailto:miro=
..knejp@gmail.com">miro.knejp@gmail.com</a>&gt; wrote:<br>
&gt;&gt;=C2=A0 Here are some observations:<br>
&gt;&gt;<br>
</span>&gt;&gt;=C2=A0 =C2=A0 - Do we need the distinction between nullopt_t=
 and none_t? Can&#39;t we<br>
<span class=3D"">&gt;&gt;=C2=A0 =C2=A0 use none_t/none as a universal tag t=
ype to specify &quot;nothing&quot; in the<br>
&gt;&gt;=C2=A0 =C2=A0 standard library and replace nullopt_t with none_t in=
 the draft?<br>
&gt;<br>
&gt; In the optional&lt;&gt; discussions, we discussed this, and decided to=
 make<br>
&gt; nullopt_t specific to optional (and not use nullptr_t or create a<br>
&gt; std::none_t, etc) for a few reasons:<br>
&gt;<br>
&gt; - &quot;better safe than sorry&quot; - we didn&#39;t want to tackle mo=
re than just<br>
&gt; optional.=C2=A0 A generic none_t would get used by users in user-defin=
ed types<br>
&gt; in who knows what ways.<br>
<br>
</span>Hmm... now that you mention it, I&#39;d love to have a generic none_=
t / none<br>
for implementing flags... this would allow defaulting flags as &#39;=3D non=
e&#39;,<br>
which is more logical than &#39;=3D nullptr&#39;, and doesn&#39;t run afoul=
 of<br>
forbidden integer conversions as does &#39;=3D 0&#39;. (That said, since we=
&#39;d be<br>
requiring presumably C++17 at that point, &#39;=3D {}&#39; works also, but =
isn&#39;t<br>
as readable as &#39;=3D none&#39;, or passing &#39;none&#39; vs. &#39;{}&#3=
9; as a required flags<br>
parameter.)<br>
<br></blockquote><div><br></div><div>=3D {} also works for optional.=C2=A0 =
Maybe it will become the generic &#39;none&#39;.<br></div><div><br></div><d=
iv>Tony<br></div><br></div><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0158b86e09991d050d924ff5--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Mon, 26 Jan 2015 14:02:35 -0500
Raw View
On 2015-01-26 13:28, Tony V E wrote:
> On Mon, Jan 26, 2015 at 11:42 AM, Matthew Woehlke wrote:
>> On 2015-01-24 23:09, Tony V E wrote:
>>> On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp wrote:
>>>>  Here are some observations:
>>>>
>>>>    - Do we need the distinction between nullopt_t and none_t? Can't we
>>>>    use none_t/none as a universal tag type to specify "nothing" in the
>>>>    standard library and replace nullopt_t with none_t in the draft?
>>>
>>> In the optional<> discussions, we discussed this, and decided to make
>>> nullopt_t specific to optional (and not use nullptr_t or create a
>>> std::none_t, etc) for a few reasons:
>>>
>>> - "better safe than sorry" - we didn't want to tackle more than just
>>> optional.  A generic none_t would get used by users in user-defined types
>>> in who knows what ways.
>>
>> Hmm... now that you mention it, I'd love to have a generic none_t / none
>> for implementing flags... this would allow defaulting flags as '= none',
>> which is more logical than '= nullptr', and doesn't run afoul of
>> forbidden integer conversions as does '= 0'. (That said, since we'd be
>> requiring presumably C++17 at that point, '= {}' works also, but isn't
>> as readable as '= none', or passing 'none' vs. '{}' as a required flags
>> parameter.)
>
> = {} also works for optional.  Maybe it will become the generic 'none'.

#define none {} // ;-)

Conversely, and with respect to...

On 2015-01-24 23:09, Tony V E wrote:
> - we wanted optional<X> opx = nullopt to be clear.  If it was optional<X>
> opx = none and X took none_t in its constructor, you wouldn't know whether
> the programmer meant an empty optional, or a engaged optional holding an
> X(none). (ie consider optional<any>).

....does 'opx = {}' mean a disengaged optional, or a default-constructed
T? :-)

(Note: rhetorical question.)

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Mon, 26 Jan 2015 14:16:41 -0600
Raw View
--089e0158b50c6289cb050d93d353
Content-Type: text/plain; charset=UTF-8

On 24 January 2015 at 13:15, Miro Knejp <miro.knejp@gmail.com> wrote:

>  Here are some observations:
>
>    - Do we need the distinction between nullopt_t and none_t? Can't we
>    use none_t/none as a universal tag type to specify "nothing" in the
>    standard library and replace nullopt_t with none_t in the draft?
>
>
Given that just about any time we conflate two separate notions onto one
syntax, people generally dislike it (forwarding references vs. r-value
references, "unifed" initialization syntax, etc.), what is the use case for
conflating nullopt_t and none_t into one type?  I'm not seeing it.  Please
provide motivation.
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0158b50c6289cb050d93d353
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On 24 January 2015 at 13:15, Miro Knejp <span dir=3D"ltr">=
&lt;<a href=3D"mailto:miro.knejp@gmail.com" target=3D"_blank">miro.knejp@gm=
ail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=3D"g=
mail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    Here are some observations:<br>
    <ul>
      <li>Do we need the distinction between nullopt_t and none_t? Can&#39;=
t
        we use none_t/none as a universal tag type to specify &quot;nothing=
&quot;
        in the standard library and replace nullopt_t with none_t in the
        draft?</li></ul></div></blockquote><div><br></div><div>Given that j=
ust about any time we conflate two separate notions onto one syntax, people=
 generally dislike it (forwarding references vs. r-value references, &quot;=
unifed&quot; initialization syntax, etc.), what is the use case for conflat=
ing nullopt_t and none_t into one type?=C2=A0 I&#39;m not seeing it.=C2=A0 =
Please provide motivation.</div></div>-- <br><div class=3D"gmail_signature"=
>=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:nevin=
@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=C2=A0 (=
847) 691-1404</div>
</div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0158b50c6289cb050d93d353--

.


Author: inkwizytoryankes@gmail.com
Date: Mon, 26 Jan 2015 14:06:31 -0800 (PST)
Raw View
------=_Part_4830_809066796.1422309991498
Content-Type: multipart/alternative;
 boundary="----=_Part_4831_119187568.1422309991498"

------=_Part_4831_119187568.1422309991498
Content-Type: text/plain; charset=UTF-8

I think emplace constructor can easy resolve this problem:
optional<optional<optional<T>>> x = { none }; //outer most is empty
optional<optional<optional<T>>> y = { in_place, none }; //outer most have
empty optional
optional<optional<optional<T>>> z = { in_place, in_place, none };
optional<optional<optional<T>>> z = { in_place, in_place, T{10} };
optional<optional<optional<T>>> z = { in_place, in_place, in_place, 10 }; //emplace
constructor of T



On Monday, January 26, 2015 at 5:43:07 PM UTC+1, Matthew Woehlke wrote:
>
> On 2015-01-24 23:09, Tony V E wrote:
> > On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp <miro....@gmail.com
> <javascript:>> wrote:
> >>  Here are some observations:
> >>
> >>    - Do we need the distinction between nullopt_t and none_t? Can't we
> >>    use none_t/none as a universal tag type to specify "nothing" in the
> >>    standard library and replace nullopt_t with none_t in the draft?
> >
> > In the optional<> discussions, we discussed this, and decided to make
> > nullopt_t specific to optional (and not use nullptr_t or create a
> > std::none_t, etc) for a few reasons:
> >
> > - "better safe than sorry" - we didn't want to tackle more than just
> > optional.  A generic none_t would get used by users in user-defined
> types
> > in who knows what ways.
>
> Hmm... now that you mention it, I'd love to have a generic none_t / none
> for implementing flags... this would allow defaulting flags as '= none',
> which is more logical than '= nullptr', and doesn't run afoul of
> forbidden integer conversions as does '= 0'. (That said, since we'd be
> requiring presumably C++17 at that point, '= {}' works also, but isn't
> as readable as '= none', or passing 'none' vs. '{}' as a required flags
> parameter.)
>
> FWIW, I'll note that Python does have a 'None' and gets a lot of mileage
> out of it. I can certainly see having a none_t that can mean any of
> empty optional, empty variant/any, no flags, etc. (Probably it should
> also implicitly convert to nullptr_t?)
>
> --
> Matthew
>
>

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_4831_119187568.1422309991498
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I think emplace constructor can easy resolve this problem:=
<br><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250=
); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px=
; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #000;" class=3D"styled-by-prettify">optional=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify">optional</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">optional</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">&gt;&gt;&gt;</span><span style=3D"color: =
#000;" class=3D"styled-by-prettify"> x </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> none </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">};</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #800;" class=3D"styled-by-prettify">//outer most is=
 empty</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
optional</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&l=
t;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">optional=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify">optional</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">&gt;&gt;&gt;</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify"> y </span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> in_</span><code class=3D"prettyprint"><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">place</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify"></span></code><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> none </span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">};</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettify">//ou=
ter most have empty optional</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"><br>optional</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">optional</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">optional</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">T<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;&gt=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> z </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> in_</span><code class=3D"prettyprint"><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify">place</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify"></span></code><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> in_place</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> none </span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>optional</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify">optional</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify">optional</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify">T</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;&gt;&gt;=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> z </span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"> in_</span><code class=3D"prettyprint"><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">place</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify"></span></code><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> in_</span><code class=3D"prettyprint=
"><span style=3D"color: #000;" class=3D"styled-by-prettify">place</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify"></span></code><span =
style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #066;" cla=
ss=3D"styled-by-prettify">10</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">}</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
};</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>opti=
onal</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify">optional</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">optional</span><span=
 style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">&gt;&gt;&gt;</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> z </span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> in_</span><code class=3D"prettyprint"><span style=3D"color: #000;"=
 class=3D"styled-by-prettify">place</span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify"></span></code><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> in_</span><code class=3D"prettyprint"><span style=3D"color:=
 #000;" class=3D"styled-by-prettify">place</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify"></span></code><span style=3D"color: #660;" =
class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> in_</span><code class=3D"prettyprint"><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify">place</span><span style=3D"color:=
 #660;" class=3D"styled-by-prettify"></span></code><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"styl=
ed-by-prettify">10</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #800;" class=3D"styled-by-prettify">//emplace construc=
tor of T</span></div></code></div><br><br><br>On Monday, January 26, 2015 a=
t 5:43:07 PM UTC+1, Matthew Woehlke wrote:<blockquote class=3D"gmail_quote"=
 style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;">On 2015-01-24 23:09, Tony V E wrote:
<br>&gt; On Sat, Jan 24, 2015 at 2:15 PM, Miro Knejp &lt;<a href=3D"javascr=
ipt:" target=3D"_blank" gdf-obfuscated-mailto=3D"Ka5-gxFzyAYJ" rel=3D"nofol=
low" onmousedown=3D"this.href=3D'javascript:';return true;" onclick=3D"this=
..href=3D'javascript:';return true;">miro....@gmail.com</a>&gt; wrote:
<br>&gt;&gt; &nbsp;Here are some observations:
<br>&gt;&gt;
<br>&gt;&gt; &nbsp; &nbsp;- Do we need the distinction between nullopt_t an=
d none_t? Can't we
<br>&gt;&gt; &nbsp; &nbsp;use none_t/none as a universal tag type to specif=
y "nothing" in the
<br>&gt;&gt; &nbsp; &nbsp;standard library and replace nullopt_t with none_=
t in the draft?
<br>&gt;
<br>&gt; In the optional&lt;&gt; discussions, we discussed this, and decide=
d to make
<br>&gt; nullopt_t specific to optional (and not use nullptr_t or create a
<br>&gt; std::none_t, etc) for a few reasons:
<br>&gt;=20
<br>&gt; - "better safe than sorry" - we didn't want to tackle more than ju=
st
<br>&gt; optional. &nbsp;A generic none_t would get used by users in user-d=
efined types
<br>&gt; in who knows what ways.
<br>
<br>Hmm... now that you mention it, I'd love to have a generic none_t / non=
e
<br>for implementing flags... this would allow defaulting flags as '=3D non=
e',
<br>which is more logical than '=3D nullptr', and doesn't run afoul of
<br>forbidden integer conversions as does '=3D 0'. (That said, since we'd b=
e
<br>requiring presumably C++17 at that point, '=3D {}' works also, but isn'=
t
<br>as readable as '=3D none', or passing 'none' vs. '{}' as a required fla=
gs
<br>parameter.)
<br>
<br>FWIW, I'll note that Python does have a 'None' and gets a lot of mileag=
e
<br>out of it. I can certainly see having a none_t that can mean any of
<br>empty optional, empty variant/any, no flags, etc. (Probably it should
<br>also implicitly convert to nullptr_t?)
<br>
<br>--=20
<br>Matthew
<br>
<br></blockquote></div>

<p></p>

-- <br />
<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 <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 />
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 />

------=_Part_4831_119187568.1422309991498--
------=_Part_4830_809066796.1422309991498--

.


Author: Miro Knejp <miro.knejp@gmail.com>
Date: Tue, 27 Jan 2015 20:15:58 +0100
Raw View
This is a multi-part message in MIME format.
--------------040806040501060206000002
Content-Type: text/plain; charset=UTF-8; format=flowed


Am 26.01.2015 um 21:16 schrieb Nevin Liber:
> On 24 January 2015 at 13:15, Miro Knejp <miro.knejp@gmail.com
> <mailto:miro.knejp@gmail.com>> wrote:
>
>     Here are some observations:
>
>       * Do we need the distinction between nullopt_t and none_t? Can't
>         we use none_t/none as a universal tag type to specify
>         "nothing" in the standard library and replace nullopt_t with
>         none_t in the draft?
>
>
> Given that just about any time we conflate two separate notions onto
> one syntax, people generally dislike it (forwarding references vs.
> r-value references, "unifed" initialization syntax, etc.), what is the
> use case for conflating nullopt_t and none_t into one type?  I'm not
> seeing it.  Please provide motivation.
I'm just wondering where it's going to go in the future. How many
nullxxx_t will there be? One for each type that can be "empty"?
Semantically they indicate the same "nothing" to me.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--------------040806040501060206000002
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <br>
    <div class=3D"moz-cite-prefix">Am 26.01.2015 um 21:16 schrieb Nevin
      Liber:<br>
    </div>
    <blockquote
cite=3D"mid:CAGg_6+Paf5Pui_XbPVOig+oGNpsZm_exjwqMa7YA815OytNqNg@mail.gmail.=
com"
      type=3D"cite">
      <div dir=3D"ltr">On 24 January 2015 at 13:15, Miro Knejp <span
          dir=3D"ltr">&lt;<a moz-do-not-send=3D"true"
            href=3D"mailto:miro.knejp@gmail.com" target=3D"_blank">miro.kne=
jp@gmail.com</a>&gt;</span>
        wrote:<br>
        <div class=3D"gmail_extra">
          <div class=3D"gmail_quote">
            <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor=3D"#FFFFFF" text=3D"#000000"> Here are some
                observations:<br>
                <ul>
                  <li>Do we need the distinction between nullopt_t and
                    none_t? Can't we use none_t/none as a universal tag
                    type to specify "nothing" in the standard library
                    and replace nullopt_t with none_t in the draft?</li>
                </ul>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Given that just about any time we conflate two separate
              notions onto one syntax, people generally dislike it
              (forwarding references vs. r-value references, "unifed"
              initialization syntax, etc.), what is the use case for
              conflating nullopt_t and none_t into one type?=C2=A0 I'm not
              seeing it.=C2=A0 Please provide motivation.</div>
          </div>
        </div>
      </div>
    </blockquote>
    I'm just wondering where it's going to go in the future. How many
    nullxxx_t will there be? One for each type that can be "empty"?
    Semantically they indicate the same "nothing" to me.<br>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------040806040501060206000002--

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 27 Jan 2015 13:51:52 -0600
Raw View
--089e0103ea327d285e050da7982b
Content-Type: text/plain; charset=UTF-8

On 27 January 2015 at 13:15, Miro Knejp <miro.knejp@gmail.com> wrote:

> I'm just wondering where it's going to go in the future. How many
> nullxxx_t will there be?
>

Given that it is taking twelve years to add optional to the C++ Standard (
n1878 <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1878.htm>
came out in 2005) and eleven years to add any
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1939.html>, I'm
not particularly worried about it.


> One for each type that can be "empty"? Semantically they indicate the same
> "nothing" to me.
>

That's to you.  To me, they are all different.

So, should we just use nullptr, or do you agree that is a "different" kind
of empty?  IIRC it was discussed and rejected for optional.

And if the number of them ever becomes a real problem, we can always add a
universal empty type in the future.

I just don't see worrying about a proliferation of empty types showing up
in the standard long past the time all of us on this list have died of old
age as a particularly compelling use case.
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0103ea327d285e050da7982b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On 27 January 2015 at 13:15, Miro Knejp <span dir=3D"ltr">&lt;<a href=3D"ma=
ilto:miro.knejp@gmail.com" target=3D"_blank">miro.knejp@gmail.com</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor=3D"#FFFFFF" tex=
t=3D"#000000">I&#39;m just wondering where it&#39;s going to go in the futu=
re. How many
    nullxxx_t will there be?</div></blockquote><div><br></div><div>Given th=
at it is taking twelve years to add optional to the C++ Standard (<a href=
=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1878.htm">n187=
8</a> came out in 2005) and eleven years to add <a href=3D"http://www.open-=
std.org/jtc1/sc22/wg21/docs/papers/2006/n1939.html">any</a>, I&#39;m not pa=
rticularly worried about it.</div><div>=C2=A0</div><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex"><div bgcolor=3D"#FFFFFF" text=3D"#000000"> One for each type that ca=
n be &quot;empty&quot;?
    Semantically they indicate the same &quot;nothing&quot; to me.</div></b=
lockquote><div><br></div><div>That&#39;s to you.=C2=A0 To me, they are all =
different.=C2=A0</div><div><br></div><div>So, should we just use nullptr, o=
r do you agree that is a &quot;different&quot; kind of empty?=C2=A0 IIRC it=
 was discussed and rejected for optional.</div><div><br></div><div>And if t=
he number of them ever becomes a real problem, we can always add a universa=
l empty type in the future.</div><div><br></div><div>I just don&#39;t see w=
orrying about a proliferation of empty types showing up in the standard lon=
g past the time all of us on this list have died of old age as a particular=
ly compelling use case.</div></div>-- <br><div class=3D"gmail_signature">=
=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:nevin@=
eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=C2=A0 (8=
47) 691-1404</div>
</div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0103ea327d285e050da7982b--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Wed, 28 Jan 2015 00:02:04 -0200
Raw View
On Tuesday 27 January 2015 13:51:52 Nevin Liber wrote:
> So, should we just use nullptr, or do you agree that is a "different" kind
> of empty?  IIRC it was discussed and rejected for optional.

optional<void *> v = nullptr;

That should answer your question.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 27 Jan 2015 22:07:43 -0500
Raw View
--001a11c36aa8cce48a050dadacd4
Content-Type: text/plain; charset=UTF-8

On Tue, Jan 27, 2015 at 9:02 PM, Thiago Macieira <thiago@macieira.org>
wrote:

> On Tuesday 27 January 2015 13:51:52 Nevin Liber wrote:
> > So, should we just use nullptr, or do you agree that is a "different"
> kind
> > of empty?  IIRC it was discussed and rejected for optional.
>
> optional<void *> v = nullptr;
>
> That should answer your question.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel Open Source Technology Center
>       PGP/GPG: 0x6EF45358; fingerprint:
>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>


And in fact, nullptr is an example of why we need separate 'none' types.
The universal 'none' was previously 0.  Turned out that had too many
downsides, so we invented nullptr.

(If we get a std::none, should int x = std::none; work? :-)

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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c36aa8cce48a050dadacd4
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, Jan 27, 2015 at 9:02 PM, Thiago Macieira <span dir=3D"ltr">&lt;=
<a href=3D"mailto:thiago@macieira.org" target=3D"_blank">thiago@macieira.or=
g</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"><span class=3D"">=
On Tuesday 27 January 2015 13:51:52 Nevin Liber wrote:<br>
&gt; So, should we just use nullptr, or do you agree that is a &quot;differ=
ent&quot; kind<br>
&gt; of empty?=C2=A0 IIRC it was discussed and rejected for optional.<br>
<br>
</span>optional&lt;void *&gt; v =3D nullptr;<br>
<br>
That should answer your question.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=3D"_b=
lank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank">kde.org</a><br>
=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center<br>
=C2=A0 =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint:<br>
=C2=A0 =C2=A0 =C2=A0 E067 918B B660 DBD1 105C=C2=A0 966C 33F5 F005 6EF4 535=
8</font></span><br></blockquote></div><br><br></div><div class=3D"gmail_ext=
ra">And in fact, nullptr is an example of why we need separate &#39;none&#3=
9; types.=C2=A0 The universal &#39;none&#39; was previously 0.=C2=A0 Turned=
 out that had too many downsides, so we invented nullptr.<br><br></div><div=
 class=3D"gmail_extra">(If we get a std::none, should int x =3D std::none; =
work? :-)<br><br></div><div class=3D"gmail_extra">Tony<br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c36aa8cce48a050dadacd4--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Thu, 29 Jan 2015 12:39:35 -0500
Raw View
On 2015-01-27 22:07, Tony V E wrote:
> (If we get a std::none, should int x = std::none; work? :-)

Um... no? Why should it? 'none' is not an integer... nor is 'nullptr'
(and indeed, 'int x = nullptr' is not allowed....)

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Feb 2015 13:11:28 -0500
Raw View
--089e0160bbf8e99e6f050e32ff4b
Content-Type: text/plain; charset=UTF-8

On Thu, Jan 29, 2015 at 12:39 PM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:

> On 2015-01-27 22:07, Tony V E wrote:
> > (If we get a std::none, should int x = std::none; work? :-)
>
> Um... no? Why should it? 'none' is not an integer... nor is 'nullptr'
> (and indeed, 'int x = nullptr' is not allowed....)
>
>
'none' is not an integer, nor is 'none' an optional or a pointer or an
Expected or a ...  But to those requesting it, it is a generic value to be
applied to a number of contexts.
So I don't find it hard to extend that argument to integers, where 'none'
would obviously mean 0.

    int numberOfOranges = std::none;

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0160bbf8e99e6f050e32ff4b
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 Thu, Jan 29, 2015 at 12:39 PM, Matthew Woehlke <span dir=3D"ltr">&lt=
;<a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank">mw_tri=
ad@users.sourceforge.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><span class=3D"">On 2015-01-27 22:07, Tony V E wrote:<br>
&gt; (If we get a std::none, should int x =3D std::none; work? :-)<br>
<br>
</span>Um... no? Why should it? &#39;none&#39; is not an integer... nor is =
&#39;nullptr&#39;<br>
(and indeed, &#39;int x =3D nullptr&#39; is not allowed....)<br>
<span class=3D"HOEnZb"></span><br></blockquote></div><br></div><div class=
=3D"gmail_extra">&#39;none&#39; is not an integer, nor is &#39;none&#39; an=
 optional or a pointer or an Expected or a ...=C2=A0 But to those requestin=
g it, it is a generic value to be applied to a number of contexts.<br>So I =
don&#39;t find it hard to extend that argument to integers, where &#39;none=
&#39; would obviously mean 0.<br><br></div><div class=3D"gmail_extra">=C2=
=A0=C2=A0=C2=A0 int numberOfOranges =3D std::none;<br><br><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0160bbf8e99e6f050e32ff4b--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 3 Feb 2015 11:10:43 -0800 (PST)
Raw View
------=_Part_442_2016527819.1422990643534
Content-Type: multipart/alternative;
 boundary="----=_Part_443_196136979.1422990643534"

------=_Part_443_196136979.1422990643534
Content-Type: text/plain; charset=UTF-8

Here's the problem with that line of thought. Consider this code:

  int number = std::none;
  if(number == std::none) then
    //Should be executed.
  end

We see here that the "should be executed" part ought to be executed.

  optional<int> oNumber = std::none;
  if(oNumber == std::none) then
    //Should be executed.
  end

Again, we see that the "should be executed" part ought to be executed.
However, this now has completely different semantics from the previous one.
Before, the value actually had a value; now it does not. The conditional
statement means something entirely different now.

For a few more pitfalls, consider this:

  T *GetValue()
  {
    return std::none.
  }

  optional<T*> Foo = GetValue();
  optional<T*> Bar = std::none;

Is it not surprising that Foo is not the same as Bar here? From the user's
point of view, they're the same thing. But they're not, because the
conversion to T* happened in GetValue, which returned a null pointer.

We should not encourage misunderstandings like this.

Zero is a legitimate integer value. NULL is a legitimate pointer value.
std::none is not. It means "I don't have a value". And it therefore should
only be used with types that actually have the concept of having no value.

Integers and pointers do not have that concept, so they should not be
useable with std::none.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_443_196136979.1422990643534
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Here's the problem with that line of thought. Consider thi=
s code:<br><br>&nbsp; int number =3D std::none;<br>&nbsp; if(number =3D=3D =
std::none) then<br>&nbsp;&nbsp;&nbsp; //Should be executed.<br>&nbsp; end<b=
r><br>We see here that the "should be executed" part ought to be executed.<=
br><br>&nbsp; optional&lt;int&gt; oNumber =3D std::none;<br>&nbsp; if(oNumb=
er =3D=3D std::none) then<br>&nbsp;&nbsp;&nbsp; //Should be executed.<br>&n=
bsp; end<br><br>Again, we see that the "should be executed" part ought to b=
e executed. However, this now has completely different semantics from the p=
revious one. Before, the value actually had a value; now it does not. The c=
onditional statement means something entirely different now.<br><br>For a f=
ew more pitfalls, consider this:<br><br>&nbsp; T *GetValue()<br>&nbsp; {<br=
>&nbsp;&nbsp;&nbsp; return std::none.<br>&nbsp; }<br><br>&nbsp; optional&lt=
;T*&gt; Foo =3D GetValue();<br>&nbsp; optional&lt;T*&gt; Bar =3D std::none;=
<br><br>Is it not surprising that Foo is not the same as Bar here? From the=
 user's point of view, they're the same thing. But they're not, because the=
 conversion to T* happened in GetValue, which returned a null pointer.<br><=
br>We should not encourage misunderstandings like this.<br><br>Zero is a le=
gitimate integer value. NULL is a legitimate pointer value. std::none is no=
t. It means "I don't have a value". And it therefore should only be used wi=
th types that actually have the concept of having no value.<br><br>Integers=
 and pointers do not have that concept, so they should not be useable with =
std::none. <br></div>

<p></p>

-- <br />
<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 <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 />
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 />

------=_Part_443_196136979.1422990643534--
------=_Part_442_2016527819.1422990643534--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Feb 2015 14:35:48 -0500
Raw View
--089e011607c68c2ea6050e342d9a
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 3, 2015 at 2:10 PM, Nicol Bolas <jmckesson@gmail.com> wrote:

> Here's the problem with that line of thought. Consider this code:
>
>   int number = std::none;
>   if(number == std::none) then
>     //Should be executed.
>   end
>
> We see here that the "should be executed" part ought to be executed.
>
>   optional<int> oNumber = std::none;
>   if(oNumber == std::none) then
>     //Should be executed.
>   end
>
> Again, we see that the "should be executed" part ought to be executed.
> However, this now has completely different semantics from the previous one.
> Before, the value actually had a value; now it does not. The conditional
> statement means something entirely different now.
>
> For a few more pitfalls, consider this:
>
>   T *GetValue()
>   {
>     return std::none.
>   }
>
>   optional<T*> Foo = GetValue();
>   optional<T*> Bar = std::none;
>
> Is it not surprising that Foo is not the same as Bar here? From the user's
> point of view, they're the same thing. But they're not, because the
> conversion to T* happened in GetValue, which returned a null pointer.
>
> We should not encourage misunderstandings like this.
>
> Zero is a legitimate integer value. NULL is a legitimate pointer value.
> std::none is not. It means "I don't have a value". And it therefore should
> only be used with types that actually have the concept of having no value.
>
> Integers and pointers do not have that concept, so they should not be
> useable with std::none.
>


But you are OK with having the above problems with std::optional<std::any>
for example? (assuming 'any' has 'none' support)?

Tony

P.S. I think many people would consider NULL to mean the pointer doesn't
have a value.  ie "I don't point to anything".  And conversely, for
optional<int> op = none, the optional does have a value, that value being
"none" or "I don't have a value" or "I don't contain anything".  The int
inside the optional doesn't have a value, but the optional does.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e011607c68c2ea6050e342d9a
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, Feb 3, 2015 at 2:10 PM, Nicol Bolas <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:jmckesson@gmail.com" target=3D"_blank">jmckesson@gmail.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Here&=
#39;s the problem with that line of thought. Consider this code:<br><br>=C2=
=A0 int number =3D std::none;<br>=C2=A0 if(number =3D=3D std::none) then<br=
>=C2=A0=C2=A0=C2=A0 //Should be executed.<br>=C2=A0 end<br><br>We see here =
that the &quot;should be executed&quot; part ought to be executed.<br><br>=
=C2=A0 optional&lt;int&gt; oNumber =3D std::none;<br>=C2=A0 if(oNumber =3D=
=3D std::none) then<br>=C2=A0=C2=A0=C2=A0 //Should be executed.<br>=C2=A0 e=
nd<br><br>Again, we see that the &quot;should be executed&quot; part ought =
to be executed. However, this now has completely different semantics from t=
he previous one. Before, the value actually had a value; now it does not. T=
he conditional statement means something entirely different now.<br><br>For=
 a few more pitfalls, consider this:<br><br>=C2=A0 T *GetValue()<br>=C2=A0 =
{<br>=C2=A0=C2=A0=C2=A0 return std::none.<br>=C2=A0 }<br><br>=C2=A0 optiona=
l&lt;T*&gt; Foo =3D GetValue();<br>=C2=A0 optional&lt;T*&gt; Bar =3D std::n=
one;<br><br>Is it not surprising that Foo is not the same as Bar here? From=
 the user&#39;s point of view, they&#39;re the same thing. But they&#39;re =
not, because the conversion to T* happened in GetValue, which returned a nu=
ll pointer.<br><br>We should not encourage misunderstandings like this.<br>=
<br>Zero is a legitimate integer value. NULL is a legitimate pointer value.=
 std::none is not. It means &quot;I don&#39;t have a value&quot;. And it th=
erefore should only be used with types that actually have the concept of ha=
ving no value.<br><br>Integers and pointers do not have that concept, so th=
ey should not be useable with std::none. <br></div></blockquote><div><br><b=
r></div><div>But you are OK with having the above problems with std::option=
al&lt;std::any&gt; for example? (assuming &#39;any&#39; has &#39;none&#39; =
support)? <br><br></div><div>Tony<br><br></div><div>P.S. I think many peopl=
e would consider NULL to mean the pointer doesn&#39;t have a value.=C2=A0 i=
e &quot;I don&#39;t point to anything&quot;.=C2=A0 And conversely, for opti=
onal&lt;int&gt; op =3D none, the optional does have a value, that value bei=
ng &quot;none&quot; or &quot;I don&#39;t have a value&quot; or &quot;I don&=
#39;t contain anything&quot;.=C2=A0 The int inside the optional doesn&#39;t=
 have a value, but the optional does.<br></div></div><br><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e011607c68c2ea6050e342d9a--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 3 Feb 2015 12:10:33 -0800 (PST)
Raw View
------=_Part_5399_34617464.1422994234017
Content-Type: multipart/alternative;
 boundary="----=_Part_5400_1995132758.1422994234017"

------=_Part_5400_1995132758.1422994234017
Content-Type: text/plain; charset=UTF-8



On Tuesday, February 3, 2015 at 2:35:51 PM UTC-5, Tony V E wrote:
>
>
>
> On Tue, Feb 3, 2015 at 2:10 PM, Nicol Bolas <jmck...@gmail.com
> <javascript:>> wrote:
>
>> Here's the problem with that line of thought. Consider this code:
>>
>>   int number = std::none;
>>   if(number == std::none) then
>>     //Should be executed.
>>   end
>>
>> We see here that the "should be executed" part ought to be executed.
>>
>>   optional<int> oNumber = std::none;
>>   if(oNumber == std::none) then
>>     //Should be executed.
>>   end
>>
>> Again, we see that the "should be executed" part ought to be executed.
>> However, this now has completely different semantics from the previous one.
>> Before, the value actually had a value; now it does not. The conditional
>> statement means something entirely different now.
>>
>> For a few more pitfalls, consider this:
>>
>>   T *GetValue()
>>   {
>>     return std::none.
>>   }
>>
>>   optional<T*> Foo = GetValue();
>>   optional<T*> Bar = std::none;
>>
>> Is it not surprising that Foo is not the same as Bar here? From the
>> user's point of view, they're the same thing. But they're not, because the
>> conversion to T* happened in GetValue, which returned a null pointer.
>>
>> We should not encourage misunderstandings like this.
>>
>> Zero is a legitimate integer value. NULL is a legitimate pointer value.
>> std::none is not. It means "I don't have a value". And it therefore should
>> only be used with types that actually have the concept of having no value.
>>
>> Integers and pointers do not have that concept, so they should not be
>> useable with std::none.
>>
>
>
> But you are OK with having the above problems with std::optional<std::any>
> for example? (assuming 'any' has 'none' support)?
>

It is a sticky issue: to have std::any which could store any value, and
then wrap it in something who's comparison to a certain value has a special
meaning.

My suggested means of resolving that problem is to make it so that std::any
*cannot* store a std::none object. After all, objects of std::none has no
values. So its highly unlikely that any user would *need* to store one
inside a std::any. And if they did, they could simply use a conditional
switch or something.

Similarly, optional<std::none> should be outlawed.

Tony
>
> P.S. I think many people would consider NULL to mean the pointer doesn't
> have a value.  ie "I don't point to anything".
>

And what about times when NULL is a valid value, and you need another value
which is truly invalid?

We're talking about something that has to work for *everyone*. As things
currently stand, having std::none work the way it currently does allows
everyone to do what they need to. If someone ever needed to write
optional<T*>, then they must specifically want to differentiate between
NULL and std::none.

Let them do so.


> And conversely, for optional<int> op = none, the optional does have a
> value, that value being "none" or "I don't have a value" or "I don't
> contain anything".  The int inside the optional doesn't have a value, but
> the optional does.
>



--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_5400_1995132758.1422994234017
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, February 3, 2015 at 2:35:51 PM UTC-5, =
Tony V E wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-=
left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr=
"><br><div><br><div class=3D"gmail_quote">On Tue, Feb 3, 2015 at 2:10 PM, N=
icol Bolas <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" =
gdf-obfuscated-mailto=3D"MMsBCi4sFCAJ" rel=3D"nofollow" onmousedown=3D"this=
..href=3D'javascript:';return true;" onclick=3D"this.href=3D'javascript:';re=
turn true;">jmck...@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D=
"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding=
-left:1ex"><div dir=3D"ltr">Here's the problem with that line of thought. C=
onsider this code:<br><br>&nbsp; int number =3D std::none;<br>&nbsp; if(num=
ber =3D=3D std::none) then<br>&nbsp;&nbsp;&nbsp; //Should be executed.<br>&=
nbsp; end<br><br>We see here that the "should be executed" part ought to be=
 executed.<br><br>&nbsp; optional&lt;int&gt; oNumber =3D std::none;<br>&nbs=
p; if(oNumber =3D=3D std::none) then<br>&nbsp;&nbsp;&nbsp; //Should be exec=
uted.<br>&nbsp; end<br><br>Again, we see that the "should be executed" part=
 ought to be executed. However, this now has completely different semantics=
 from the previous one. Before, the value actually had a value; now it does=
 not. The conditional statement means something entirely different now.<br>=
<br>For a few more pitfalls, consider this:<br><br>&nbsp; T *GetValue()<br>=
&nbsp; {<br>&nbsp;&nbsp;&nbsp; return std::none.<br>&nbsp; }<br><br>&nbsp; =
optional&lt;T*&gt; Foo =3D GetValue();<br>&nbsp; optional&lt;T*&gt; Bar =3D=
 std::none;<br><br>Is it not surprising that Foo is not the same as Bar her=
e? From the user's point of view, they're the same thing. But they're not, =
because the conversion to T* happened in GetValue, which returned a null po=
inter.<br><br>We should not encourage misunderstandings like this.<br><br>Z=
ero is a legitimate integer value. NULL is a legitimate pointer value. std:=
:none is not. It means "I don't have a value". And it therefore should only=
 be used with types that actually have the concept of having no value.<br><=
br>Integers and pointers do not have that concept, so they should not be us=
eable with std::none. <br></div></blockquote><div><br><br></div><div>But yo=
u are OK with having the above problems with std::optional&lt;std::any&gt; =
for example? (assuming 'any' has 'none' support)?<br></div></div></div></di=
v></blockquote><div><br>It is a sticky issue: to have std::any which could =
store any value, and then wrap it in something who's comparison to a certai=
n value has a special meaning.<br><br>My suggested means of resolving that =
problem is to make it so that std::any <i>cannot</i> store a std::none obje=
ct. After all, objects of std::none has no values. So its highly unlikely t=
hat any user would <i>need</i> to store one inside a std::any. And if they =
did, they could simply use a conditional switch or something.<br><br>Simila=
rly, optional&lt;std::none&gt; should be outlawed.<br><br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1=
px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div><div class=3D"gmail=
_quote"><div></div><div>Tony<br><br></div><div>P.S. I think many people wou=
ld consider NULL to mean the pointer doesn't have a value.&nbsp; ie "I don'=
t point to anything".</div></div></div></div></blockquote><div><br>And what=
 about times when NULL is a valid value, and you need another value which i=
s truly invalid?<br><br>We're talking about something that has to work for =
<i>everyone</i>. As things currently stand, having std::none work the way i=
t currently does allows everyone to do what they need to. If someone ever n=
eeded to write optional&lt;T*&gt;, then they must specifically want to diff=
erentiate between NULL and std::none.<br><br>Let them do so.<br>&nbsp;</div=
><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bo=
rder-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div><div cl=
ass=3D"gmail_quote"><div>And conversely, for optional&lt;int&gt; op =3D non=
e, the optional does have a value, that value being "none" or "I don't have=
 a value" or "I don't contain anything".&nbsp; The int inside the optional =
doesn't have a value, but the optional does.<br></div></div></div></div></b=
lockquote><div><br>&nbsp;</div></div>

<p></p>

-- <br />
<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 <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 />
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 />

------=_Part_5400_1995132758.1422994234017--
------=_Part_5399_34617464.1422994234017--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Tue, 3 Feb 2015 22:15:01 +0200
Raw View
On 3 February 2015 at 22:10, Nicol Bolas <jmckesson@gmail.com> wrote:
>> But you are OK with having the above problems with std::optional<std::any>
>> for example? (assuming 'any' has 'none' support)?
> It is a sticky issue: to have std::any which could store any value, and then
> wrap it in something who's comparison to a certain value has a special
> meaning.

That works just fine today.

> My suggested means of resolving that problem is to make it so that std::any
> cannot store a std::none object. After all, objects of std::none has no
> values. So its highly unlikely that any user would need to store one inside
> a std::any. And if they did, they could simply use a conditional switch or
> something.
>
> Similarly, optional<std::none> should be outlawed.

So, what does assigning none to an optional<any> mean? What is it assigning
to?

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 3 Feb 2015 14:22:44 -0600
Raw View
--001a11c32cf4c92dba050e34d7a1
Content-Type: text/plain; charset=UTF-8

On 3 February 2015 at 14:10, Nicol Bolas <jmckesson@gmail.com> wrote:

>
> Integers and pointers do not have that concept, so they should not be
>>> useable with std::none.
>>>
>>
>>
>> But you are OK with having the above problems with
>> std::optional<std::any> for example? (assuming 'any' has 'none' support)?
>>
>
> It is a sticky issue: to have std::any which could store any value, and
> then wrap it in something who's comparison to a certain value has a special
> meaning.
>

It is only a "sticky issue" if you want to have a unified std::none across
different types.

Just like the old Smith & Dale "Doctor, it hurts when I do this."
punchline:  *don't do that.*


> My suggested means of resolving that problem is to make it so that
> std::any *cannot* store a std::none object. After all, objects of
> std::none has no values. So its highly unlikely that any user would *need*
> to store one inside a std::any.
>

As if the rules of C++ aren't complicated enough...  Why create the problem
in the first place?
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c32cf4c92dba050e34d7a1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On 3 February 2015 at 14:10, Nicol Bolas <span dir=3D"ltr"=
>&lt;<a href=3D"mailto:jmckesson@gmail.com" target=3D"_blank">jmckesson@gma=
il.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=3D"gm=
ail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><span class=
=3D""><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex=
;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div cl=
ass=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Integer=
s and pointers do not have that concept, so they should not be useable with=
 std::none. <br></div></blockquote><div><br><br></div><div>But you are OK w=
ith having the above problems with std::optional&lt;std::any&gt; for exampl=
e? (assuming &#39;any&#39; has &#39;none&#39; support)?<br></div></div></di=
v></div></blockquote></span><div><br>It is a sticky issue: to have std::any=
 which could store any value, and then wrap it in something who&#39;s compa=
rison to a certain value has a special meaning.<br></div></div></blockquote=
><div><br></div><div>It is only a &quot;sticky issue&quot; if you want to h=
ave a unified std::none across different types.<br><br></div><div>Just like=
 the old Smith &amp; Dale &quot;Doctor, it hurts when I do this.&quot; punc=
hline:=C2=A0 <i>don&#39;t do that.</i><br></div><div>=C2=A0</div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex"><div dir=3D"ltr"><div>My suggested means of resolving =
that problem is to make it so that std::any <i>cannot</i> store a std::none=
 object. After all, objects of std::none has no values. So its highly unlik=
ely that any user would <i>need</i> to store one inside a std::any.</div></=
div></blockquote><div><br></div><div>As if the rules of C++ aren&#39;t comp=
licated enough...=C2=A0 Why create the problem in the first place?<br></div=
></div>-- <br><div class=3D"gmail_signature">=C2=A0Nevin &quot;:-)&quot; Li=
ber=C2=A0 &lt;mailto:<a href=3D"mailto:nevin@eviloverlord.com" target=3D"_b=
lank">nevin@eviloverlord.com</a>&gt;=C2=A0 (847) 691-1404</div>
</div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c32cf4c92dba050e34d7a1--

.


Author: Miro Knejp <miro.knejp@gmail.com>
Date: Tue, 03 Feb 2015 21:33:12 +0100
Raw View
Am 03.02.2015 um 21:15 schrieb Ville Voutilainen:
> On 3 February 2015 at 22:10, Nicol Bolas <jmckesson@gmail.com> wrote:
>>> But you are OK with having the above problems with std::optional<std::any>
>>> for example? (assuming 'any' has 'none' support)?
>> It is a sticky issue: to have std::any which could store any value, and then
>> wrap it in something who's comparison to a certain value has a special
>> meaning.
> That works just fine today.
>
>> My suggested means of resolving that problem is to make it so that std::any
>> cannot store a std::none object. After all, objects of std::none has no
>> values. So its highly unlikely that any user would need to store one inside
>> a std::any. And if they did, they could simply use a conditional switch or
>> something.
>>
>> Similarly, optional<std::none> should be outlawed.
> So, what does assigning none to an optional<any> mean? What is it assigning
> to?
>
What does assigning nullopt to an optional<optional<T>> mean? The
problem is not new and as far as I understand it there isn't really a
solution. Saying that for this case it's OK but for optional<any> not is
an attempt at juding which is more likely to happen and I don't think
that can be objectively determined. The moment people start throwing
templates at it any combination can appear anywhere in a totally
unrelated piece of code.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Feb 2015 15:35:10 -0500
Raw View
--001a11c26986d68573050e350125
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 3, 2015 at 3:10 PM, Nicol Bolas <jmckesson@gmail.com> wrote:

>
>
>
> It is a sticky issue: to have std::any which could store any value, and
> then wrap it in something who's comparison to a certain value has a special
> meaning.
>
> My suggested means of resolving that problem is to make it so that
> std::any *cannot* store a std::none object. After all, objects of
> std::none has no values. So its highly unlikely that any user would *need*
> to store one inside a std::any. And if they did, they could simply use a
> conditional switch or something.
>


In your opinion, what classes, besides optional, would support std::none?
(And what happens if you put one in an optional?)



>
> We're talking about something that has to work for *everyone*. As things
> currently stand, having std::none work the way it currently does allows
> everyone to do what they need to. If someone ever needed to write
> optional<T*>, then they must specifically want to differentiate between
> NULL and std::none.
>
>
As things currently stand, we don't have a std::none.  We do have
std::nullopt.  Only works for optional.  std::none would work for some
extended set of types, of which optional would be one.  Which others?

Maybe I've lost track of the conversation.

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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c26986d68573050e350125
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, Feb 3, 2015 at 3:10 PM, Nicol Bolas <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:jmckesson@gmail.com" target=3D"_blank">jmckesson@gmail.com</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br=
><div dir=3D"ltr"><br><span class=3D""></span><div><br>It is a sticky issue=
: to have std::any which could store any value, and then wrap it in somethi=
ng who&#39;s comparison to a certain value has a special meaning.<br><br>My=
 suggested means of resolving that problem is to make it so that std::any <=
i>cannot</i> store a std::none object. After all, objects of std::none has =
no values. So its highly unlikely that any user would <i>need</i> to store =
one inside a std::any. And if they did, they could simply use a conditional=
 switch or something.<br></div></div></blockquote><div><br><br>In your opin=
ion, what classes, besides optional, would support std::none?=C2=A0 (And wh=
at happens if you put one in an optional?)<br><br>=C2=A0 <br></div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px=
 solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div><br>We&#39;=
re talking about something that has to work for <i>everyone</i>. As things =
currently stand, having std::none work the way it currently does allows eve=
ryone to do what they need to. If someone ever needed to write optional&lt;=
T*&gt;, then they must specifically want to differentiate between NULL and =
std::none.<br><br></div></div></blockquote><div><br></div><div>As things cu=
rrently stand, we don&#39;t have a std::none.=C2=A0 We do have std::nullopt=
..=C2=A0 Only works for optional.=C2=A0 std::none would work for some extend=
ed set of types, of which optional would be one.=C2=A0 Which others?<br><br=
></div><div>Maybe I&#39;ve lost track of the conversation.<br><br></div></d=
iv>Tony<br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c26986d68573050e350125--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Feb 2015 15:42:09 -0500
Raw View
--089e0158ab72da3d08050e351abd
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 3, 2015 at 3:33 PM, Miro Knejp <miro.knejp@gmail.com> wrote:

>
> Am 03.02.2015 um 21:15 schrieb Ville Voutilainen:
>
>> On 3 February 2015 at 22:10, Nicol Bolas <jmckesson@gmail.com> wrote:
>>
>>> But you are OK with having the above problems with
>>>> std::optional<std::any>
>>>> for example? (assuming 'any' has 'none' support)?
>>>>
>>> It is a sticky issue: to have std::any which could store any value, and
>>> then
>>> wrap it in something who's comparison to a certain value has a special
>>> meaning.
>>>
>> That works just fine today.
>>
>>  My suggested means of resolving that problem is to make it so that
>>> std::any
>>> cannot store a std::none object. After all, objects of std::none has no
>>> values. So its highly unlikely that any user would need to store one
>>> inside
>>> a std::any. And if they did, they could simply use a conditional switch
>>> or
>>> something.
>>>
>>> Similarly, optional<std::none> should be outlawed.
>>>
>> So, what does assigning none to an optional<any> mean? What is it
>> assigning
>> to?
>>
>>  What does assigning nullopt to an optional<optional<T>> mean? The
> problem is not new and as far as I understand it there isn't really a
> solution. Saying that for this case it's OK but for optional<any> not is an
> attempt at juding which is more likely to happen and I don't think that can
> be objectively determined. The moment people start throwing templates at it
> any combination can appear anywhere in a totally unrelated piece of code.
>
>
There is a solution, but it is ugly.  The alternative considered by the
committee was a nested value, specific to each optional.  ie
optional<int>::none, optional<Foo>::none, etc.
ie

optional<optional<int>> ooi = optional<int>::none; // sets inner optional
ooi = optional<optional<int>>::none; // sets outer optional

But that seemed too burdensome for the average user and use case.  For
template programmers, they already have to jump through hoops (watch out
for ADL, overloaded comma operators, etc) so template developers can
manage.  IIRC, there is unambiguous syntax that can be used for these edge
cases.

nullopt is not optional's biggest problem.

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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0158ab72da3d08050e351abd
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, Feb 3, 2015 at 3:33 PM, Miro Knejp <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:miro.knejp@gmail.com" target=3D"_blank">miro.knejp@gmail.com</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Am 03.02.2015 um 21:15 schrieb Ville Voutilainen:<span class=3D""><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On 3 February 2015 at 22:10, Nicol Bolas &lt;<a href=3D"mailto:jmckesson@gm=
ail.com" target=3D"_blank">jmckesson@gmail.com</a>&gt; wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But you are OK with having the above problems with std::optional&lt;std::an=
y&gt;<br>
for example? (assuming &#39;any&#39; has &#39;none&#39; support)?<br>
</blockquote>
It is a sticky issue: to have std::any which could store any value, and the=
n<br>
wrap it in something who&#39;s comparison to a certain value has a special<=
br>
meaning.<br>
</blockquote>
That works just fine today.<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
My suggested means of resolving that problem is to make it so that std::any=
<br>
cannot store a std::none object. After all, objects of std::none has no<br>
values. So its highly unlikely that any user would need to store one inside=
<br>
a std::any. And if they did, they could simply use a conditional switch or<=
br>
something.<br>
<br>
Similarly, optional&lt;std::none&gt; should be outlawed.<br>
</blockquote>
So, what does assigning none to an optional&lt;any&gt; mean? What is it ass=
igning<br>
to?<br>
<br>
</blockquote></span>
What does assigning nullopt to an optional&lt;optional&lt;T&gt;&gt; mean? T=
he problem is not new and as far as I understand it there isn&#39;t really =
a solution. Saying that for this case it&#39;s OK but for optional&lt;any&g=
t; not is an attempt at juding which is more likely to happen and I don&#39=
;t think that can be objectively determined. The moment people start throwi=
ng templates at it any combination can appear anywhere in a totally unrelat=
ed piece of code.<div class=3D"HOEnZb"><div class=3D"h5"><br></div></div></=
blockquote><div><br></div><div>There is a solution, but it is ugly.=C2=A0 T=
he alternative considered by the committee was a nested value, specific to =
each optional.=C2=A0 ie optional&lt;int&gt;::none, optional&lt;Foo&gt;::non=
e, etc.<br></div><div>ie<br><br></div><div>optional&lt;optional&lt;int&gt;&=
gt; ooi =3D optional&lt;int&gt;::none; // sets inner optional<br></div><div=
>ooi =3D optional&lt;optional&lt;int&gt;&gt;::none; // sets outer optional<=
br><br></div><div>But that seemed too burdensome for the average user and u=
se case.=C2=A0 For template programmers, they already have to jump through =
hoops (watch out for ADL, overloaded comma operators, etc) so template deve=
lopers can manage.=C2=A0 IIRC, there is unambiguous syntax that can be used=
 for these edge cases.<br><br></div><div>nullopt is not optional&#39;s bigg=
est problem.<br><br>Tony<br></div><br></div><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0158ab72da3d08050e351abd--

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 3 Feb 2015 14:43:12 -0600
Raw View
--001a11349cb4fbc1eb050e3520a3
Content-Type: text/plain; charset=UTF-8

On 3 February 2015 at 14:33, Miro Knejp <miro.knejp@gmail.com> wrote:

>
>
>>  What does assigning nullopt to an optional<optional<T>> mean?


When the discussion first came up I endorsed the idea that the empty tag be
a type inside optional, but it was felt to be too noisy to have to use
optional<T>::nullopt.

That doesn't mean we should exasperate the problem.
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11349cb4fbc1eb050e3520a3
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On 3 February 2015 at 14:33, Miro Knejp <span dir=3D"ltr">=
&lt;<a href=3D"mailto:miro.knejp@gmail.com" target=3D"_blank">miro.knejp@gm=
ail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div class=3D"g=
mail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><br><span class=3D""><blockquote=
 class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex">
<br>
</blockquote></span>
What does assigning nullopt to an optional&lt;optional&lt;T&gt;&gt; mean? <=
/blockquote><div><br></div><div>When the discussion first came up I endorse=
d the idea that the empty tag be a type inside optional, but it was felt to=
 be too noisy to have to use optional&lt;T&gt;::nullopt.<br><br></div><div>=
That doesn&#39;t mean we should exasperate the problem.<br></div></div>-- <=
br><div class=3D"gmail_signature">=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &=
lt;mailto:<a href=3D"mailto:nevin@eviloverlord.com" target=3D"_blank">nevin=
@eviloverlord.com</a>&gt;=C2=A0 (847) 691-1404</div>
</div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11349cb4fbc1eb050e3520a3--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Tue, 03 Feb 2015 15:47:19 -0500
Raw View
On 2015-02-03 14:10, Nicol Bolas wrote:
> Zero is a legitimate integer value. NULL is a legitimate pointer value.
> std::none is not. It means "I don't have a value". And it therefore should
> only be used with types that actually have the concept of having no value.
>
> Integers and pointers do not have that concept, so they should not be
> useable with std::none.

Agreed for integers. For pointers... I am confused what you think
"nullptr" means if you feel it is not "no value" :-).

IMHO, Python's None is a good reference for how things ought to work.
(That said... Python's None is rather more equivalent to nullptr...)

On 2015-02-03 14:35, Tony V E wrote:
> for optional<int> op = none, the optional does have a value, that
> value being "none" or "I don't have a value" or "I don't contain
> anything". The int inside the optional doesn't have a value, but the
> optional does.

From a grammatical standpoint... not going there :-). Anyway, we seem to
agree that 'optional<int> op = none' is okay and gives a disengaged
optional.

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Nevin Liber <nevin@eviloverlord.com>
Date: Tue, 3 Feb 2015 14:49:03 -0600
Raw View
--001a11c3c96ae0f6e2050e3535e6
Content-Type: text/plain; charset=UTF-8

On 3 February 2015 at 14:42, Tony V E <tvaneerd@gmail.com> wrote:

> There is a solution, but it is ugly.  The alternative considered by the
> committee was a nested value, specific to each optional.  ie
> optional<int>::none, optional<Foo>::none, etc.
> ie
>
> optional<optional<int>> ooi = optional<int>::none; // sets inner optional
> ooi = optional<optional<int>>::none; // sets outer optional
>
> But that seemed too burdensome for the average user and use case.
>

IIRC one thing we didn't consider was using template aliases or variable
templates to accomplish this.  That still has the burden of repeating the
type, though.


> nullopt is not optional's biggest problem.
>

I'm not taking the bait. :-)
--
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c3c96ae0f6e2050e3535e6
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra">On 3 February 2015 at 14:42, To=
ny V E <span dir=3D"ltr">&lt;<a href=3D"mailto:tvaneerd@gmail.com" target=
=3D"_blank">tvaneerd@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gmail=
_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex"><div>There is a solution, but it is =
ugly.=C2=A0 The alternative considered by the committee was a nested value,=
 specific to each optional.=C2=A0 ie optional&lt;int&gt;::none, optional&lt=
;Foo&gt;::none, etc.<br></div><div>ie<br><br></div><div>optional&lt;optiona=
l&lt;int&gt;&gt; ooi =3D optional&lt;int&gt;::none; // sets inner optional<=
br></div><div>ooi =3D optional&lt;optional&lt;int&gt;&gt;::none; // sets ou=
ter optional<br><br></div><div>But that seemed too burdensome for the avera=
ge user and use case.=C2=A0</div></blockquote><div><br></div><div>IIRC one =
thing we didn&#39;t consider was using template aliases or variable templat=
es to accomplish this.=C2=A0 That still has the burden of repeating the typ=
e, though.<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>nu=
llopt is not optional&#39;s biggest problem.</div></blockquote></div><br></=
div><div class=3D"gmail_extra">I&#39;m not taking the bait. :-)<br>-- <br><=
div>=C2=A0Nevin &quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:ne=
vin@eviloverlord.com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=C2=
=A0 <a href=3D"tel:%28847%29%20691-1404" value=3D"+18476911404" target=3D"_=
blank">(847) 691-1404</a></div>
</div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c3c96ae0f6e2050e3535e6--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Tue, 03 Feb 2015 16:03:16 -0500
Raw View
On 2015-02-03 15:10, Nicol Bolas wrote:
> On Tuesday, February 3, 2015 at 2:35:51 PM UTC-5, Tony V E wrote:
>> But you are OK with having the above problems with std::optional<std::any>
>> for example? (assuming 'any' has 'none' support)?
>
> It is a sticky issue: to have std::any which could store any value, and
> then wrap it in something who's comparison to a certain value has a special
> meaning.
>
> My suggested means of resolving that problem is to make it so that std::any
> *cannot* store a std::none object. After all, objects of std::none has no
> values. So its highly unlikely that any user would *need* to store one
> inside a std::any. And if they did, they could simply use a conditional
> switch or something.

I use invalid QVariant's a fair bit, and they're used in Qt internals
quite a bit also. IMHO a variant type should have an invalid, or
"contains nothing" state.

> Similarly, optional<std::none> should be outlawed.

Well, yes :-). However the original problem was not optional<none_t>, but:

  class Foo { Foo(none_t); ... };
  optional<Foo> op = std::none; // disengaged, or Foo{std::none}?

>> P.S. I think many people would consider NULL to mean the pointer doesn't
>> have a value.  ie "I don't point to anything".
>
> And what about times when NULL is a valid value, and you need another value
> which is truly invalid?

....then you are using the wrong data type; a pointer does not have a
value which means "nothing" other than nullptr. If you need to accept a
pointer-which-may-be-meaningfully-null or "nothing", use something like
optional<T*>. In such cases, 'none' would apply to the outermost object,
i.e. the optional, not the T* (or the Foo as in the above problem case).

> We're talking about something that has to work for *everyone*. As things
> currently stand, having std::none work the way it currently does allows
> everyone to do what they need to. If someone ever needed to write
> optional<T*>, then they must specifically want to differentiate between
> NULL and std::none.

  using Ptr = T*;
  optional<Ptr> op = std::none; // disengaged
  optional<Ptr> op = Ptr{std::none}; // engaged, value is nullptr

For that matter, I could live with none != nullptr if it is usable in
other generic contexts (optional, any, none_t available as a ctor type
so that user classes can define what it means to be assigned a value of
'none', etc.).

Also:

  optional<any> op = std::none; // disengaged
  optional<any> op = Any{std::none}; // engaged, value is std::none
  optional<any> op = Any{}; // ditto

As Miro points out, I don't see that there is a real issue here. Whether
or not we have 'none' or 'nullopt', there will exist such questionable
cases. The only sane answer is that 'none' applies to the outermost
location.

For that matter, what about this?

  template <typename T> class Foo { Foo(int); Foo(T); };
  Foo<Foo<int>> foo = 5; // Foo(int)? Foo(Foo)?

Even without std::none, such "pathological" cases exist today, but I
don't hear anyone complaining about them. Presumably because they
already work in a sane manner.

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Tue, 03 Feb 2015 16:06:51 -0500
Raw View
On 2015-02-03 15:35, Tony V E wrote:
> In your opinion, what classes, besides optional, would support std::none?

optional, any, expected, flags... and part of the value is not for the
standard library itself, but having it available for user types. Note
that I did *not* include pointers in that list :-) (although I could
probably be convinced to do so).

(Yes, flags aren't in the standard library yet, but they should be, darn
it.)

> (And what happens if you put one in an optional?)

If you mean optional<none_t>... about the same as optional<nullptr_t>...
IOW, why on earth are you not using a 'bool'? (Or 'a compile error'.)

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Feb 2015 16:14:57 -0500
Raw View
--089e0112c4ae18a680050e35900d
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 3, 2015 at 4:06 PM, Matthew Woehlke <mwoehlke.floss@gmail.com>
wrote:

> On 2015-02-03 15:35, Tony V E wrote:
> > In your opinion, what classes, besides optional, would support std::none?
>
> optional, any, expected, flags... and part of the value is not for the
> standard library itself, but having it available for user types. Note
> that I did *not* include pointers in that list :-) (although I could
> probably be convinced to do so).
>
> (Yes, flags aren't in the standard library yet, but they should be, darn
> it.)
>
> > (And what happens if you put one in an optional?)
>
> If you mean optional<none_t>... about the same as optional<nullptr_t>...
> IOW, why on earth are you not using a 'bool'? (Or 'a compile error'.)
>

No, I meant a type from the list of type that support none_t. Same question
as always.


>
> --
> Matthew
>
> --
>
> ---
> 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.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0112c4ae18a680050e35900d
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, Feb 3, 2015 at 4:06 PM, Matthew Woehlke <span dir=3D"ltr">&lt;<=
a href=3D"mailto:mwoehlke.floss@gmail.com" target=3D"_blank">mwoehlke.floss=
@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span cl=
ass=3D"">On 2015-02-03 15:35, Tony V E wrote:<br>
&gt; In your opinion, what classes, besides optional, would support std::no=
ne?<br>
<br>
</span>optional, any, expected, flags... and part of the value is not for t=
he<br>
standard library itself, but having it available for user types. Note<br>
that I did *not* include pointers in that list :-) (although I could<br>
probably be convinced to do so).<br>
<br>
(Yes, flags aren&#39;t in the standard library yet, but they should be, dar=
n<br>
it.)<br>
<span class=3D""><br>
&gt; (And what happens if you put one in an optional?)<br>
<br>
</span>If you mean optional&lt;none_t&gt;... about the same as optional&lt;=
nullptr_t&gt;...<br>
IOW, why on earth are you not using a &#39;bool&#39;? (Or &#39;a compile er=
ror&#39;.)<br></blockquote><div><br></div><div>No, I meant a type from the =
list of type that support none_t. Same question as always.<br>=C2=A0<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex">
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
Matthew<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<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 <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-propo=
sals+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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0112c4ae18a680050e35900d--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 3 Feb 2015 16:25:33 -0500
Raw View
--089e0160b7da0c83bf050e35b647
Content-Type: text/plain; charset=UTF-8

On Tue, Feb 3, 2015 at 4:03 PM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:

>
>
> For that matter, what about this?
>
>   template <typename T> class Foo { Foo(int); Foo(T); };
>   Foo<Foo<int>> foo = 5; // Foo(int)? Foo(Foo)?
>
> Even without std::none, such "pathological" cases exist today, but I
> don't hear anyone complaining about them. Presumably because they
> already work in a sane manner.
>
>
The above doesn't compile (because the constructors are private :-).
Fixing that, it does compile, but you can't instantiate a Foo<int> because
Foo<int> would have two constructors both taking ints.
Luckily, you don't actually instantiate one.  But assuming a real Foo<T>
would have a T member, ie:

template <typename T> struct Foo
{
    T t;
    Foo(int) {}
    Foo(T) {}
};

It again doesn't compile.  So maybe that's why there aren't more complaints.

However, without the T t member

template <typename T> struct Foo
{
    // T t;
    Foo(int) {}
    Foo(T) {}
};

Foo<Foo<int>> foo = 5;

does compile, and calls the "outer" constructor, so that's a good enough
excuse for optional in my mind.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--089e0160b7da0c83bf050e35b647
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, Feb 3, 2015 at 4:03 PM, Matthew Woehlke <span dir=3D"ltr">&lt;<=
a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank">mw_triad=
@users.sourceforge.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_=
quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,=
204);padding-left:1ex"><br>
<br>
For that matter, what about this?<br>
<br>
=C2=A0 template &lt;typename T&gt; class Foo { Foo(int); Foo(T); };<br>
=C2=A0 Foo&lt;Foo&lt;int&gt;&gt; foo =3D 5; // Foo(int)? Foo(Foo)?<br>
<br>
Even without std::none, such &quot;pathological&quot; cases exist today, bu=
t I<br>
don&#39;t hear anyone complaining about them. Presumably because they<br>
already work in a sane manner.<br>
<span class=3D""><font color=3D"#888888"><br></font></span></blockquote><di=
v><br></div><div>The above doesn&#39;t compile (because the constructors ar=
e private :-).<br></div><div>Fixing that, it does compile, but you can&#39;=
t instantiate a Foo&lt;int&gt; because Foo&lt;int&gt; would have two constr=
uctors both taking ints.<br></div><div>Luckily, you don&#39;t actually inst=
antiate one.=C2=A0 But assuming a real Foo&lt;T&gt; would have a T member, =
ie:<br><br></div><div>template &lt;typename T&gt; struct Foo<br>{<br></div>=
<div>=C2=A0 =C2=A0 T t;<br></div><div>=C2=A0 =C2=A0 Foo(int) {}<br></div><d=
iv>=C2=A0 =C2=A0 Foo(T) {}<br>};<br><br></div><div>It again doesn&#39;t com=
pile.=C2=A0 So maybe that&#39;s why there aren&#39;t more complaints.<br><b=
r>However, without the T t member<br></div><div><br><div>template &lt;typen=
ame T&gt; struct Foo<br>{<br></div><div>=C2=A0 =C2=A0 // T t;<br></div><div=
>=C2=A0 =C2=A0 Foo(int) {}<br></div><div>=C2=A0 =C2=A0 Foo(T) {}<br>};<br><=
br></div><div>Foo&lt;Foo&lt;int&gt;&gt; foo =3D 5;<br><br>does compile, and=
 calls the &quot;outer&quot; constructor, so that&#39;s a good enough excus=
e for optional in my mind.<br><br></div></div></div><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--089e0160b7da0c83bf050e35b647--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Tue, 03 Feb 2015 16:51:50 -0500
Raw View
On 2015-02-03 16:25, Tony V E wrote:
> On Tue, Feb 3, 2015 at 4:03 PM, Matthew Woehlke wrote:
>> For that matter, what about this?
>>
>>   template <typename T> class Foo { Foo(int); Foo(T); };
>>   Foo<Foo<int>> foo = 5; // Foo(int)? Foo(Foo)?
>>
>> Even without std::none, such "pathological" cases exist today, but I
>> don't hear anyone complaining about them. Presumably because they
>> already work in a sane manner.
>
> The above doesn't compile (because the constructors are private :-).

We'll assume a working example where the constructor would be ambiguous,
since otherwise the question is moot. (Above is obviously not meant to
be complete, merely for illustrative purposes.)

Eliding your (successful, as I understood it) efforts to find such an
example...

> Foo<Foo<int>> foo = 5;
>
> does compile, and calls the "outer" constructor, so that's a good enough
> excuse for optional in my mind.

Right :-). Thus, I would expect e.g. 'optional<any> op = none' to also
call the outer constructor (given both optional<T> and any both having
constructors which take a none_t).

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Bjorn Reese <breese@mail1.stofanet.dk>
Date: Wed, 04 Feb 2015 00:01:20 +0100
Raw View
On 02/03/2015 10:06 PM, Matthew Woehlke wrote:
> On 2015-02-03 15:35, Tony V E wrote:
>> In your opinion, what classes, besides optional, would support std::none?
>
> optional, any, expected, flags... and part of the value is not for the

Expected is either a value or an error, so does std::none mean here?

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Tue, 3 Feb 2015 17:37:25 -0800 (PST)
Raw View
------=_Part_5453_393786785.1423013845241
Content-Type: multipart/alternative;
 boundary="----=_Part_5454_1977379088.1423013845241"

------=_Part_5454_1977379088.1423013845241
Content-Type: text/plain; charset=UTF-8



On Tuesday, February 3, 2015 at 3:15:03 PM UTC-5, Ville Voutilainen wrote:
>
> On 3 February 2015 at 22:10, Nicol Bolas <jmck...@gmail.com <javascript:>>
> wrote:
> >> But you are OK with having the above problems with
> std::optional<std::any>
> >> for example? (assuming 'any' has 'none' support)?
> > It is a sticky issue: to have std::any which could store any value, and
> then
> > wrap it in something who's comparison to a certain value has a special
> > meaning.
>
> That works just fine today.
>
> > My suggested means of resolving that problem is to make it so that
> std::any
> > cannot store a std::none object. After all, objects of std::none has no
> > values. So its highly unlikely that any user would need to store one
> inside
> > a std::any. And if they did, they could simply use a conditional switch
> or
> > something.
> >
> > Similarly, optional<std::none> should be outlawed.
>
> So, what does assigning none to an optional<any> mean? What is it
> assigning
> to?
>

The whole point is to make the statement:

  optional<T> a = std::none;

mean the same thing no matter what T is. And when I say "mean the same
thing", I mean both conceptually *and* semantically. Semantically, it'll
always mean the same. It's the conceptual part. You don't ever want this to
work, for any T which is itself not an optional:

  optional<T> a = std::none;
  T b = std::none;

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_5454_1977379088.1423013845241
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Tuesday, February 3, 2015 at 3:15:03 PM UTC-5, =
Ville Voutilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: =
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 3 F=
ebruary 2015 at 22:10, Nicol Bolas &lt;<a href=3D"javascript:" target=3D"_b=
lank" gdf-obfuscated-mailto=3D"9hBsdSLazoUJ" rel=3D"nofollow" onmousedown=
=3D"this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'javascr=
ipt:';return true;">jmck...@gmail.com</a>&gt; wrote:
<br>&gt;&gt; But you are OK with having the above problems with std::option=
al&lt;std::any&gt;
<br>&gt;&gt; for example? (assuming 'any' has 'none' support)?
<br>&gt; It is a sticky issue: to have std::any which could store any value=
, and then
<br>&gt; wrap it in something who's comparison to a certain value has a spe=
cial
<br>&gt; meaning.
<br>
<br>That works just fine today.
<br>
<br>&gt; My suggested means of resolving that problem is to make it so that=
 std::any
<br>&gt; cannot store a std::none object. After all, objects of std::none h=
as no
<br>&gt; values. So its highly unlikely that any user would need to store o=
ne inside
<br>&gt; a std::any. And if they did, they could simply use a conditional s=
witch or
<br>&gt; something.
<br>&gt;
<br>&gt; Similarly, optional&lt;std::none&gt; should be outlawed.
<br>
<br>So, what does assigning none to an optional&lt;any&gt; mean? What is it=
 assigning
<br>to?
<br></blockquote><div><br>The whole point is to make the statement:<br><br>=
&nbsp; optional&lt;T&gt; a =3D std::none;<br><br>mean the same thing no mat=
ter what T is. And when I say "mean the same thing", I mean both conceptual=
ly <i>and</i> semantically. Semantically, it'll always mean the same. It's =
the conceptual part. You don't ever want this to work, for any T which is i=
tself not an optional:<br><br>&nbsp; optional&lt;T&gt; a =3D std::none;<br>=
&nbsp; T b =3D std::none;<br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

------=_Part_5454_1977379088.1423013845241--
------=_Part_5453_393786785.1423013845241--

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Wed, 04 Feb 2015 11:59:16 -0500
Raw View
On 2015-02-03 20:37, Nicol Bolas wrote:
> The whole point is to make the statement:
>
>   optional<T> a = std::none;
>
> mean the same thing no matter what T is. And when I say "mean the same
> thing", I mean both conceptually *and* semantically. Semantically, it'll
> always mean the same. It's the conceptual part. You don't ever want this to
> work, for any T which is itself not an optional:
>
>   optional<T> a = std::none;
>   T b = std::none;

....but then that isn't "a generic none", it's nullopt. The above should
work for std::optional, std::any, std::expected, std::flags, user types
for which 'none' makes sense as a meaningful value for assignment, and
possibly others.

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Matthew Woehlke <mw_triad@users.sourceforge.net>
Date: Wed, 04 Feb 2015 12:03:40 -0500
Raw View
On 2015-02-03 18:01, Bjorn Reese wrote:
> On 02/03/2015 10:06 PM, Matthew Woehlke wrote:
>> On 2015-02-03 15:35, Tony V E wrote:
>>> In your opinion, what classes, besides optional, would support
>>> std::none?
>>
>> optional, any, expected, flags... and part of the value is not for the
>
> Expected is either a value or an error, so does std::none mean here?

Maybe not; I was thinking that based on something that Tony said, but I
may have misread. Still, *definitely* std::any, and I can certainly
imagine other (user) types where it would be meaningful.

--
Matthew

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Wed, 4 Feb 2015 12:17:46 -0500
Raw View
--001a11c26986bb34c3050e465dc2
Content-Type: text/plain; charset=UTF-8

On Wed, Feb 4, 2015 at 12:03 PM, Matthew Woehlke <
mw_triad@users.sourceforge.net> wrote:

> On 2015-02-03 18:01, Bjorn Reese wrote:
> > On 02/03/2015 10:06 PM, Matthew Woehlke wrote:
> >> On 2015-02-03 15:35, Tony V E wrote:
> >>> In your opinion, what classes, besides optional, would support
> >>> std::none?
> >>
> >> optional, any, expected, flags... and part of the value is not for the
> >
> > Expected is either a value or an error, so does std::none mean here?
>
> Maybe not; I was thinking that based on something that Tony said, but I
> may have misread. Still, *definitely* std::any, and I can certainly
> imagine other (user) types where it would be meaningful.
>
>
I might have, since expected and optional are very close (optional<T> may
be equivalent to expected<T, nullopt> eventually).
But no, expected doesn't have a none.  It is either a value or an error.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a11c26986bb34c3050e465dc2
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 Wed, Feb 4, 2015 at 12:03 PM, Matthew Woehlke <span dir=3D"ltr">&lt;=
<a href=3D"mailto:mw_triad@users.sourceforge.net" target=3D"_blank">mw_tria=
d@users.sourceforge.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmail=
_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:=
1ex"><span class=3D"">On 2015-02-03 18:01, Bjorn Reese wrote:<br>
&gt; On 02/03/2015 10:06 PM, Matthew Woehlke wrote:<br>
&gt;&gt; On 2015-02-03 15:35, Tony V E wrote:<br>
&gt;&gt;&gt; In your opinion, what classes, besides optional, would support=
<br>
&gt;&gt;&gt; std::none?<br>
&gt;&gt;<br>
&gt;&gt; optional, any, expected, flags... and part of the value is not for=
 the<br>
&gt;<br>
&gt; Expected is either a value or an error, so does std::none mean here?<b=
r>
<br>
</span>Maybe not; I was thinking that based on something that Tony said, bu=
t I<br>
may have misread. Still, *definitely* std::any, and I can certainly<br>
imagine other (user) types where it would be meaningful.<br>
<span class=3D"HOEnZb"></span><br></blockquote></div><br></div><div class=
=3D"gmail_extra">I might have, since expected and optional are very close (=
optional&lt;T&gt; may be equivalent to expected&lt;T, nullopt&gt; eventuall=
y).<br></div><div class=3D"gmail_extra">But no, expected doesn&#39;t have a=
 none.=C2=A0 It is either a value or an error.<br><br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

--001a11c26986bb34c3050e465dc2--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Thu, 05 Feb 2015 07:50:47 +0100
Raw View
This is a multi-part message in MIME format.
--------------050707090305050501070407
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 03/02/15 22:51, Matthew Woehlke a =C3=A9crit :


To those that want a universal none, please, make a concrete proposal=20
independent from this one, and start a new thread.
If you find that there is an issue with

   optional<optional<int>> ooi =3D nullopt;

please create an issue for the Fundamental TS or write a proposal.

I don't want the universal none to be part of this proposal, neither I=20
want to solve this possible issue.

This doesn't mean that I will be against something more in line with the=20
generic make factory proposal, but I don't have time now to write a=20
proposal.

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/.

--------------050707090305050501070407
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div class=3D"moz-cite-prefix">Le 03/02/15 22:51, Matthew Woehlke a
      =C3=A9crit=C2=A0:<br>
    </div>
    <font size=3D"+1"><br>
      <br>
      To those that want a universal none</font>, please, make a
    concrete proposal independent from this one, and start a new thread.<br=
>
    If you find that there is an issue with <br>
    <br>
    =C2=A0 optional&lt;optional&lt;int&gt;&gt; ooi =3D nullopt; <br>
    <br>
    please create an issue for the Fundamental TS or write a proposal. <br>
    <br>
    I don't want the universal none to be part of this proposal, neither
    I want to solve this possible issue. <br>
    <br>
    This doesn't mean that I will be against something more in line with
    the generic make factory proposal, but I don't have time now to
    write a proposal.<br>
    <br>
    Vicente<br>
    =C2=A0=C2=A0 <br>
    <br>
    <br>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------050707090305050501070407--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Thu, 5 Feb 2015 09:07:32 +0200
Raw View
On 5 February 2015 at 08:50, Vicente J. Botet Escriba
<vicente.botet@wanadoo.fr> wrote:
> To those that want a universal none, please, make a concrete proposal
> independent from this one, and start a new thread.
> If you find that there is an issue with
>
>   optional<optional<int>> ooi = nullopt;
>
> please create an issue for the Fundamental TS or write a proposal.

In other words, write a proposal, since this sort of thing is not issue-level
material. Filing an issue for the Fundamentals TSv1 is a waste of time,
there is no sane outcome for such an issue besides rejecting it and
recommending a paper.

--

---
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.


Author: =?UTF-8?Q?Andrzej_Krzemie=C5=84ski?= <akrzemi1@gmail.com>
Date: Thu, 5 Feb 2015 14:04:19 -0800 (PST)
Raw View
------=_Part_916_1439292539.1423173859280
Content-Type: multipart/alternative;
 boundary="----=_Part_917_933903165.1423173859280"

------=_Part_917_933903165.1423173859280
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



W dniu sobota, 24 stycznia 2015 10:44:58 UTC+1 u=C5=BCytkownik Vicente J. B=
otet=20
Escriba napisa=C5=82:
>
> =20
> Hi,
>
> I have written a draft proposal for an some coherency issues between any=
=20
> and optional [1].
>
> Any comments or contributions are welcome.
>

Regarding the in-place construction for Any, I was wondering whether the=20
following syntax could be possible:

optional(in_place, 1);
any(in_place.type<double>, 1);=20

But it looks, it does not work. Operator. (dot) works for static member=20
functions but not for static data member templates. Perhaps with the slight=
=20
modification of the language....

--=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/.

------=_Part_917_933903165.1423173859280
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>W dniu sobota, 24 stycznia 2015 10:44:58 UTC+1 u=
=C5=BCytkownik Vicente J. Botet Escriba napisa=C5=82:<blockquote class=3D"g=
mail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc sol=
id;padding-left: 1ex;">
 =20

   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <br>
    <font size=3D"+1">Hi,<br>
      <br>
      I have written a draft proposal for an some coherency issues
      between any and optional </font><font size=3D"+1">[1].<br>
      <br>
      Any comments or contributions are welcome.<br></font></div></blockquo=
te><div><br>Regarding the in-place construction for Any, I was wondering wh=
ether the following syntax could be possible:<br><br>optional(in_place, 1);=
<br>any(in_place.type&lt;double&gt;, 1); <br><br>But it looks, it does not =
work. Operator. (dot) works for static member functions but not for static =
data member templates. Perhaps with the slight modification of the language=
.....<br></div></div>

<p></p>

-- <br />
<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 <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 />
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 />

------=_Part_917_933903165.1423173859280--
------=_Part_916_1439292539.1423173859280--

.


Author: =?UTF-8?B?VsOhY2xhdiBaZW1hbg==?= <vhaisman@gmail.com>
Date: Fri, 13 Feb 2015 06:47:48 +0100
Raw View
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Rv8i6rr7XV2TigFV7wRDUi9TpaBu9wDqm
Content-Type: multipart/alternative;
 boundary="------------060502000703020007000408"

This is a multi-part message in MIME format.
--------------060502000703020007000408
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 24.1.2015 10:44, Vicente J. Botet Escriba wrote:

>
> Hi,
>
> [...]
> P.S.[...] are there some .md to html/pdf converters? --

You can use Pandoc <http://johnmacfarlane.net/pandoc/> to convert
Markdown to both.

=E2=80=8B
--=20
VZ

--=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/.

--------------060502000703020007000408
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
  </head>
  <body bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div style=3D"" class=3D"markdown-here-wrapper"
      data-md-url=3D"Thunderbird">
      <p style=3D"margin: 1.2em 0px ! important;">On 24.1.2015 10:44,
        Vicente J. Botet Escriba wrote:</p>
      <p style=3D"margin: 1.2em 0px ! important;"></p>
      <div class=3D"markdown-here-exclude">
        <p></p>
        <blockquote cite=3D"mid:54C36998.3070600@wanadoo.fr" type=3D"cite">
          <meta http-equiv=3D"content-type" content=3D"text/html;
            charset=3Dutf-8">
          <br>
          <font size=3D"+1">Hi,<br>
            <br>
            [...]</font><br>
          P.S.<font size=3D"+1"> [...] are there some .md to html/pdf
            converters?</font> -- <br>
        </blockquote>
        <p></p>
      </div>
      <p style=3D"margin: 1.2em 0px ! important;"></p>
      <p style=3D"margin: 1.2em 0px ! important;">You can use <a
          href=3D"http://johnmacfarlane.net/pandoc/">Pandoc</a> to convert
        Markdown to both.</p>
      <div
title=3D"MDH:PGRpdiBjbGFzcz0ibW96LWNpdGUtcHJlZml4Ij5PbiAyNC4xLjIwMTUgMTA6ND=
QsIFZpY2VudGUgSi4gQm90ZXQgRXNjcmliYSB3cm90ZTo8YnI+PC9kaXY+PGJsb2NrcXVvdGUgY=
2l0ZT0ibWlkOjU0
QzM2OTk4LjMwNzA2MDBAd2FuYWRvby5mciIgdHlwZT0iY2l0ZSI+CiAgCgogICAgPG1ldGEgaHR=
0
cC1lcXVpdj0iY29udGVudC10eXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7ICI+CiAgCiAgCiAgICA=
8
YnI+CiAgICA8Zm9udCBzaXplPSIrMSI+SGksPGJyPgogICAgICA8YnI+CiAgICAgIFsuLi5dPC9=
m
b250Pjxicj4KICAgIFAuUy48Zm9udCBzaXplPSIrMSI+IFsuLi5dIGFyZQogICAgICB0aGVyZSB=
z
b21lIC5tZCB0byBodG1sL3BkZiBjb252ZXJ0ZXJzPzwvZm9udD4KICAKCgoKCi0tIDxicj48L2J=
s
b2NrcXVvdGU+WW91IGNhbiB1c2UgW1BhbmRvY10oaHR0cDovL2pvaG5tYWNmYXJsYW5lLm5ldC9=
w
        YW5kb2MvKSB0byBjb252ZXJ0IE1hcmtkb3duIHRvIGJvdGguPGJyPjxicj4=3D"
style=3D"height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-siz=
e:0em;padding:0;margin:0;">=E2=80=8B</div>
    </div>
    -- <br>
    VZ<br>
    <br>
  </body>
</html>

<p></p>

-- <br />
<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 <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 />
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 />

--------------060502000703020007000408--
--Rv8i6rr7XV2TigFV7wRDUi9TpaBu9wDqm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREKAAYFAlTdkAUACgkQonnuNA9W3VLU9QD/SpyKxhoF3i1SuytK54gNZqae
1+h7weMJHxIBmXnBQUYA/2C28ZPzrsVJFyh+unBMgCqaTMQnMdPWG7QRx84acceb
=Ob/K
-----END PGP SIGNATURE-----

--Rv8i6rr7XV2TigFV7wRDUi9TpaBu9wDqm--

.