Topic: Null coalescing operator


Author: philippe.groarke@gmail.com
Date: Thu, 11 May 2017 14:19:31 -0700 (PDT)
Raw View
------=_Part_7156_1566571378.1494537571176
Content-Type: multipart/alternative;
 boundary="----=_Part_7157_345114772.1494537571177"

------=_Part_7157_345114772.1494537571177
Content-Type: text/plain; charset="UTF-8"

I've decided to dip my toe into the standardization process. As such, I've
come up with (what I think is) a small feature I really like. I have to do
a lot of programming in [other language] at work, and something I greatly
miss when getting back to C++ is the null coalescing operator. It is a
quality of life feature that simplifies and compacts patterns of code that
are used throughout codebases.

Consider the following conditional operator use case:

Test* get_test() { /*...*/ }

Test* test = (get_test() != nullptr) ? get_test() : new Test();


If `get_test()` has side effects, we may have a problem. We would use the
following instead.

Test* test = get_test();
test = test != nullptr ? test : new Test();


We could instead use a shortcut without side effect, the null coalescing
operator ??.
The left hand side expression is evaluated and compared to nullptr. If it
is not nullptr, the evaluation is complete. If it is nullptr, the right
hand side expression is evaluated.

Test* test = get_test() ?? new Test();


It can also be a concise way to throw on a null value.

some_pointer ?? throw std::invalid_argument("some_pointer is null.");


These are the most interesting aspects of the feature. I'd like to gather
thoughts and comments. Maybe it has already been mentioned in a paper that
didn't go through? I'm simply interested in getting the discussion started
before writing a paper. If the general consensus is that this feature is
desired, maybe you could point me to a committee member that could mentor
me?

Thank you,
Philippe

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-48d3-934f-457fd6d949d7%40isocpp.org.

------=_Part_7157_345114772.1494537571177
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>I&#39;ve decided to dip my toe into the standard=
ization process. As such, I&#39;ve come up with (what I think is) a small f=
eature I really like. I have to do a lot of programming in [other language]=
 at work, and something I greatly miss when getting back to C++ is the null=
 coalescing operator. It is a quality of life feature that simplifies and c=
ompacts patterns of code that are used throughout codebases.</div><div><br>=
</div><div>Consider the following conditional operator use case:</div><div>=
<br></div><div class=3D"prettyprint" style=3D"background-color: rgb(250, 25=
0, 250); border: 1px solid rgb(187, 187, 187); word-wrap: break-word;"><cod=
e class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color:=
 #606;" class=3D"styled-by-prettify">Test</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">*</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> get_test</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: rgb(136, 0, 0); font-family: Arial, Helvetica, =
sans-serif;"><span style=3D"color: #800;" class=3D"styled-by-prettify">/*..=
..*/</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span></span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">Test</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">*</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> test </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-by=
-prettify">get_test</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">()</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">!=3D</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #008;" class=3D"styled-by-prettify">nullptr</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"col=
or: #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-by-prettify"> get_test</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">()</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">:</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">new</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #606;" class=3D"styled-by-prettify">Test</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">();</span></div></code></div><div=
><br></div><div><br></div><div>If `get_test()`=C2=A0has side effects, we ma=
y have a problem. We would use the following instead.</div><div><br></div><=
div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); bo=
rder: 1px solid rgb(187, 187, 187); word-wrap: break-word;"><code class=3D"=
prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #606;" cla=
ss=3D"styled-by-prettify">Test</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">*</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> test </span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 get_test</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(=
);</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>test=
 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> test </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">!=3D</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #008;" class=3D"styled-by-prettify">nullptr</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">?</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> test </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">:</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">new=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">Test</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">();</span></div></code></=
div><div><br></div><div><br></div><div>We could instead use a shortcut with=
out side effect, the null coalescing operator ??.=C2=A0</div><div>The left =
hand side expression is evaluated and compared to nullptr. If it is not nul=
lptr, the evaluation is complete. If it is nullptr, the right hand side exp=
ression is evaluated.</div><div><br></div><div><div class=3D"prettyprint" s=
tyle=3D"background-color: rgb(250, 250, 250); border: 1px solid rgb(187, 18=
7, 187); word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"=
subprettyprint"><span style=3D"color: #606;" class=3D"styled-by-prettify">T=
est</span><span style=3D"color: #660;" class=3D"styled-by-prettify">*</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> test </span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> get_test</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">()</span><span style=3D"colo=
r: #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-by-prettify"> </span><span style=3D"color: #008;" class=3D"style=
d-by-prettify">new</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #606;" class=3D"styled-by-prettify">T=
est</span><span style=3D"color: #660;" class=3D"styled-by-prettify">();</sp=
an></div></code></div><br></div><div><br></div><div>It can also be a concis=
e way to throw on a null value.</div><div><br></div><div><div class=3D"pret=
typrint" style=3D"background-color: rgb(250, 250, 250); border: 1px solid r=
gb(187, 187, 187); word-wrap: break-word;"><code class=3D"prettyprint"><div=
 class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">some_pointer </span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">??</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">throw=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify">invalid_argument</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span styl=
e=3D"color: #080;" class=3D"styled-by-prettify">&quot;some_pointer is null.=
&quot;</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</=
span></div></code></div><br></div><div><br></div><div>These are the most in=
teresting aspects of the feature. I&#39;d like to gather thoughts and comme=
nts. Maybe it has already been mentioned in a paper that didn&#39;t go thro=
ugh? I&#39;m simply interested in getting the discussion started before wri=
ting a paper. If the general consensus is that this feature is desired, may=
be you could point me to a committee member that could mentor me?</div></di=
v><div><br></div><div>Thank you,</div><div>Philippe</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-48d3-934f-457fd6d949d7%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-48d3-934f-457fd6d949d7=
%40isocpp.org</a>.<br />

------=_Part_7157_345114772.1494537571177--

------=_Part_7156_1566571378.1494537571176--

.


Author: Shahms King <shahms.king@gmail.com>
Date: Thu, 11 May 2017 21:58:51 +0000
Raw View
--001a113e190a59e7e9054f46b253
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

This is typically spelled '?:' and exists as an extension in both Clang and
GCC.  I seem to recall that it's been proposed previously and rejected due
to "insufficient cause".

From
https://botondballo.wordpress.com/2014/11/23/trip-report-c-standards-meetin=
g-in-urbana-champaign-november-2014/
"""
A proposal for a null-coalescing conditional operator, a ?: b, which would
have been equivalent to a ? a : b. EWG felt the utility wasn=E2=80=99t suff=
iciently
compelling to warrant a language change.
"""
(Although the referenced link is to a paper that has nothing to do with the
operator in question).

--Shahms

On Thu, May 11, 2017 at 2:19 PM <philippe.groarke@gmail.com> wrote:

> I've decided to dip my toe into the standardization process. As such, I'v=
e
> come up with (what I think is) a small feature I really like. I have to d=
o
> a lot of programming in [other language] at work, and something I greatly
> miss when getting back to C++ is the null coalescing operator. It is a
> quality of life feature that simplifies and compacts patterns of code tha=
t
> are used throughout codebases.
>
> Consider the following conditional operator use case:
>
> Test* get_test() { /*...*/ }
>
> Test* test =3D (get_test() !=3D nullptr) ? get_test() : new Test();
>
>
> If `get_test()` has side effects, we may have a problem. We would use the
> following instead.
>
> Test* test =3D get_test();
> test =3D test !=3D nullptr ? test : new Test();
>
>
> We could instead use a shortcut without side effect, the null coalescing
> operator ??.
> The left hand side expression is evaluated and compared to nullptr. If it
> is not nullptr, the evaluation is complete. If it is nullptr, the right
> hand side expression is evaluated.
>
> Test* test =3D get_test() ?? new Test();
>
>
> It can also be a concise way to throw on a null value.
>
> some_pointer ?? throw std::invalid_argument("some_pointer is null.");
>
>
> These are the most interesting aspects of the feature. I'd like to gather
> thoughts and comments. Maybe it has already been mentioned in a paper tha=
t
> didn't go through? I'm simply interested in getting the discussion starte=
d
> before writing a paper. If the general consensus is that this feature is
> desired, maybe you could point me to a committee member that could mentor
> me?
>
> Thank you,
> Philippe
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53e=
c-48d3-934f-457fd6d949d7%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53=
ec-48d3-934f-457fd6d949d7%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFmGaCokpypC%2BvxJ3zUX6poqfmdN5hc-ietrny9HQJKqV=
oYdJw%40mail.gmail.com.

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

<div dir=3D"ltr">This is typically spelled &#39;?:&#39; and exists as an ex=
tension in both Clang and GCC.=C2=A0 I seem to recall that it&#39;s been pr=
oposed previously and rejected due to &quot;insufficient cause&quot;.<div><=
br><div>From=C2=A0<a href=3D"https://botondballo.wordpress.com/2014/11/23/t=
rip-report-c-standards-meeting-in-urbana-champaign-november-2014/">https://=
botondballo.wordpress.com/2014/11/23/trip-report-c-standards-meeting-in-urb=
ana-champaign-november-2014/</a></div><div>&quot;&quot;&quot;</div><div><di=
v>A proposal for a null-coalescing conditional operator, a ?: b, which woul=
d have been equivalent to a ? a : b. EWG felt the utility wasn=E2=80=99t su=
fficiently compelling to warrant a language change.</div><div>&quot;&quot;&=
quot;</div><div>(Although the referenced link is to a paper that has nothin=
g to do with the operator in question).</div></div><div><br></div><div>--Sh=
ahms</div></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Th=
u, May 11, 2017 at 2:19 PM &lt;<a href=3D"mailto:philippe.groarke@gmail.com=
">philippe.groarke@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex"><div dir=3D"ltr"><div><div>I&#39;ve decided to dip my toe into the=
 standardization process. As such, I&#39;ve come up with (what I think is) =
a small feature I really like. I have to do a lot of programming in [other =
language] at work, and something I greatly miss when getting back to C++ is=
 the null coalescing operator. It is a quality of life feature that simplif=
ies and compacts patterns of code that are used throughout codebases.</div>=
<div><br></div><div>Consider the following conditional operator use case:</=
div><div><br></div><div class=3D"m_641087556465575019prettyprint" style=3D"=
background-color:rgb(250,250,250);border:1px solid rgb(187,187,187);word-wr=
ap:break-word"><code class=3D"m_641087556465575019prettyprint"><div class=
=3D"m_641087556465575019subprettyprint"><span style=3D"color:#606" class=3D=
"m_641087556465575019styled-by-prettify">Test</span><span style=3D"color:#6=
60" class=3D"m_641087556465575019styled-by-prettify">*</span><span style=3D=
"color:#000" class=3D"m_641087556465575019styled-by-prettify"> get_test</sp=
an><span style=3D"color:#660" class=3D"m_641087556465575019styled-by-pretti=
fy">()</span><span style=3D"color:#000" class=3D"m_641087556465575019styled=
-by-prettify"> </span><span style=3D"color:#660" class=3D"m_641087556465575=
019styled-by-prettify">{</span><span style=3D"color:#000" class=3D"m_641087=
556465575019styled-by-prettify"> </span><span style=3D"color:rgb(136,0,0);f=
ont-family:Arial,Helvetica,sans-serif"><span style=3D"color:#800" class=3D"=
m_641087556465575019styled-by-prettify">/*...*/</span><span style=3D"color:=
#000" class=3D"m_641087556465575019styled-by-prettify"> </span><span style=
=3D"color:#660" class=3D"m_641087556465575019styled-by-prettify">}</span></=
span><span style=3D"color:#000" class=3D"m_641087556465575019styled-by-pret=
tify"><br><br></span><span style=3D"color:#606" class=3D"m_6410875564655750=
19styled-by-prettify">Test</span><span style=3D"color:#660" class=3D"m_6410=
87556465575019styled-by-prettify">*</span><span style=3D"color:#000" class=
=3D"m_641087556465575019styled-by-prettify"> test </span><span style=3D"col=
or:#660" class=3D"m_641087556465575019styled-by-prettify">=3D</span><span s=
tyle=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify"> </spa=
n><span style=3D"color:#660" class=3D"m_641087556465575019styled-by-prettif=
y">(</span><span style=3D"color:#000" class=3D"m_641087556465575019styled-b=
y-prettify">get_test</span><span style=3D"color:#660" class=3D"m_6410875564=
65575019styled-by-prettify">()</span><span style=3D"color:#000" class=3D"m_=
641087556465575019styled-by-prettify"> </span><span style=3D"color:#660" cl=
ass=3D"m_641087556465575019styled-by-prettify">!=3D</span><span style=3D"co=
lor:#000" class=3D"m_641087556465575019styled-by-prettify"> </span><span st=
yle=3D"color:#008" class=3D"m_641087556465575019styled-by-prettify">nullptr=
</span><span style=3D"color:#660" class=3D"m_641087556465575019styled-by-pr=
ettify">)</span><span style=3D"color:#000" class=3D"m_641087556465575019sty=
led-by-prettify"> </span><span style=3D"color:#660" class=3D"m_641087556465=
575019styled-by-prettify">?</span><span style=3D"color:#000" class=3D"m_641=
087556465575019styled-by-prettify"> get_test</span><span style=3D"color:#66=
0" class=3D"m_641087556465575019styled-by-prettify">()</span><span style=3D=
"color:#000" class=3D"m_641087556465575019styled-by-prettify"> </span><span=
 style=3D"color:#660" class=3D"m_641087556465575019styled-by-prettify">:</s=
pan><span style=3D"color:#000" class=3D"m_641087556465575019styled-by-prett=
ify"> </span><span style=3D"color:#008" class=3D"m_641087556465575019styled=
-by-prettify">new</span><span style=3D"color:#000" class=3D"m_6410875564655=
75019styled-by-prettify"> </span><span style=3D"color:#606" class=3D"m_6410=
87556465575019styled-by-prettify">Test</span><span style=3D"color:#660" cla=
ss=3D"m_641087556465575019styled-by-prettify">();</span></div></code></div>=
<div><br></div><div><br></div><div>If `get_test()`=C2=A0has side effects, w=
e may have a problem. We would use the following instead.</div><div><br></d=
iv><div class=3D"m_641087556465575019prettyprint" style=3D"background-color=
:rgb(250,250,250);border:1px solid rgb(187,187,187);word-wrap:break-word"><=
code class=3D"m_641087556465575019prettyprint"><div class=3D"m_641087556465=
575019subprettyprint"><span style=3D"color:#606" class=3D"m_641087556465575=
019styled-by-prettify">Test</span><span style=3D"color:#660" class=3D"m_641=
087556465575019styled-by-prettify">*</span><span style=3D"color:#000" class=
=3D"m_641087556465575019styled-by-prettify"> test </span><span style=3D"col=
or:#660" class=3D"m_641087556465575019styled-by-prettify">=3D</span><span s=
tyle=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify"> get_t=
est</span><span style=3D"color:#660" class=3D"m_641087556465575019styled-by=
-prettify">();</span><span style=3D"color:#000" class=3D"m_6410875564655750=
19styled-by-prettify"><br>test </span><span style=3D"color:#660" class=3D"m=
_641087556465575019styled-by-prettify">=3D</span><span style=3D"color:#000"=
 class=3D"m_641087556465575019styled-by-prettify"> test </span><span style=
=3D"color:#660" class=3D"m_641087556465575019styled-by-prettify">!=3D</span=
><span style=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify=
"> </span><span style=3D"color:#008" class=3D"m_641087556465575019styled-by=
-prettify">nullptr</span><span style=3D"color:#000" class=3D"m_641087556465=
575019styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_641=
087556465575019styled-by-prettify">?</span><span style=3D"color:#000" class=
=3D"m_641087556465575019styled-by-prettify"> test </span><span style=3D"col=
or:#660" class=3D"m_641087556465575019styled-by-prettify">:</span><span sty=
le=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify"> </span>=
<span style=3D"color:#008" class=3D"m_641087556465575019styled-by-prettify"=
>new</span><span style=3D"color:#000" class=3D"m_641087556465575019styled-b=
y-prettify"> </span><span style=3D"color:#606" class=3D"m_64108755646557501=
9styled-by-prettify">Test</span><span style=3D"color:#660" class=3D"m_64108=
7556465575019styled-by-prettify">();</span></div></code></div><div><br></di=
v><div><br></div><div>We could instead use a shortcut without side effect, =
the null coalescing operator ??.=C2=A0</div><div>The left hand side express=
ion is evaluated and compared to nullptr. If it is not nullptr, the evaluat=
ion is complete. If it is nullptr, the right hand side expression is evalua=
ted.</div><div><br></div><div><div class=3D"m_641087556465575019prettyprint=
" style=3D"background-color:rgb(250,250,250);border:1px solid rgb(187,187,1=
87);word-wrap:break-word"><code class=3D"m_641087556465575019prettyprint"><=
div class=3D"m_641087556465575019subprettyprint"><span style=3D"color:#606"=
 class=3D"m_641087556465575019styled-by-prettify">Test</span><span style=3D=
"color:#660" class=3D"m_641087556465575019styled-by-prettify">*</span><span=
 style=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify"> tes=
t </span><span style=3D"color:#660" class=3D"m_641087556465575019styled-by-=
prettify">=3D</span><span style=3D"color:#000" class=3D"m_64108755646557501=
9styled-by-prettify"> get_test</span><span style=3D"color:#660" class=3D"m_=
641087556465575019styled-by-prettify">()</span><span style=3D"color:#000" c=
lass=3D"m_641087556465575019styled-by-prettify"> </span><span style=3D"colo=
r:#660" class=3D"m_641087556465575019styled-by-prettify">??</span><span sty=
le=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify"> </span>=
<span style=3D"color:#008" class=3D"m_641087556465575019styled-by-prettify"=
>new</span><span style=3D"color:#000" class=3D"m_641087556465575019styled-b=
y-prettify"> </span><span style=3D"color:#606" class=3D"m_64108755646557501=
9styled-by-prettify">Test</span><span style=3D"color:#660" class=3D"m_64108=
7556465575019styled-by-prettify">();</span></div></code></div><br></div><di=
v><br></div><div>It can also be a concise way to throw on a null value.</di=
v><div><br></div><div><div class=3D"m_641087556465575019prettyprint" style=
=3D"background-color:rgb(250,250,250);border:1px solid rgb(187,187,187);wor=
d-wrap:break-word"><code class=3D"m_641087556465575019prettyprint"><div cla=
ss=3D"m_641087556465575019subprettyprint"><span style=3D"color:#000" class=
=3D"m_641087556465575019styled-by-prettify">some_pointer </span><span style=
=3D"color:#660" class=3D"m_641087556465575019styled-by-prettify">??</span><=
span style=3D"color:#000" class=3D"m_641087556465575019styled-by-prettify">=
 </span><span style=3D"color:#008" class=3D"m_641087556465575019styled-by-p=
rettify">throw</span><span style=3D"color:#000" class=3D"m_6410875564655750=
19styled-by-prettify"> std</span><span style=3D"color:#660" class=3D"m_6410=
87556465575019styled-by-prettify">::</span><span style=3D"color:#000" class=
=3D"m_641087556465575019styled-by-prettify">invalid_argument</span><span st=
yle=3D"color:#660" class=3D"m_641087556465575019styled-by-prettify">(</span=
><span style=3D"color:#080" class=3D"m_641087556465575019styled-by-prettify=
">&quot;some_pointer is null.&quot;</span><span style=3D"color:#660" class=
=3D"m_641087556465575019styled-by-prettify">);</span></div></code></div><br=
></div><div><br></div><div>These are the most interesting aspects of the fe=
ature. I&#39;d like to gather thoughts and comments. Maybe it has already b=
een mentioned in a paper that didn&#39;t go through? I&#39;m simply interes=
ted in getting the discussion started before writing a paper. If the genera=
l consensus is that this feature is desired, maybe you could point me to a =
committee member that could mentor me?</div></div><div><br></div><div>Thank=
 you,</div><div>Philippe</div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-48d3-934f-457fd6d949d7%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-=
48d3-934f-457fd6d949d7%40isocpp.org</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAFmGaCokpypC%2BvxJ3zUX6poqfmdN5hc-ie=
trny9HQJKqVoYdJw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFmGaCokpypC%2=
BvxJ3zUX6poqfmdN5hc-ietrny9HQJKqVoYdJw%40mail.gmail.com</a>.<br />

--001a113e190a59e7e9054f46b253--

.


Author: Barry Revzin <barry.revzin@gmail.com>
Date: Thu, 11 May 2017 15:03:44 -0700 (PDT)
Raw View
------=_Part_6669_52441895.1494540224433
Content-Type: multipart/alternative;
 boundary="----=_Part_6670_959992057.1494540224433"

------=_Part_6670_959992057.1494540224433
Content-Type: text/plain; charset="UTF-8"


>
> """
> (Although the referenced link is to a paper that has nothing to do with
> the operator in question).
>

Looks like Botond just swapped some digits. It's 4120, not 4210:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/ac17e384-5098-4caa-8886-aab6998bce39%40isocpp.org.

------=_Part_6670_959992057.1494540224433
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div><div>&quot;&quot;&quot;</div><div>(Although the referenced link is=
 to a paper that has nothing to do with the operator in question).</div></d=
iv></div></blockquote><div><br></div><div>Looks like Botond just swapped so=
me digits. It&#39;s 4120, not 4210: http://www.open-std.org/jtc1/sc22/wg21/=
docs/papers/2014/n4120.pdf=C2=A0</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/ac17e384-5098-4caa-8886-aab6998bce39%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/ac17e384-5098-4caa-8886-aab6998bce39=
%40isocpp.org</a>.<br />

------=_Part_6670_959992057.1494540224433--

------=_Part_6669_52441895.1494540224433--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Fri, 12 May 2017 01:03:44 +0300
Raw View
On 12 May 2017 at 00:58, Shahms King <shahms.king@gmail.com> wrote:
> This is typically spelled '?:' and exists as an extension in both Clang a=
nd
> GCC.  I seem to recall that it's been proposed previously and rejected du=
e
> to "insufficient cause".
>
> From
> https://botondballo.wordpress.com/2014/11/23/trip-report-c-standards-meet=
ing-in-urbana-champaign-november-2014/
> """
> A proposal for a null-coalescing conditional operator, a ?: b, which woul=
d
> have been equivalent to a ? a : b. EWG felt the utility wasn=E2=80=99t su=
fficiently
> compelling to warrant a language change.
> """
> (Although the referenced link is to a paper that has nothing to do with t=
he
> operator in question).


It's linking to N4210, whereas the right paper is
http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFk2RUYe2W8GLTAGjG0u4PZ%3Dsh1v92gZQP2%2BWMvvVQ3=
2F5pM0g%40mail.gmail.com.

.


Author: Philippe Groarke <philippe.groarke@gmail.com>
Date: Thu, 11 May 2017 18:08:29 -0400
Raw View
--Apple-Mail=_DAA313A5-CD29-4F62-AED8-7C073D310DA8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"

I felt it might have already be proposed, thanks for the quick reply. Back =
to the drawing board.

> On May 11, 2017, at 6:03 PM, Ville Voutilainen <ville.voutilainen@gmail.c=
om> wrote:
>=20
> On 12 May 2017 at 00:58, Shahms King <shahms.king@gmail.com <mailto:shahm=
s.king@gmail.com>> wrote:
>> This is typically spelled '?:' and exists as an extension in both Clang =
and
>> GCC.  I seem to recall that it's been proposed previously and rejected d=
ue
>> to "insufficient cause".
>>=20
>> From
>> https://botondballo.wordpress.com/2014/11/23/trip-report-c-standards-mee=
ting-in-urbana-champaign-november-2014/
>> """
>> A proposal for a null-coalescing conditional operator, a ?: b, which wou=
ld
>> have been equivalent to a ? a : b. EWG felt the utility wasn=E2=80=99t s=
ufficiently
>> compelling to warrant a language change.
>> """
>> (Although the referenced link is to a paper that has nothing to do with =
the
>> operator in question).
>=20
>=20
> It's linking to N4210, whereas the right paper is
> http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf <http://ope=
n-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf>
>=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/022EBBEA-016F-4A26-819D-A3015A5A0480%40gmail.com=
..

--Apple-Mail=_DAA313A5-CD29-4F62-AED8-7C073D310DA8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="UTF-8"

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D"">I felt it might ha=
ve already be proposed, thanks for the quick reply. Back to the drawing boa=
rd.<div class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""=
><div class=3D"">On May 11, 2017, at 6:03 PM, Ville Voutilainen &lt;<a href=
=3D"mailto:ville.voutilainen@gmail.com" class=3D"">ville.voutilainen@gmail.=
com</a>&gt; wrote:</div><br class=3D"Apple-interchange-newline"><div class=
=3D""><span style=3D"font-family: Helvetica; font-size: 14px; font-style: n=
ormal; font-variant-caps: normal; font-weight: normal; letter-spacing: norm=
al; text-align: start; text-indent: 0px; text-transform: none; white-space:=
 normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; di=
splay: inline !important;" class=3D"">On 12 May 2017 at 00:58, Shahms King =
&lt;</span><a href=3D"mailto:shahms.king@gmail.com" style=3D"font-family: H=
elvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; f=
ont-weight: normal; letter-spacing: normal; orphans: auto; text-align: star=
t; text-indent: 0px; text-transform: none; white-space: normal; widows: aut=
o; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-w=
idth: 0px;" class=3D"">shahms.king@gmail.com</a><span style=3D"font-family:=
 Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal;=
 font-weight: normal; letter-spacing: normal; text-align: start; text-inden=
t: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webk=
it-text-stroke-width: 0px; float: none; display: inline !important;" class=
=3D"">&gt; wrote:</span><br style=3D"font-family: Helvetica; font-size: 14p=
x; font-style: normal; font-variant-caps: normal; font-weight: normal; lett=
er-spacing: normal; text-align: start; text-indent: 0px; text-transform: no=
ne; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;=
" class=3D""><blockquote type=3D"cite" style=3D"font-family: Helvetica; fon=
t-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: n=
ormal; letter-spacing: normal; orphans: auto; text-align: start; text-inden=
t: 0px; text-transform: none; white-space: normal; widows: auto; word-spaci=
ng: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" c=
lass=3D"">This is typically spelled '?:' and exists as an extension in both=
 Clang and<br class=3D"">GCC. &nbsp;I seem to recall that it's been propose=
d previously and rejected due<br class=3D"">to "insufficient cause".<br cla=
ss=3D""><br class=3D"">From<br class=3D""><a href=3D"https://botondballo.wo=
rdpress.com/2014/11/23/trip-report-c-standards-meeting-in-urbana-champaign-=
november-2014/" class=3D"">https://botondballo.wordpress.com/2014/11/23/tri=
p-report-c-standards-meeting-in-urbana-champaign-november-2014/</a><br clas=
s=3D"">"""<br class=3D"">A proposal for a null-coalescing conditional opera=
tor, a ?: b, which would<br class=3D"">have been equivalent to a ? a : b. E=
WG felt the utility wasn=E2=80=99t sufficiently<br class=3D"">compelling to=
 warrant a language change.<br class=3D"">"""<br class=3D"">(Although the r=
eferenced link is to a paper that has nothing to do with the<br class=3D"">=
operator in question).<br class=3D""></blockquote><br style=3D"font-family:=
 Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal;=
 font-weight: normal; letter-spacing: normal; text-align: start; text-inden=
t: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webk=
it-text-stroke-width: 0px;" class=3D""><br style=3D"font-family: Helvetica;=
 font-size: 14px; font-style: normal; font-variant-caps: normal; font-weigh=
t: normal; letter-spacing: normal; text-align: start; text-indent: 0px; tex=
t-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-str=
oke-width: 0px;" class=3D""><span style=3D"font-family: Helvetica; font-siz=
e: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal=
; letter-spacing: normal; text-align: start; text-indent: 0px; text-transfo=
rm: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width=
: 0px; float: none; display: inline !important;" class=3D"">It's linking to=
 N4210, whereas the right paper is</span><br style=3D"font-family: Helvetic=
a; font-size: 14px; font-style: normal; font-variant-caps: normal; font-wei=
ght: normal; letter-spacing: normal; text-align: start; text-indent: 0px; t=
ext-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-s=
troke-width: 0px;" class=3D""><a href=3D"http://open-std.org/jtc1/sc22/wg21=
/docs/papers/2014/n4120.pdf" style=3D"font-family: Helvetica; font-size: 14=
px; font-style: normal; font-variant-caps: normal; font-weight: normal; let=
ter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; te=
xt-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -=
webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=3D"">=
http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4120.pdf</a><br style=
=3D"font-family: Helvetica; font-size: 14px; font-style: normal; font-varia=
nt-caps: normal; font-weight: normal; letter-spacing: normal; text-align: s=
tart; text-indent: 0px; text-transform: none; white-space: normal; word-spa=
cing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><br style=3D"font-fa=
mily: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: no=
rmal; font-weight: normal; letter-spacing: normal; text-align: start; text-=
indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; =
-webkit-text-stroke-width: 0px;" class=3D""></div></blockquote></div><br cl=
ass=3D""></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/022EBBEA-016F-4A26-819D-A3015A5A0480%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/022EBBEA-016F-4A26-819D-A3015A5A0480%=
40gmail.com</a>.<br />

--Apple-Mail=_DAA313A5-CD29-4F62-AED8-7C073D310DA8--

.


Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Fri, 12 May 2017 01:34:37 +0300
Raw View
On 12 May 2017 at 01:08, Philippe Groarke <philippe.groarke@gmail.com> wrote:
> I felt it might have already be proposed, thanks for the quick reply. Back
> to the drawing board.

The goal was

Test* test = get_test() ?? new Test();

and the shortest work-around I can concoct quickly is

Test* test = []{Test* ret{get_test()}; return ret ? ret : new Test();}();

Not all that pretty, no.

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFk2RUawYTmOQS%3DpCosEpW2wnO0w4zR-UsP4qTrCPA25t%2B4E6w%40mail.gmail.com.

.


Author: raffaele.rossi@mavensecurities.com
Date: Fri, 12 May 2017 02:27:19 -0700 (PDT)
Raw View
------=_Part_1394_1470973911.1494581239239
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thursday, 11 May 2017 23:34:39 UTC+1, Ville Voutilainen wrote:
>
> and the shortest work-around I can concoct quickly is=20
>
> Test* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();}(=
);=20
>
> Not all that pretty, no.=20
>

Well perhaps this is a little prettier?

Test * test =3D [x=3Dget_test()](){ return x ? x : new Test(); };

And you can just define a template function:

template<typename T, typename F>
T coalesce(T&& x, F&& f)
{ return x ? x : f(); }

Test *test =3D coalesce(get_test(), [](){ return new Test(); });

--=20


This e-mail together with any attachments (the "Message") is confidential=
=20
and may contain privileged information. If you are not the intended=20
recipient or if you have received this e-mail in error, please notify the=
=20
sender immediately and permanently delete this Message from your system.=20
 Do not copy, disclose or distribute the information contained in this=20
Message.

Maven Investment Partners Ltd (No. 07511928), Maven Derivatives Ltd (No.=20
07511840) , MVN Asset Management Limited (No. 09659116), Maven Europe Ltd=
=20
(No. 08966593), Maven Derivatives Asia Limited (No.10361312) & Maven=20
Securities Holding Ltd (No. 07505438) are registered as companies in=20
England and Wales and their registered address is Level 3, 6 Bevis Marks,=
=20
London EC3A 7BA, United Kingdom. The companies=E2=80=99 VAT No. is 13553901=
6. Maven=20
Asia (Hong Kong) Ltd (No. 2444041) is registered in Hong Kong and its=20
registered address is 20/F, 198 Wellington St, Hong Kong.  Only Maven=20
Derivatives Ltd and MVN Asset Management Limited are authorised and=20
regulated by the Financial Conduct Authority (Maven Derivatives Ltd FRN:=20
607267, MVN Asset Management Limited FRN: 714429)

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/5951b7f2-e3d8-4253-b36b-87d986586f27%40isocpp.or=
g.

------=_Part_1394_1470973911.1494581239239
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, 11 May 2017 23:34:39 UTC+1, Ville Voutilainen=
  wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0=
..8ex;border-left: 1px #ccc solid;padding-left: 1ex;">and the shortest work-=
around I can concoct quickly is
<br>
<br>Test* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();=
}();
<br>
<br>Not all that pretty, no.
<br></blockquote><div><br></div><div>Well perhaps this is a little prettier=
?</div><div><br></div><div><font face=3D"courier new, monospace">Test * tes=
t =3D [x=3Dget_test()](){ return x ? x : new Test(); };</font></div><div><b=
r></div><div>And you can just define a template function:</div><div><br></d=
iv><div><div><font face=3D"courier new, monospace">template&lt;typename T, =
typename F&gt;</font></div><div><font face=3D"courier new, monospace">T coa=
lesce(T&amp;&amp; x, F&amp;&amp; f)</font></div><div><font face=3D"courier =
new, monospace">{ return x ? x : f(); }</font></div></div><div><font face=
=3D"courier new, monospace"><br></font></div><div><font face=3D"courier new=
, monospace">Test *test =3D coalesce(get_test(), [](){ return new Test(); }=
);</font></div></div>
<br>
<p><font color=3D"#222222" face=3D"Arial, sans-serif" size=3D"2">This e-mai=
l together with any attachments (the &quot;Message&quot;) is confidential a=
nd may contain privileged information. If you are not the intended recipien=
t or if you have received this e-mail in error, please notify the sender im=
mediately and permanently delete this Message from your system. =C2=A0Do no=
t copy, disclose or distribute the information contained in this Message.</=
font></p><p><span style=3D"color:rgb(34,34,34);font-family:Arial,sans-serif=
"><font size=3D"2">Maven Investment Partners Ltd (No. 07511928), Maven Deri=
vatives Ltd (No. 07511840) , MVN Asset Management Limited (No. 09659116), M=
aven Europe Ltd (No. 08966593), Maven Derivatives Asia Limited (No.10361312=
) &amp; Maven Securities Holding Ltd (No. 07505438) are registered as compa=
nies in England and Wales and their registered address is Level 3, 6 Bevis =
Marks, London EC3A 7BA, United Kingdom. The companies=E2=80=99 VAT No. is 1=
35539016. Maven Asia (Hong Kong) Ltd (No. 2444041) is registered in Hong Ko=
ng and its registered address is 20/F, 198 Wellington St, Hong Kong. =C2=A0=
Only Maven Derivatives Ltd and MVN Asset Management Limited are authorised =
and regulated by the Financial Conduct Authority (Maven Derivatives Ltd FRN=
: 607267, MVN Asset Management Limited FRN: 714429)</font></span></p>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/5951b7f2-e3d8-4253-b36b-87d986586f27%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5951b7f2-e3d8-4253-b36b-87d986586f27=
%40isocpp.org</a>.<br />

------=_Part_1394_1470973911.1494581239239--

.


Author: "dgutson ." <danielgutson@gmail.com>
Date: Fri, 12 May 2017 08:07:49 -0300
Raw View
--001a11456cbc53f0d1054f51b72d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

El 11/5/2017 18:19, <philippe.groarke@gmail.com> escribi=C3=B3:

I've decided to dip my toe into the standardization process. As such, I've
come up with (what I think is) a small feature I really like. I have to do
a lot of programming in [other language] at work, and something I greatly
miss when getting back to C++ is the null coalescing operator. It is a
quality of life feature that simplifies and compacts patterns of code that
are used throughout codebases.

Consider the following conditional operator use case:

Test* get_test() { /*...*/ }

Test* test =3D (get_test() !=3D nullptr) ? get_test() : new Test();


If `get_test()` has side effects, we may have a problem. We would use the
following instead.

Test* test =3D get_test();
test =3D test !=3D nullptr ? test : new Test();


We could instead use a shortcut without side effect, the null coalescing
operator ??.
The left hand side expression is evaluated and compared to nullptr. If it
is not nullptr, the evaluation is complete. If it is nullptr, the right
hand side expression is evaluated.

Test* test =3D get_test() ?? new Test();


It can also be a concise way to throw on a null value.

some_pointer ?? throw std::invalid_argument("some_pointer is null.");



What about a library function such as

template <class T, class Func>
T* coalesce(T* x, Func f)
{
     if (x =3D=3D nullptr)
           return f();
     else
           return x;
}

So coalesce(x, [](){return new T;})   or also the throw use case.
?


These are the most interesting aspects of the feature. I'd like to gather
thoughts and comments. Maybe it has already been mentioned in a paper that
didn't go through? I'm simply interested in getting the discussion started
before writing a paper. If the general consensus is that this feature is
desired, maybe you could point me to a committee member that could mentor
me?

Thank you,
Philippe

--=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
email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/
isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-48d3-
934f-457fd6d949d7%40isocpp.org
<https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec=
-48d3-934f-457fd6d949d7%40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter=
>
..

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFdMc-12pufc96%3DQJwL6HcJ8hZHWpeL7V_zGtooD0OwWW=
4h0kw%40mail.gmail.com.

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

<div dir=3D"auto"><div><br><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">El 11/5/2017 18:19,  &lt;<a href=3D"mailto:philippe.groarke@gmail=
..com">philippe.groarke@gmail.com</a>&gt; escribi=C3=B3:<br type=3D"attribut=
ion"><blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>I&#39;ve decided t=
o dip my toe into the standardization process. As such, I&#39;ve come up wi=
th (what I think is) a small feature I really like. I have to do a lot of p=
rogramming in [other language] at work, and something I greatly miss when g=
etting back to C++ is the null coalescing operator. It is a quality of life=
 feature that simplifies and compacts patterns of code that are used throug=
hout codebases.</div><div><br></div><div>Consider the following conditional=
 operator use case:</div><div><br></div><div class=3D"m_-282702460211531990=
0prettyprint" style=3D"background-color:rgb(250,250,250);border:1px solid r=
gb(187,187,187);word-wrap:break-word"><code class=3D"m_-2827024602115319900=
prettyprint"><div class=3D"m_-2827024602115319900subprettyprint"><span styl=
e=3D"color:#606" class=3D"m_-2827024602115319900styled-by-prettify">Test</s=
pan><span style=3D"color:#660" class=3D"m_-2827024602115319900styled-by-pre=
ttify">*</span><span style=3D"color:#000" class=3D"m_-2827024602115319900st=
yled-by-prettify"> get_test</span><span style=3D"color:#660" class=3D"m_-28=
27024602115319900styled-by-prettify">()</span><span style=3D"color:#000" cl=
ass=3D"m_-2827024602115319900styled-by-prettify"> </span><span style=3D"col=
or:#660" class=3D"m_-2827024602115319900styled-by-prettify">{</span><span s=
tyle=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify"> </s=
pan><span style=3D"color:rgb(136,0,0);font-family:Arial,Helvetica,sans-seri=
f"><span style=3D"color:#800" class=3D"m_-2827024602115319900styled-by-pret=
tify">/*...*/</span><span style=3D"color:#000" class=3D"m_-2827024602115319=
900styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_-28270=
24602115319900styled-by-prettify">}</span></span><span style=3D"color:#000"=
 class=3D"m_-2827024602115319900styled-by-prettify"><br><br></span><span st=
yle=3D"color:#606" class=3D"m_-2827024602115319900styled-by-prettify">Test<=
/span><span style=3D"color:#660" class=3D"m_-2827024602115319900styled-by-p=
rettify">*</span><span style=3D"color:#000" class=3D"m_-2827024602115319900=
styled-by-prettify"> test </span><span style=3D"color:#660" class=3D"m_-282=
7024602115319900styled-by-prettify">=3D</span><span style=3D"color:#000" cl=
ass=3D"m_-2827024602115319900styled-by-prettify"> </span><span style=3D"col=
or:#660" class=3D"m_-2827024602115319900styled-by-prettify">(</span><span s=
tyle=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify">get_=
test</span><span style=3D"color:#660" class=3D"m_-2827024602115319900styled=
-by-prettify">()</span><span style=3D"color:#000" class=3D"m_-2827024602115=
319900styled-by-prettify"> </span><span style=3D"color:#660" class=3D"m_-28=
27024602115319900styled-by-prettify">!=3D</span><span style=3D"color:#000" =
class=3D"m_-2827024602115319900styled-by-prettify"> </span><span style=3D"c=
olor:#008" class=3D"m_-2827024602115319900styled-by-prettify">nullptr</span=
><span style=3D"color:#660" class=3D"m_-2827024602115319900styled-by-pretti=
fy">)</span><span style=3D"color:#000" class=3D"m_-2827024602115319900style=
d-by-prettify"> </span><span style=3D"color:#660" class=3D"m_-2827024602115=
319900styled-by-prettify">?</span><span style=3D"color:#000" class=3D"m_-28=
27024602115319900styled-by-prettify"> get_test</span><span style=3D"color:#=
660" class=3D"m_-2827024602115319900styled-by-prettify">()</span><span styl=
e=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify"> </span=
><span style=3D"color:#660" class=3D"m_-2827024602115319900styled-by-pretti=
fy">:</span><span style=3D"color:#000" class=3D"m_-2827024602115319900style=
d-by-prettify"> </span><span style=3D"color:#008" class=3D"m_-2827024602115=
319900styled-by-prettify">new</span><span style=3D"color:#000" class=3D"m_-=
2827024602115319900styled-by-prettify"> </span><span style=3D"color:#606" c=
lass=3D"m_-2827024602115319900styled-by-prettify">Test</span><span style=3D=
"color:#660" class=3D"m_-2827024602115319900styled-by-prettify">();</span><=
/div></code></div><div><br></div><div><br></div><div>If `get_test()`=C2=A0h=
as side effects, we may have a problem. We would use the following instead.=
</div><div><br></div><div class=3D"m_-2827024602115319900prettyprint" style=
=3D"background-color:rgb(250,250,250);border:1px solid rgb(187,187,187);wor=
d-wrap:break-word"><code class=3D"m_-2827024602115319900prettyprint"><div c=
lass=3D"m_-2827024602115319900subprettyprint"><span style=3D"color:#606" cl=
ass=3D"m_-2827024602115319900styled-by-prettify">Test</span><span style=3D"=
color:#660" class=3D"m_-2827024602115319900styled-by-prettify">*</span><spa=
n style=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify"> =
test </span><span style=3D"color:#660" class=3D"m_-2827024602115319900style=
d-by-prettify">=3D</span><span style=3D"color:#000" class=3D"m_-28270246021=
15319900styled-by-prettify"> get_test</span><span style=3D"color:#660" clas=
s=3D"m_-2827024602115319900styled-by-prettify">();</span><span style=3D"col=
or:#000" class=3D"m_-2827024602115319900styled-by-prettify"><br>test </span=
><span style=3D"color:#660" class=3D"m_-2827024602115319900styled-by-pretti=
fy">=3D</span><span style=3D"color:#000" class=3D"m_-2827024602115319900sty=
led-by-prettify"> test </span><span style=3D"color:#660" class=3D"m_-282702=
4602115319900styled-by-prettify">!=3D</span><span style=3D"color:#000" clas=
s=3D"m_-2827024602115319900styled-by-prettify"> </span><span style=3D"color=
:#008" class=3D"m_-2827024602115319900styled-by-prettify">nullptr</span><sp=
an style=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify">=
 </span><span style=3D"color:#660" class=3D"m_-2827024602115319900styled-by=
-prettify">?</span><span style=3D"color:#000" class=3D"m_-28270246021153199=
00styled-by-prettify"> test </span><span style=3D"color:#660" class=3D"m_-2=
827024602115319900styled-by-prettify">:</span><span style=3D"color:#000" cl=
ass=3D"m_-2827024602115319900styled-by-prettify"> </span><span style=3D"col=
or:#008" class=3D"m_-2827024602115319900styled-by-prettify">new</span><span=
 style=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify"> <=
/span><span style=3D"color:#606" class=3D"m_-2827024602115319900styled-by-p=
rettify">Test</span><span style=3D"color:#660" class=3D"m_-2827024602115319=
900styled-by-prettify">();</span></div></code></div><div><br></div><div><br=
></div><div>We could instead use a shortcut without side effect, the null c=
oalescing operator ??.=C2=A0</div><div>The left hand side expression is eva=
luated and compared to nullptr. If it is not nullptr, the evaluation is com=
plete. If it is nullptr, the right hand side expression is evaluated.</div>=
<div><br></div><div><div class=3D"m_-2827024602115319900prettyprint" style=
=3D"background-color:rgb(250,250,250);border:1px solid rgb(187,187,187);wor=
d-wrap:break-word"><code class=3D"m_-2827024602115319900prettyprint"><div c=
lass=3D"m_-2827024602115319900subprettyprint"><span style=3D"color:#606" cl=
ass=3D"m_-2827024602115319900styled-by-prettify">Test</span><span style=3D"=
color:#660" class=3D"m_-2827024602115319900styled-by-prettify">*</span><spa=
n style=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify"> =
test </span><span style=3D"color:#660" class=3D"m_-2827024602115319900style=
d-by-prettify">=3D</span><span style=3D"color:#000" class=3D"m_-28270246021=
15319900styled-by-prettify"> get_test</span><span style=3D"color:#660" clas=
s=3D"m_-2827024602115319900styled-by-prettify">()</span><span style=3D"colo=
r:#000" class=3D"m_-2827024602115319900styled-by-prettify"> </span><span st=
yle=3D"color:#660" class=3D"m_-2827024602115319900styled-by-prettify">??</s=
pan><span style=3D"color:#000" class=3D"m_-2827024602115319900styled-by-pre=
ttify"> </span><span style=3D"color:#008" class=3D"m_-2827024602115319900st=
yled-by-prettify">new</span><span style=3D"color:#000" class=3D"m_-28270246=
02115319900styled-by-prettify"> </span><span style=3D"color:#606" class=3D"=
m_-2827024602115319900styled-by-prettify">Test</span><span style=3D"color:#=
660" class=3D"m_-2827024602115319900styled-by-prettify">();</span></div></c=
ode></div><br></div><div><br></div><div>It can also be a concise way to thr=
ow on a null value.</div><div><br></div><div><div class=3D"m_-2827024602115=
319900prettyprint" style=3D"background-color:rgb(250,250,250);border:1px so=
lid rgb(187,187,187);word-wrap:break-word"><code class=3D"m_-28270246021153=
19900prettyprint"><div class=3D"m_-2827024602115319900subprettyprint"><span=
 style=3D"color:#000" class=3D"m_-2827024602115319900styled-by-prettify">so=
me_pointer </span><span style=3D"color:#660" class=3D"m_-282702460211531990=
0styled-by-prettify">??</span><span style=3D"color:#000" class=3D"m_-282702=
4602115319900styled-by-prettify"> </span><span style=3D"color:#008" class=
=3D"m_-2827024602115319900styled-by-prettify">throw</span><span style=3D"co=
lor:#000" class=3D"m_-2827024602115319900styled-by-prettify"> std</span><sp=
an style=3D"color:#660" class=3D"m_-2827024602115319900styled-by-prettify">=
::</span><span style=3D"color:#000" class=3D"m_-2827024602115319900styled-b=
y-prettify">invalid_argument</span><span style=3D"color:#660" class=3D"m_-2=
827024602115319900styled-by-prettify">(</span><span style=3D"color:#080" cl=
ass=3D"m_-2827024602115319900styled-by-prettify">&quot;some_<wbr>pointer is=
 null.&quot;</span><span style=3D"color:#660" class=3D"m_-28270246021153199=
00styled-by-prettify">);</span></div></code></div><br></div><div></div></di=
v></div></blockquote></div></div></div><div dir=3D"auto"><br></div><div dir=
=3D"auto"><br></div><div dir=3D"auto">What about a library function such as=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">template &lt;class T, c=
lass Func&gt;</div><div dir=3D"auto">T* coalesce(T* x, Func f)</div><div di=
r=3D"auto">{</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0if (x =3D=3D nullpt=
r)</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return f=
();</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0else</div><div dir=3D"auto">=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x;</div><div dir=3D"auto">}=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">So coalesce(x, [](){ret=
urn new T;}) =C2=A0 or also the throw use case.</div><div dir=3D"auto">?</d=
iv><div dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_extra"=
><div class=3D"gmail_quote"><blockquote class=3D"quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>=
<div><br></div><div>These are the most interesting aspects of the feature. =
I&#39;d like to gather thoughts and comments. Maybe it has already been men=
tioned in a paper that didn&#39;t go through? I&#39;m simply interested in =
getting the discussion started before writing a paper. If the general conse=
nsus is that this feature is desired, maybe you could point me to a committ=
ee member that could mentor me?</div></div><div><br></div><div>Thank you,</=
div><div>Philippe</div></div><font color=3D"#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8a34f78a-53ec-48d3-934f-457fd6d949d7%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/8a34=
f78a-53ec-48d3-<wbr>934f-457fd6d949d7%40isocpp.org</a><wbr>.<br>
</font></blockquote></div><br></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAFdMc-12pufc96%3DQJwL6HcJ8hZHWpeL7V_=
zGtooD0OwWW4h0kw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-12pufc96=
%3DQJwL6HcJ8hZHWpeL7V_zGtooD0OwWW4h0kw%40mail.gmail.com</a>.<br />

--001a11456cbc53f0d1054f51b72d--

.


Author: Alberto Barbati <albertobarbati@gmail.com>
Date: Sat, 13 May 2017 07:32:22 -0700 (PDT)
Raw View
------=_Part_429_733044697.1494685942576
Content-Type: multipart/alternative;
 boundary="----=_Part_430_269036659.1494685942576"

------=_Part_430_269036659.1494685942576
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable


Il giorno venerd=C3=AC 12 maggio 2017 13:07:51 UTC+2, dgutson ha scritto:
>
>
> What about a library function such as
>
> template <class T, class Func>
> T* coalesce(T* x, Func f)
> {
>      if (x =3D=3D nullptr)
>            return f();
>      else
>            return x;
> }
>
> =20
This is exactly the kind of applications of my recent proposal Controlled=
=20
Argument Evaluation=20
<https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/JH-xC84=
dvW4>.=20
With my proposal, you would be able to write a function with the exact same=
=20
meaning without having to dish out lambdas explicitly.

Alberto

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/c0310bc7-feb0-4c93-8bdb-5b75fe4b6156%40isocpp.or=
g.

------=_Part_430_269036659.1494685942576
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>Il giorno venerd=C3=AC 12 maggio 2017 13:07:51 UTC+2, =
dgutson ha scritto:<blockquote class=3D"gmail_quote" style=3D"margin: 0;mar=
gin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D=
"auto"><br><div dir=3D"auto">What about a library function such as</div><di=
v dir=3D"auto"><br></div><div dir=3D"auto">template &lt;class T, class Func=
&gt;</div><div dir=3D"auto">T* coalesce(T* x, Func f)</div><div dir=3D"auto=
">{</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0if (x =3D=3D nullptr)</div><=
div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return f();</div>=
<div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0else</div><div dir=3D"auto">=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x;</div><div dir=3D"auto">}</div><=
div dir=3D"auto"><br></div></div></blockquote><div>=C2=A0<br>This is exactl=
y the kind of applications of my recent proposal <a href=3D"https://groups.=
google.com/a/isocpp.org/forum/#!topic/std-proposals/JH-xC84dvW4">Controlled=
 Argument Evaluation</a>. With my proposal, you would be able to write a fu=
nction with the exact same meaning without having to dish out lambdas expli=
citly.<br><br>Alberto<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/c0310bc7-feb0-4c93-8bdb-5b75fe4b6156%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/c0310bc7-feb0-4c93-8bdb-5b75fe4b6156=
%40isocpp.org</a>.<br />

------=_Part_430_269036659.1494685942576--

------=_Part_429_733044697.1494685942576--

.


Author: "dgutson ." <danielgutson@gmail.com>
Date: Sat, 13 May 2017 12:52:30 -0300
Raw View
--f403045f3f3c4669a6054f69cfb9
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

El 13/5/2017 11:32, "Alberto Barbati" <albertobarbati@gmail.com> escribi=C3=
=B3:


Il giorno venerd=C3=AC 12 maggio 2017 13:07:51 UTC+2, dgutson ha scritto:
>
>
> What about a library function such as
>
> template <class T, class Func>
> T* coalesce(T* x, Func f)
> {
>      if (x =3D=3D nullptr)
>            return f();
>      else
>            return x;
> }
>
>
This is exactly the kind of applications of my recent proposal Controlled
Argument Evaluation
<https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/JH-xC84=
dvW4>.



This is exactly the kind of scenarios where there isn't any need for change
and language is OK as-is, but just to extend the library a bit. My idea of
evolution is: languange should stabilize as a consequence of maturity, and
expansion should land in the library side.
Whst I showed just requires a few keystrokes.
Except of course for foundamental changes (ie as concepts, coroutines)
which is not your proposed case.
Anyway let's not pollute this thread with discussions related to other ones=
..


With my proposal, you would be able to write a function with the exact same
meaning without having to dish out lambdas explicitly.

Alberto

--=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
email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/
isocpp.org/d/msgid/std-proposals/c0310bc7-feb0-4c93-
8bdb-5b75fe4b6156%40isocpp.org
<https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/c0310bc7-feb0=
-4c93-8bdb-5b75fe4b6156%40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter=
>
..

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAFdMc-0BzkcdNQr0TipK227PgZ3HEXXwY9dWn2qEXWEzPZq=
_jg%40mail.gmail.com.

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

<div dir=3D"auto"><div><br><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">El 13/5/2017 11:32, &quot;Alberto Barbati&quot; &lt;<a href=3D"ma=
ilto:albertobarbati@gmail.com">albertobarbati@gmail.com</a>&gt; escribi=C3=
=B3:<br type=3D"attribution"><blockquote class=3D"quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div=
 class=3D"quoted-text"><br>Il giorno venerd=C3=AC 12 maggio 2017 13:07:51 U=
TC+2, dgutson ha scritto:<blockquote class=3D"gmail_quote" style=3D"margin:=
0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"auto"><br><div dir=3D"auto">What about a library function such as</div>=
<div dir=3D"auto"><br></div><div dir=3D"auto">template &lt;class T, class F=
unc&gt;</div><div dir=3D"auto">T* coalesce(T* x, Func f)</div><div dir=3D"a=
uto">{</div><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0if (x =3D=3D nullptr)</di=
v><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return f();</d=
iv><div dir=3D"auto">=C2=A0 =C2=A0 =C2=A0else</div><div dir=3D"auto">=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return x;</div><div dir=3D"auto">}</div>=
<div dir=3D"auto"><br></div></div></blockquote></div><div>=C2=A0<br>This is=
 exactly the kind of applications of my recent proposal <a href=3D"https://=
groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/JH-xC84dvW4" tar=
get=3D"_blank">Controlled Argument Evaluation</a>. </div></div></blockquote=
></div></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">This is ex=
actly the kind of scenarios where there isn&#39;t any need for change and l=
anguage is OK as-is, but just to extend the library a bit. My idea of evolu=
tion is: languange should stabilize as a consequence of maturity, and expan=
sion should land in the library side.</div><div dir=3D"auto">Whst I showed =
just requires a few keystrokes.</div><div dir=3D"auto">Except of course for=
 foundamental changes (ie as concepts, coroutines) which is not your propos=
ed case.</div><div dir=3D"auto">Anyway let&#39;s not pollute this thread wi=
th discussions related to other ones.</div><div dir=3D"auto"><br></div><div=
 dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_extra"><div c=
lass=3D"gmail_quote"><blockquote class=3D"quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>With my=
 proposal, you would be able to write a function with the exact same meanin=
g without having to dish out lambdas explicitly.<br><br>Alberto<br></div></=
div><div class=3D"quoted-text">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></div>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/c0310bc7-feb0-4c93-8bdb-5b75fe4b6156%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/c031=
0bc7-feb0-4c93-<wbr>8bdb-5b75fe4b6156%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAFdMc-0BzkcdNQr0TipK227PgZ3HEXXwY9dW=
n2qEXWEzPZq_jg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">htt=
ps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAFdMc-0BzkcdNQr0=
TipK227PgZ3HEXXwY9dWn2qEXWEzPZq_jg%40mail.gmail.com</a>.<br />

--f403045f3f3c4669a6054f69cfb9--

.


Author: olaf@join.cc
Date: Mon, 22 May 2017 01:44:40 -0700 (PDT)
Raw View
------=_Part_2514_308146749.1495442680752
Content-Type: multipart/alternative;
 boundary="----=_Part_2515_1890075179.1495442680752"

------=_Part_2515_1890075179.1495442680752
Content-Type: text/plain; charset="UTF-8"

Op vrijdag 12 mei 2017 00:34:39 UTC+2 schreef Ville Voutilainen:
>
> On 12 May 2017 at 01:08, Philippe Groarke <philippe...@gmail.com
> <javascript:>> wrote:
> > I felt it might have already be proposed, thanks for the quick reply.
> Back
> > to the drawing board.
>
> The goal was
>
> Test* test = get_test() ?? new Test();
>
> and the shortest work-around I can concoct quickly is
>
> Test* test = []{Test* ret{get_test()}; return ret ? ret : new Test();}();
>
> Not all that pretty, no.
>

Test* test = get_test();
if (!test)
  test = new Test();

Not a one-liner but quite simple. Does this come up often?
In other languages nullable types work a bit differently, would ?: play
nice with optional in C++?

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/575df8f9-3f43-499e-9e96-e4518e7d9307%40isocpp.org.

------=_Part_2515_1890075179.1495442680752
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Op vrijdag 12 mei 2017 00:34:39 UTC+2 schreef Ville Voutil=
ainen:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8=
ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 12 May 2017 at 01:08,=
 Philippe Groarke &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfusca=
ted-mailto=3D"HuxuE4B4CQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#3=
9;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#3=
9;;return true;">philippe...@gmail.com</a>&gt; wrote:
<br>&gt; I felt it might have already be proposed, thanks for the quick rep=
ly. Back
<br>&gt; to the drawing board.
<br>
<br>The goal was
<br>
<br>Test* test =3D get_test() ?? new Test();
<br>
<br>and the shortest work-around I can concoct quickly is
<br>
<br>Test* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();=
}();
<br>
<br>Not all that pretty, no.
<br></blockquote><div><br></div><div>Test* test =3D get_test();=C2=A0</div>=
<div>if (!test)=C2=A0</div><div>=C2=A0 test =3D new Test();=C2=A0</div><div=
><br></div><div>Not a one-liner but quite simple. Does this come up often?<=
/div><div>In other languages nullable types work a bit differently, would ?=
: play nice with optional in C++?</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/575df8f9-3f43-499e-9e96-e4518e7d9307%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/575df8f9-3f43-499e-9e96-e4518e7d9307=
%40isocpp.org</a>.<br />

------=_Part_2515_1890075179.1495442680752--

------=_Part_2514_308146749.1495442680752--

.


Author: Bengt Gustafsson <bengt.gustafsson@beamways.com>
Date: Mon, 22 May 2017 12:46:46 -0700 (PDT)
Raw View
------=_Part_2976_831274281.1495482407074
Content-Type: multipart/alternative;
 boundary="----=_Part_2977_932356096.1495482407075"

------=_Part_2977_932356096.1495482407075
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

In javascript you often see the equivalent of:

Test* test =3D get_test() || new Test();

which almost works in C++ too, except that the return type of || always is=
=20
bool even if both lhs and rhs are the same pointer type. Changing the=20
return type would however break some code... and I can't see a way around=
=20
that problem, unfortunately. Back to square one.


Den m=C3=A5ndag 22 maj 2017 kl. 10:44:40 UTC+2 skrev ol...@join.cc:
>
> Op vrijdag 12 mei 2017 00:34:39 UTC+2 schreef Ville Voutilainen:
>>
>> On 12 May 2017 at 01:08, Philippe Groarke <philippe...@gmail.com> wrote:=
=20
>> > I felt it might have already be proposed, thanks for the quick reply.=
=20
>> Back=20
>> > to the drawing board.=20
>>
>> The goal was=20
>>
>> Test* test =3D get_test() ?? new Test();=20
>>
>> and the shortest work-around I can concoct quickly is=20
>>
>> Test* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();}=
();=20
>>
>> Not all that pretty, no.=20
>>
>
> Test* test =3D get_test();=20
> if (!test)=20
>   test =3D new Test();=20
>
> Not a one-liner but quite simple. Does this come up often?
> In other languages nullable types work a bit differently, would ?: play=
=20
> nice with optional in C++?
>

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/a17ed11b-ff92-43d2-bb1f-7c662a18c9e4%40isocpp.or=
g.

------=_Part_2977_932356096.1495482407075
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">In javascript you often see the equivalent of:<div><br></d=
iv><div>Test* test =3D get_test() || new Test();</div><div><br></div><div>w=
hich almost works in C++ too, except that the return type of || always is b=
ool even if both lhs and rhs are the same pointer type. Changing the return=
 type would however break some code... and I can&#39;t see a way around tha=
t problem, unfortunately. Back to square one.</div><div><br><br>Den m=C3=A5=
ndag 22 maj 2017 kl. 10:44:40 UTC+2 skrev ol...@join.cc:<blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr">Op vrijdag 12 mei 2017 00:34:3=
9 UTC+2 schreef Ville Voutilainen:<blockquote class=3D"gmail_quote" style=
=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"=
>On 12 May 2017 at 01:08, Philippe Groarke &lt;<a rel=3D"nofollow">philippe=
....@gmail.com</a>&gt; wrote:
<br>&gt; I felt it might have already be proposed, thanks for the quick rep=
ly. Back
<br>&gt; to the drawing board.
<br>
<br>The goal was
<br>
<br>Test* test =3D get_test() ?? new Test();
<br>
<br>and the shortest work-around I can concoct quickly is
<br>
<br>Test* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();=
}();
<br>
<br>Not all that pretty, no.
<br></blockquote><div><br></div><div>Test* test =3D get_test();=C2=A0</div>=
<div>if (!test)=C2=A0</div><div>=C2=A0 test =3D new Test();=C2=A0</div><div=
><br></div><div>Not a one-liner but quite simple. Does this come up often?<=
/div><div>In other languages nullable types work a bit differently, would ?=
: play nice with optional in C++?</div></div></blockquote></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/a17ed11b-ff92-43d2-bb1f-7c662a18c9e4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a17ed11b-ff92-43d2-bb1f-7c662a18c9e4=
%40isocpp.org</a>.<br />

------=_Part_2977_932356096.1495482407075--

------=_Part_2976_831274281.1495482407074--

.


Author: Philippe Groarke <philippe.groarke@gmail.com>
Date: Mon, 22 May 2017 20:20:20 -0400
Raw View
--Apple-Mail=_70017C4F-D046-43BD-83B8-8F219719E3F8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"

Since this has already been proposed and refused. Also considering 2 of the=
 major compilers offer it as an extension, which means adding the feature t=
o the language probably would've been trivial. I think it is pretty much a =
dead end.

Thanks for the comments though.

> On May 22, 2017, at 3:46 PM, Bengt Gustafsson <bengt.gustafsson@beamways.=
com> wrote:
>=20
> In javascript you often see the equivalent of:
>=20
> Test* test =3D get_test() || new Test();
>=20
> which almost works in C++ too, except that the return type of || always i=
s bool even if both lhs and rhs are the same pointer type. Changing the ret=
urn type would however break some code... and I can't see a way around that=
 problem, unfortunately. Back to square one.
>=20
>=20
> Den m=C3=A5ndag 22 maj 2017 kl. 10:44:40 UTC+2 skrev ol...@join.cc <http:=
//join.cc/>:
> Op vrijdag 12 mei 2017 00:34:39 UTC+2 schreef Ville Voutilainen:
> On 12 May 2017 at 01:08, Philippe Groarke <philippe...@gmail.com <>> wrot=
e:=20
> > I felt it might have already be proposed, thanks for the quick reply. B=
ack=20
> > to the drawing board.=20
>=20
> The goal was=20
>=20
> Test* test =3D get_test() ?? new Test();=20
>=20
> and the shortest work-around I can concoct quickly is=20
>=20
> Test* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();}(=
);=20
>=20
> Not all that pretty, no.=20
>=20
> Test* test =3D get_test();=20
> if (!test)=20
>   test =3D new Test();=20
>=20
> Not a one-liner but quite simple. Does this come up often?
> In other languages nullable types work a bit differently, would ?: play n=
ice with optional in C++?
>=20
> --=20
> You received this message because you are subscribed to a topic in the Go=
ogle Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit https://groups.google.com/a/isocpp.=
org/d/topic/std-proposals/uNYpDyi7VSA/unsubscribe <https://groups.google.co=
m/a/isocpp.org/d/topic/std-proposals/uNYpDyi7VSA/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to std-p=
roposals+unsubscribe@isocpp.org <mailto:std-proposals+unsubscribe@isocpp.or=
g>.
> To post to this group, send email to std-proposals@isocpp.org <mailto:std=
-proposals@isocpp.org>.
> To view this discussion on the web visit https://groups.google.com/a/isoc=
pp.org/d/msgid/std-proposals/a17ed11b-ff92-43d2-bb1f-7c662a18c9e4%40isocpp.=
org <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/a17ed11b-=
ff92-43d2-bb1f-7c662a18c9e4%40isocpp.org?utm_medium=3Demail&utm_source=3Dfo=
oter>.

--=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.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/A1EC2A78-D0D4-4827-8B40-DD3B59B05B68%40gmail.com=
..

--Apple-Mail=_70017C4F-D046-43BD-83B8-8F219719E3F8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="UTF-8"

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D"">Since this has alr=
eady been proposed and refused. Also considering 2 of the major compilers o=
ffer it as an extension, which means adding the feature to the language pro=
bably would've been trivial. I think it is pretty much a dead end.<div clas=
s=3D""><br class=3D""></div><div class=3D"">Thanks for the comments though.=
</div><div class=3D""><br class=3D""><div><blockquote type=3D"cite" class=
=3D""><div class=3D"">On May 22, 2017, at 3:46 PM, Bengt Gustafsson &lt;<a =
href=3D"mailto:bengt.gustafsson@beamways.com" class=3D"">bengt.gustafsson@b=
eamways.com</a>&gt; wrote:</div><br class=3D"Apple-interchange-newline"><di=
v class=3D""><div dir=3D"ltr" style=3D"font-family: Helvetica; font-size: 1=
4px; font-style: normal; font-variant-caps: normal; font-weight: normal; le=
tter-spacing: normal; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0p=
x;" class=3D"">In javascript you often see the equivalent of:<div class=3D"=
"><br class=3D""></div><div class=3D"">Test* test =3D get_test() || new Tes=
t();</div><div class=3D""><br class=3D""></div><div class=3D"">which almost=
 works in C++ too, except that the return type of || always is bool even if=
 both lhs and rhs are the same pointer type. Changing the return type would=
 however break some code... and I can't see a way around that problem, unfo=
rtunately. Back to square one.</div><div class=3D""><br class=3D""><br clas=
s=3D"">Den m=C3=A5ndag 22 maj 2017 kl. 10:44:40 UTC+2 skrev ol...@<a href=
=3D"http://join.cc/" class=3D"">join.cc</a>:<blockquote class=3D"gmail_quot=
e" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-=
style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><d=
iv dir=3D"ltr" class=3D"">Op vrijdag 12 mei 2017 00:34:39 UTC+2 schreef Vil=
le Voutilainen:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0=
px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-col=
or: rgb(204, 204, 204); padding-left: 1ex;">On 12 May 2017 at 01:08, Philip=
pe Groarke &lt;<a rel=3D"nofollow" class=3D"">philippe...@gmail.com</a>&gt;=
 wrote:<span class=3D"Apple-converted-space">&nbsp;</span><br class=3D"">&g=
t; I felt it might have already be proposed, thanks for the quick reply. Ba=
ck<span class=3D"Apple-converted-space">&nbsp;</span><br class=3D"">&gt; to=
 the drawing board.<span class=3D"Apple-converted-space">&nbsp;</span><br c=
lass=3D""><br class=3D"">The goal was<span class=3D"Apple-converted-space">=
&nbsp;</span><br class=3D""><br class=3D"">Test* test =3D get_test() ?? new=
 Test();<span class=3D"Apple-converted-space">&nbsp;</span><br class=3D""><=
br class=3D"">and the shortest work-around I can concoct quickly is<span cl=
ass=3D"Apple-converted-space">&nbsp;</span><br class=3D""><br class=3D"">Te=
st* test =3D []{Test* ret{get_test()}; return ret ? ret : new Test();}();<s=
pan class=3D"Apple-converted-space">&nbsp;</span><br class=3D""><br class=
=3D"">Not all that pretty, no.<span class=3D"Apple-converted-space">&nbsp;<=
/span><br class=3D""></blockquote><div class=3D""><br class=3D""></div><div=
 class=3D"">Test* test =3D get_test();&nbsp;</div><div class=3D"">if (!test=
)&nbsp;</div><div class=3D"">&nbsp;<span class=3D"Apple-converted-space">&n=
bsp;</span>test =3D new Test();&nbsp;</div><div class=3D""><br class=3D""><=
/div><div class=3D"">Not a one-liner but quite simple. Does this come up of=
ten?</div><div class=3D"">In other languages nullable types work a bit diff=
erently, would ?: play nice with optional in C++?</div></div></blockquote><=
/div></div><div style=3D"font-family: Helvetica; font-size: 14px; font-styl=
e: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: =
normal; text-align: start; text-indent: 0px; text-transform: none; white-sp=
ace: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""=
><br class=3D"webkit-block-placeholder"></div><span style=3D"font-family: H=
elvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; f=
ont-weight: normal; letter-spacing: normal; text-align: start; text-indent:=
 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit=
-text-stroke-width: 0px; float: none; display: inline !important;" class=3D=
"">--<span class=3D"Apple-converted-space">&nbsp;</span></span><br style=3D=
"font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-=
caps: normal; font-weight: normal; letter-spacing: normal; text-align: star=
t; text-indent: 0px; text-transform: none; white-space: normal; word-spacin=
g: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=3D"font-fam=
ily: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: nor=
mal; font-weight: normal; letter-spacing: normal; text-align: start; text-i=
ndent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -=
webkit-text-stroke-width: 0px; float: none; display: inline !important;" cl=
ass=3D"">You received this message because you are subscribed to a topic in=
 the Google Groups "ISO C++ Standard - Future Proposals" group.</span><br s=
tyle=3D"font-family: Helvetica; font-size: 14px; font-style: normal; font-v=
ariant-caps: normal; font-weight: normal; letter-spacing: normal; text-alig=
n: start; text-indent: 0px; text-transform: none; white-space: normal; word=
-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=3D"f=
ont-family: Helvetica; font-size: 14px; font-style: normal; font-variant-ca=
ps: normal; font-weight: normal; letter-spacing: normal; text-align: start;=
 text-indent: 0px; text-transform: none; white-space: normal; word-spacing:=
 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !importa=
nt;" class=3D"">To unsubscribe from this topic, visit<span class=3D"Apple-c=
onverted-space">&nbsp;</span></span><a href=3D"https://groups.google.com/a/=
isocpp.org/d/topic/std-proposals/uNYpDyi7VSA/unsubscribe" style=3D"font-fam=
ily: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: nor=
mal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align=
: start; text-indent: 0px; text-transform: none; white-space: normal; widow=
s: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-st=
roke-width: 0px;" class=3D"">https://groups.google.com/a/isocpp.org/d/topic=
/std-proposals/uNYpDyi7VSA/unsubscribe</a><span style=3D"font-family: Helve=
tica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-=
weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px=
; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-tex=
t-stroke-width: 0px; float: none; display: inline !important;" class=3D"">.=
</span><br style=3D"font-family: Helvetica; font-size: 14px; font-style: no=
rmal; font-variant-caps: normal; font-weight: normal; letter-spacing: norma=
l; text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><spa=
n style=3D"font-family: Helvetica; font-size: 14px; font-style: normal; fon=
t-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-a=
lign: start; text-indent: 0px; text-transform: none; white-space: normal; w=
ord-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inl=
ine !important;" class=3D"">To unsubscribe from this group and all its topi=
cs, send an email to<span class=3D"Apple-converted-space">&nbsp;</span></sp=
an><a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" style=3D"font-fa=
mily: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: no=
rmal; font-weight: normal; letter-spacing: normal; orphans: auto; text-alig=
n: start; text-indent: 0px; text-transform: none; white-space: normal; wido=
ws: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-s=
troke-width: 0px;" class=3D"">std-proposals+unsubscribe@isocpp.org</a><span=
 style=3D"font-family: Helvetica; font-size: 14px; font-style: normal; font=
-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-al=
ign: start; text-indent: 0px; text-transform: none; white-space: normal; wo=
rd-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inli=
ne !important;" class=3D"">.</span><br style=3D"font-family: Helvetica; fon=
t-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: n=
ormal; letter-spacing: normal; text-align: start; text-indent: 0px; text-tr=
ansform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-=
width: 0px;" class=3D""><span style=3D"font-family: Helvetica; font-size: 1=
4px; font-style: normal; font-variant-caps: normal; font-weight: normal; le=
tter-spacing: normal; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0p=
x; float: none; display: inline !important;" class=3D"">To post to this gro=
up, send email to<span class=3D"Apple-converted-space">&nbsp;</span></span>=
<a href=3D"mailto:std-proposals@isocpp.org" style=3D"font-family: Helvetica=
; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weig=
ht: normal; letter-spacing: normal; orphans: auto; text-align: start; text-=
indent: 0px; text-transform: none; white-space: normal; widows: auto; word-=
spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0p=
x;" class=3D"">std-proposals@isocpp.org</a><span style=3D"font-family: Helv=
etica; font-size: 14px; font-style: normal; font-variant-caps: normal; font=
-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0p=
x; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-te=
xt-stroke-width: 0px; float: none; display: inline !important;" class=3D"">=
..</span><br style=3D"font-family: Helvetica; font-size: 14px; font-style: n=
ormal; font-variant-caps: normal; font-weight: normal; letter-spacing: norm=
al; text-align: start; text-indent: 0px; text-transform: none; white-space:=
 normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><sp=
an style=3D"font-family: Helvetica; font-size: 14px; font-style: normal; fo=
nt-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-=
align: start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: in=
line !important;" class=3D"">To view this discussion on the web visit<span =
class=3D"Apple-converted-space">&nbsp;</span></span><a href=3D"https://grou=
ps.google.com/a/isocpp.org/d/msgid/std-proposals/a17ed11b-ff92-43d2-bb1f-7c=
662a18c9e4%40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" style=
=3D"font-family: Helvetica; font-size: 14px; font-style: normal; font-varia=
nt-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto=
; text-align: start; text-indent: 0px; text-transform: none; white-space: n=
ormal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -we=
bkit-text-stroke-width: 0px;" class=3D"">https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/a17ed11b-ff92-43d2-bb1f-7c662a18c9e4%40isocpp.or=
g</a><span style=3D"font-family: Helvetica; font-size: 14px; font-style: no=
rmal; font-variant-caps: normal; font-weight: normal; letter-spacing: norma=
l; text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; dis=
play: inline !important;" class=3D"">.</span></div></blockquote></div><br c=
lass=3D""></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/A1EC2A78-D0D4-4827-8B40-DD3B59B05B68%=
40gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/A1EC2A78-D0D4-4827-8B40-DD3B59B05B68%=
40gmail.com</a>.<br />

--Apple-Mail=_70017C4F-D046-43BD-83B8-8F219719E3F8--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Mon, 22 May 2017 20:25:55 -0400
Raw View
<html><head></head><body class=3D"" lang=3D"en-US" style=3D"background-colo=
r: rgb(255, 255, 255); line-height: initial;">                             =
                                                         <div style=3D"widt=
h: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif,=
 sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color=
: rgb(255, 255, 255);">If someone convinces the third major compiler to als=
o support it, it might eventually get standardized as it will be de facto s=
tandard.&nbsp;</div><div style=3D"width: 100%; font-size: initial; font-fam=
ily: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125);=
 text-align: initial; background-color: rgb(255, 255, 255);"><br></div><div=
 style=3D"width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro=
', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; ba=
ckground-color: rgb(255, 255, 255);">=E2=80=8EBut I don't think it is worth=
 committee time - it isn't a feature that is needed that often, nor does it=
 confer much benefit.&nbsp;</div>                                          =
                                                                           =
                <div style=3D"width: 100%; font-size: initial; font-family:=
 Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); tex=
t-align: initial; background-color: rgb(255, 255, 255);"><br style=3D"displ=
ay:initial"></div>                                                         =
                                                                           =
                                                               <div style=
=3D"font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans=
-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb=
(255, 255, 255);">Sent&nbsp;from&nbsp;my&nbsp;BlackBerry&nbsp;portable&nbsp=
;Babbage&nbsp;Device</div>                                                 =
                                                                           =
                                                      <table width=3D"100%"=
 style=3D"background-color:white;border-spacing:0px;"> <tbody><tr><td colsp=
an=3D"2" style=3D"font-size: initial; text-align: initial; background-color=
: rgb(255, 255, 255);">                           <div style=3D"border-styl=
e: solid none none; border-top-color: rgb(181, 196, 223); border-top-width:=
 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pr=
o'; font-size: 10pt;">  <div><b>From: </b>Philippe Groarke</div><div><b>Sen=
t: </b>Monday, May 22, 2017 8:20 PM</div><div><b>To: </b>std-proposals@isoc=
pp.org</div><div><b>Reply To: </b>std-proposals@isocpp.org</div><div><b>Sub=
ject: </b>Re: [std-proposals] Null coalescing operator</div></div></td></tr=
></tbody></table><div style=3D"border-style: solid none none; border-top-co=
lor: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-al=
ign: initial; background-color: rgb(255, 255, 255);"></div><br><div id=3D"_=
originalContent" style=3D""><meta http-equiv=3D"Content-Type" content=3D"te=
xt/html charset=3Dutf-8">Since this has already been proposed and refused. =
Also considering 2 of the major compilers offer it as an extension, which m=
eans adding the feature to the language probably would've been trivial. I t=
hink it is pretty much a dead end.<div class=3D""><br class=3D""></div><div=
 class=3D"">Thanks for the comments though.</div><div class=3D""><br class=
=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">On May 22, =
2017, at 3:46 PM, Bengt Gustafsson &lt;<a href=3D"mailto:bengt.gustafsson@b=
eamways.com" class=3D"">bengt.gustafsson@beamways.com</a>&gt; wrote:</div><=
br class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" sty=
le=3D"font-family: Helvetica; font-size: 14px; font-style: normal; font-var=
iant-caps: normal; font-weight: normal; letter-spacing: normal; text-align:=
 start; text-indent: 0px; text-transform: none; white-space: normal; word-s=
pacing: 0px; -webkit-text-stroke-width: 0px;" class=3D"">In javascript you =
often see the equivalent of:<div class=3D""><br class=3D""></div><div class=
=3D"">Test* test =3D get_test() || new Test();</div><div class=3D""><br cla=
ss=3D""></div><div class=3D"">which almost works in C++ too, except that th=
e return type of || always is bool even if both lhs and rhs are the same po=
inter type. Changing the return type would however break some code... and I=
 can't see a way around that problem, unfortunately. Back to square one.</d=
iv><div class=3D""><br class=3D""><br class=3D"">Den m=C3=A5ndag 22 maj 201=
7 kl. 10:44:40 UTC+2 skrev ol...@<a href=3D"http://join.cc/" class=3D"">joi=
n.cc</a>:<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8=
ex; border-left-width: 1px; border-left-style: solid; border-left-color: rg=
b(204, 204, 204); padding-left: 1ex;"><div dir=3D"ltr" class=3D"">Op vrijda=
g 12 mei 2017 00:34:39 UTC+2 schreef Ville Voutilainen:<blockquote class=3D=
"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left-width: 1px; b=
order-left-style: solid; border-left-color: rgb(204, 204, 204); padding-lef=
t: 1ex;">On 12 May 2017 at 01:08, Philippe Groarke &lt;<a rel=3D"nofollow" =
class=3D"">philippe...@gmail.com</a>&gt; wrote:<span class=3D"Apple-convert=
ed-space">&nbsp;</span><br class=3D"">&gt; I felt it might have already be =
proposed, thanks for the quick reply. Back<span class=3D"Apple-converted-sp=
ace">&nbsp;</span><br class=3D"">&gt; to the drawing board.<span class=3D"A=
pple-converted-space">&nbsp;</span><br class=3D""><br class=3D"">The goal w=
as<span class=3D"Apple-converted-space">&nbsp;</span><br class=3D""><br cla=
ss=3D"">Test* test =3D get_test() ?? new Test();<span class=3D"Apple-conver=
ted-space">&nbsp;</span><br class=3D""><br class=3D"">and the shortest work=
-around I can concoct quickly is<span class=3D"Apple-converted-space">&nbsp=
;</span><br class=3D""><br class=3D"">Test* test =3D []{Test* ret{get_test(=
)}; return ret ? ret : new Test();}();<span class=3D"Apple-converted-space"=
>&nbsp;</span><br class=3D""><br class=3D"">Not all that pretty, no.<span c=
lass=3D"Apple-converted-space">&nbsp;</span><br class=3D""></blockquote><di=
v class=3D""><br class=3D""></div><div class=3D"">Test* test =3D get_test()=
;&nbsp;</div><div class=3D"">if (!test)&nbsp;</div><div class=3D"">&nbsp;<s=
pan class=3D"Apple-converted-space">&nbsp;</span>test =3D new Test();&nbsp;=
</div><div class=3D""><br class=3D""></div><div class=3D"">Not a one-liner =
but quite simple. Does this come up often?</div><div class=3D"">In other la=
nguages nullable types work a bit differently, would ?: play nice with opti=
onal in C++?</div></div></blockquote></div></div><div style=3D"font-family:=
 Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal;=
 font-weight: normal; letter-spacing: normal; text-align: start; text-inden=
t: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webk=
it-text-stroke-width: 0px;" class=3D""><br class=3D"webkit-block-placeholde=
r"></div><span style=3D"font-family: Helvetica; font-size: 14px; font-style=
: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: n=
ormal; text-align: start; text-indent: 0px; text-transform: none; white-spa=
ce: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none;=
 display: inline !important;" class=3D"">--<span class=3D"Apple-converted-s=
pace">&nbsp;</span></span><br style=3D"font-family: Helvetica; font-size: 1=
4px; font-style: normal; font-variant-caps: normal; font-weight: normal; le=
tter-spacing: normal; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0p=
x;" class=3D""><span style=3D"font-family: Helvetica; font-size: 14px; font=
-style: normal; font-variant-caps: normal; font-weight: normal; letter-spac=
ing: normal; text-align: start; text-indent: 0px; text-transform: none; whi=
te-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float:=
 none; display: inline !important;" class=3D"">You received this message be=
cause you are subscribed to a topic in the Google Groups "ISO C++ Standard =
- Future Proposals" group.</span><br style=3D"font-family: Helvetica; font-=
size: 14px; font-style: normal; font-variant-caps: normal; font-weight: nor=
mal; letter-spacing: normal; text-align: start; text-indent: 0px; text-tran=
sform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-wi=
dth: 0px;" class=3D""><span style=3D"font-family: Helvetica; font-size: 14p=
x; font-style: normal; font-variant-caps: normal; font-weight: normal; lett=
er-spacing: normal; text-align: start; text-indent: 0px; text-transform: no=
ne; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;=
 float: none; display: inline !important;" class=3D"">To unsubscribe from t=
his topic, visit<span class=3D"Apple-converted-space">&nbsp;</span></span><=
a href=3D"https://groups.google.com/a/isocpp.org/d/topic/std-proposals/uNYp=
Dyi7VSA/unsubscribe" style=3D"font-family: Helvetica; font-size: 14px; font=
-style: normal; font-variant-caps: normal; font-weight: normal; letter-spac=
ing: normal; orphans: auto; text-align: start; text-indent: 0px; text-trans=
form: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-t=
ext-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=3D"">https://=
groups.google.com/a/isocpp.org/d/topic/std-proposals/uNYpDyi7VSA/unsubscrib=
e</a><span style=3D"font-family: Helvetica; font-size: 14px; font-style: no=
rmal; font-variant-caps: normal; font-weight: normal; letter-spacing: norma=
l; text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; dis=
play: inline !important;" class=3D"">.</span><br style=3D"font-family: Helv=
etica; font-size: 14px; font-style: normal; font-variant-caps: normal; font=
-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0p=
x; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-te=
xt-stroke-width: 0px;" class=3D""><span style=3D"font-family: Helvetica; fo=
nt-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: =
normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-t=
ransform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke=
-width: 0px; float: none; display: inline !important;" class=3D"">To unsubs=
cribe from this group and all its topics, send an email to<span class=3D"Ap=
ple-converted-space">&nbsp;</span></span><a href=3D"mailto:std-proposals+un=
subscribe@isocpp.org" style=3D"font-family: Helvetica; font-size: 14px; fon=
t-style: normal; font-variant-caps: normal; font-weight: normal; letter-spa=
cing: normal; orphans: auto; text-align: start; text-indent: 0px; text-tran=
sform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-=
text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=3D"">std-pro=
posals+unsubscribe@isocpp.org</a><span style=3D"font-family: Helvetica; fon=
t-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: n=
ormal; letter-spacing: normal; text-align: start; text-indent: 0px; text-tr=
ansform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-=
width: 0px; float: none; display: inline !important;" class=3D"">.</span><b=
r style=3D"font-family: Helvetica; font-size: 14px; font-style: normal; fon=
t-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-a=
lign: start; text-indent: 0px; text-transform: none; white-space: normal; w=
ord-spacing: 0px; -webkit-text-stroke-width: 0px;" class=3D""><span style=
=3D"font-family: Helvetica; font-size: 14px; font-style: normal; font-varia=
nt-caps: normal; font-weight: normal; letter-spacing: normal; text-align: s=
tart; text-indent: 0px; text-transform: none; white-space: normal; word-spa=
cing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !im=
portant;" class=3D"">To post to this group, send email to<span class=3D"App=
le-converted-space">&nbsp;</span></span><a href=3D"mailto:std-proposals@iso=
cpp.org" style=3D"font-family: Helvetica; font-size: 14px; font-style: norm=
al; font-variant-caps: normal; font-weight: normal; letter-spacing: normal;=
 orphans: auto; text-align: start; text-indent: 0px; text-transform: none; =
white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adj=
ust: auto; -webkit-text-stroke-width: 0px;" class=3D"">std-proposals@isocpp=
..org</a><span style=3D"font-family: Helvetica; font-size: 14px; font-style:=
 normal; font-variant-caps: normal; font-weight: normal; letter-spacing: no=
rmal; text-align: start; text-indent: 0px; text-transform: none; white-spac=
e: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; =
display: inline !important;" class=3D"">.</span><br style=3D"font-family: H=
elvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; f=
ont-weight: normal; letter-spacing: normal; text-align: start; text-indent:=
 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit=
-text-stroke-width: 0px;" class=3D""><span style=3D"font-family: Helvetica;=
 font-size: 14px; font-style: normal; font-variant-caps: normal; font-weigh=
t: normal; letter-spacing: normal; text-align: start; text-indent: 0px; tex=
t-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-str=
oke-width: 0px; float: none; display: inline !important;" class=3D"">To vie=
w this discussion on the web visit<span class=3D"Apple-converted-space">&nb=
sp;</span></span><a href=3D"https://groups.google.com/a/isocpp.org/d/msgid/=
std-proposals/a17ed11b-ff92-43d2-bb1f-7c662a18c9e4%40isocpp.org?utm_medium=
=3Demail&amp;utm_source=3Dfooter" style=3D"font-family: Helvetica; font-siz=
e: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal=
; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0p=
x; text-transform: none; white-space: normal; widows: auto; word-spacing: 0=
px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=
=3D"">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/a17ed11b=
-ff92-43d2-bb1f-7c662a18c9e4%40isocpp.org</a><span style=3D"font-family: He=
lvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; fo=
nt-weight: normal; letter-spacing: normal; text-align: start; text-indent: =
0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-=
text-stroke-width: 0px; float: none; display: inline !important;" class=3D"=
">.</span></div></blockquote></div><br class=3D""></div>

<p></p>

-- <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 e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/A1EC2A78-D0D4-4827-8B40-DD3B59B05B68%=
40gmail.com?utm_medium=3Demail&amp;utm_source=3Dfooter">https://groups.goog=
le.com/a/isocpp.org/d/msgid/std-proposals/A1EC2A78-D0D4-4827-8B40-DD3B59B05=
B68%40gmail.com</a>.<br>
<br><!--end of _originalContent --></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/20170523002555.5115986.34526.30284%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com=
/a/isocpp.org/d/msgid/std-proposals/20170523002555.5115986.34526.30284%40gm=
ail.com</a>.<br />

.