Topic: if (... ;...)


Author: Phil Bouchard <philippeb8@gmail.com>
Date: Sun, 18 Nov 2018 20:55:05 -0800 (PST)
Raw View
------=_Part_2062_236172901.1542603305149
Content-Type: multipart/alternative;
 boundary="----=_Part_2063_1031078320.1542603305149"

------=_Part_2063_1031078320.1542603305149
Content-Type: text/plain; charset="UTF-8"

Greetings,

The if statement should have some for-like syntax in order to initialize a
variable and evaluate a condition. Ex:

if (ClassA a = getA(); a.isValid())
{
    cout << "a is valid" << endl;
}

This is much cleaner!


Regards,
-Phil

--
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/85675c90-57f3-4db8-8419-a34cacefa483%40isocpp.org.

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

<div dir=3D"ltr">Greetings,<div><br></div><div>The if statement should have=
 some for-like syntax in order to initialize a variable and evaluate a cond=
ition. Ex:</div><div><br></div><div>if (ClassA a =3D getA(); a.isValid())</=
div><div>{</div><div>=C2=A0 =C2=A0 cout &lt;&lt; &quot;a is valid&quot; &lt=
;&lt; endl;</div><div>}</div><div><br></div><div>This is much cleaner!</div=
><div><br></div><div><br></div><div>Regards,</div><div>-Phil</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/85675c90-57f3-4db8-8419-a34cacefa483%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/85675c90-57f3-4db8-8419-a34cacefa483=
%40isocpp.org</a>.<br />

------=_Part_2063_1031078320.1542603305149--

------=_Part_2062_236172901.1542603305149--

.


Author: Maxim Yanchenko <maxim.yanchenko@gmail.com>
Date: Mon, 19 Nov 2018 12:56:23 +0800
Raw View
--0000000000004e8994057afd579d
Content-Type: text/plain; charset="UTF-8"

Hi Phil,

This was already added in C++17

Maxim

On Mon, 19 Nov 2018, 12:55 Phil Bouchard, <philippeb8@gmail.com> wrote:

> Greetings,
>
> The if statement should have some for-like syntax in order to initialize a
> variable and evaluate a condition. Ex:
>
> if (ClassA a = getA(); a.isValid())
> {
>     cout << "a is valid" << endl;
> }
>
> This is much cleaner!
>
>
> Regards,
> -Phil
>
> --
> 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/85675c90-57f3-4db8-8419-a34cacefa483%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/85675c90-57f3-4db8-8419-a34cacefa483%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

--
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/CA%2B6mTDcFKxBQkD91z0bRAcsYQGBh24Vd23_JHXJ%2BdeGVQQDPbw%40mail.gmail.com.

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

Hi Phil,<div><br></div><div>This was already added in C++17</div><div><br><=
/div><div>Maxim<br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, =
19 Nov 2018, 12:55 Phil Bouchard, &lt;<a href=3D"mailto:philippeb8@gmail.co=
m">philippeb8@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex"><div dir=3D"ltr">Greetings,<div><br></div><div>The if statement should =
have some for-like syntax in order to initialize a variable and evaluate a =
condition. Ex:</div><div><br></div><div>if (ClassA a =3D getA(); a.isValid(=
))</div><div>{</div><div>=C2=A0 =C2=A0 cout &lt;&lt; &quot;a is valid&quot;=
 &lt;&lt; endl;</div><div>}</div><div><br></div><div>This is much cleaner!<=
/div><div><br></div><div><br></div><div>Regards,</div><div>-Phil</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/85675c90-57f3-4db8-8419-a34cacefa483%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/85675c90-57f3-=
4db8-8419-a34cacefa483%40isocpp.org</a>.<br>
</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/CA%2B6mTDcFKxBQkD91z0bRAcsYQGBh24Vd23=
_JHXJ%2BdeGVQQDPbw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CA%2B6mTDcFKx=
BQkD91z0bRAcsYQGBh24Vd23_JHXJ%2BdeGVQQDPbw%40mail.gmail.com</a>.<br />

--0000000000004e8994057afd579d--

.


Author: Phil Bouchard <philippeb8@gmail.com>
Date: Sun, 18 Nov 2018 20:57:23 -0800 (PST)
Raw View
------=_Part_2080_445367003.1542603443327
Content-Type: multipart/alternative;
 boundary="----=_Part_2081_1806723412.1542603443327"

------=_Part_2081_1806723412.1542603443327
Content-Type: text/plain; charset="UTF-8"

Nice!

On Sunday, November 18, 2018 at 11:56:36 PM UTC-5, Maxim Yanchenko wrote:
>
> Hi Phil,
>
> This was already added in C++17
>
> Maxim
>
> On Mon, 19 Nov 2018, 12:55 Phil Bouchard, <phili...@gmail.com
> <javascript:>> wrote:
>
>> Greetings,
>>
>> The if statement should have some for-like syntax in order to initialize
>> a variable and evaluate a condition. Ex:
>>
>> if (ClassA a = getA(); a.isValid())
>> {
>>     cout << "a is valid" << endl;
>> }
>>
>> This is much cleaner!
>>
>>
>> Regards,
>> -Phil
>>
>> --
>> 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-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/85675c90-57f3-4db8-8419-a34cacefa483%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/85675c90-57f3-4db8-8419-a34cacefa483%40isocpp.org?utm_medium=email&utm_source=footer>
>> .
>>
>

--
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/ce1f90de-f69d-4441-9afb-7394987103c2%40isocpp.org.

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

<div dir=3D"ltr">Nice!<br><br>On Sunday, November 18, 2018 at 11:56:36 PM U=
TC-5, Maxim Yanchenko wrote:<blockquote class=3D"gmail_quote" style=3D"marg=
in: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi=
 Phil,<div><br></div><div>This was already added in C++17</div><div><br></d=
iv><div>Maxim<br><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, 19=
 Nov 2018, 12:55 Phil Bouchard, &lt;<a href=3D"javascript:" target=3D"_blan=
k" gdf-obfuscated-mailto=3D"1dC9muj1AQAJ" rel=3D"nofollow" onmousedown=3D"t=
his.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;=
javascript:&#39;;return true;">phili...@gmail.com</a>&gt; wrote:<br></div><=
blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px=
 #ccc solid;padding-left:1ex"><div dir=3D"ltr">Greetings,<div><br></div><di=
v>The if statement should have some for-like syntax in order to initialize =
a variable and evaluate a condition. Ex:</div><div><br></div><div>if (Class=
A a =3D getA(); a.isValid())</div><div>{</div><div>=C2=A0 =C2=A0 cout &lt;&=
lt; &quot;a is valid&quot; &lt;&lt; endl;</div><div>}</div><div><br></div><=
div>This is much cleaner!</div><div><br></div><div><br></div><div>Regards,<=
/div><div>-Phil</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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
1dC9muj1AQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"1dC9muj1AQAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/85675c90-57f3-4db8-8419-a34cacefa483%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/85675c90-57f3-4db8-8419-a34cacefa483%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/85675c90-57f3-4db8-8419-a34cacefa483%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/85675c90-57f3-4db8-<wbr>8419-=
a34cacefa483%40isocpp.org</a><wbr>.<br>
</blockquote></div></div>
</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/ce1f90de-f69d-4441-9afb-7394987103c2%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/ce1f90de-f69d-4441-9afb-7394987103c2=
%40isocpp.org</a>.<br />

------=_Part_2081_1806723412.1542603443327--

------=_Part_2080_445367003.1542603443327--

.