Topic: [std-proposals] Enforce explicit casting on assignme


Author: Johnny Shaw <johnnyshaw02@gmail.com>
Date: Fri, 5 Oct 2018 18:48:32 -0700 (PDT)
Raw View
------=_Part_1003_1879950856.1538790512417
Content-Type: multipart/alternative;
 boundary="----=_Part_1004_845694214.1538790512418"

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



Recently I=E2=80=99ve noticed some interpretations of the following standar=
ds=20
resulting in removing of compiler warnings around implicit conversions to a=
=20
=E2=80=98bool=E2=80=99 type:

=20

1) C++14 =C2=A74.12/1 =E2=80=9CA zero value, null pointer value, or null me=
mber pointer=20
value is converted to false; any other value is converted to true. For=20
direct-initialization (8.5), a prvalue of type std::nullptr_t can be=20
converted to a prvalue of type bool; the resulting value is false.=E2=80=9D
2) C99 and C11 =C2=A76.3.1.2/1 =E2=80=9CWhen any scalar value is converted =
to _Bool, the=20
result is 0 if the value compares equal to 0; otherwise, the result is 1.=
=E2=80=9D

=20

Specifically, the VS1017 compiler has removed the following warning=20
completely:

https://msdn.microsoft.com/en-us/library/b6801kcy.aspx

=20

Over correspondence with Microsoft I=E2=80=99ve noticed it my be due to dir=
ect=20
interpretation of standards. See:

https://developercommunity.visualstudio.com/content/problem/346302/vs2017-1=
58-c-fails-to-warn-when-forcing-int-to-boo.html

https://developercommunity.visualstudio.com/content/problem/349342/visual-s=
tudio-2017-158-allows-implicit-conversion.html

=20

This is moving the bar backward a bit, resulting in unintended bugs being=
=20
overlooked that would have previously been caught by the compiler.

=20

While there is value in implicit conversion under some circumstances.=20
Explicit conversion clearly identifies the intent and eliminates mistakes.=
=20
Enforcing a standard that requires explicit conversion to bool, at very=20
least for a return value, will eliminate possible coding errors. The=20
following are some mundane examples and could be overlooked with given more=
=20
complex code:

=20
bool TestFunc(int a)
{
    return a;=20
}=20

bool TestFuncNotOver100(int a)=20
{=20
    if (a > 100)=20
    {=20
        return a;
    }=20
    return true;=20
}=20

bool TestPointerForNull(void* pvX)=20
{
    if (nullptr !=3D pvX)=20
    {
        return false;=20
    }=20
    return pvX;=20
}


=20

At very least requiring a check against a matching type by boolean=20
operation, for example:

bool TestFunc(int a)
{
    return (0 =3D=3D a);=20
}


=20

Or for assignment:

=20
int a =3D 1;
bool bValue =3D (0 =3D=3D a);


=20

Moreover, requiring an explicit cast:

=20
bool TestFunc(int a)
{
    return static_cast<bool>(a);=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/5df28d28-a2f4-47cd-9da7-49c91ed6d6f4%40isocpp.or=
g.

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

<div dir=3D"ltr"><p class=3D"MsoNormal">Recently I=E2=80=99ve noticed some
interpretations of the following standards resulting in removing of compile=
r
warnings around implicit conversions to a =E2=80=98bool=E2=80=99 type:<o:p>=
</o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal"><sup><span style=3D"font-size: 7pt; font-family: Ari=
al, sans-serif; color: rgb(36, 39, 41); border-width: 1pt; border-style: no=
ne; border-color: windowtext; padding: 0in; background-image: initial; back=
ground-position: initial; background-size: initial; background-repeat: init=
ial; background-attachment: initial; background-origin: initial; background=
-clip: initial;">1)</span></sup><span style=3D"font-size: 9pt; font-family:=
 Arial, sans-serif; color: rgb(36, 39, 41); background-image: initial; back=
ground-position: initial; background-size: initial; background-repeat: init=
ial; background-attachment: initial; background-origin: initial; background=
-clip: initial;">=C2=A0C++14
=C2=A74.12/1 =E2=80=9CA zero value, null pointer value, or null member poin=
ter value is converted
to=C2=A0</span><code><span style=3D"font-size: 10pt; font-family: Consolas;=
 color: rgb(36, 39, 41); border-width: 1pt; border-style: none; border-colo=
r: windowtext; padding: 0in; background: rgb(239, 240, 241);">false</span><=
/code><span style=3D"font-size: 9pt; font-family: Arial, sans-serif; color:=
 rgb(36, 39, 41); background-image: initial; background-position: initial; =
background-size: initial; background-repeat: initial; background-attachment=
: initial; background-origin: initial; background-clip: initial;">; any oth=
er
value is converted to=C2=A0</span><code><span style=3D"font-size: 10pt; fon=
t-family: Consolas; color: rgb(36, 39, 41); border-width: 1pt; border-style=
: none; border-color: windowtext; padding: 0in; background: rgb(239, 240, 2=
41);">true</span></code><span style=3D"font-size: 9pt; font-family: Arial, =
sans-serif; color: rgb(36, 39, 41); background-image: initial; background-p=
osition: initial; background-size: initial; background-repeat: initial; bac=
kground-attachment: initial; background-origin: initial; background-clip: i=
nitial;">. For direct-initialization (8.5), a prvalue of type=C2=A0</span><=
code><span style=3D"font-size: 10pt; font-family: Consolas; color: rgb(36, =
39, 41); border-width: 1pt; border-style: none; border-color: windowtext; p=
adding: 0in; background: rgb(239, 240, 241);">std::nullptr_t</span></code><=
span style=3D"font-size: 9pt; font-family: Arial, sans-serif; color: rgb(36=
, 39, 41); background-image: initial; background-position: initial; backgro=
und-size: initial; background-repeat: initial; background-attachment: initi=
al; background-origin: initial; background-clip: initial;">=C2=A0can be con=
verted to a prvalue of type=C2=A0</span><code><span style=3D"font-size: 10p=
t; font-family: Consolas; color: rgb(36, 39, 41); border-width: 1pt; border=
-style: none; border-color: windowtext; padding: 0in; background: rgb(239, =
240, 241);">bool</span></code><span style=3D"font-size: 9pt; font-family: A=
rial, sans-serif; color: rgb(36, 39, 41); background-image: initial; backgr=
ound-position: initial; background-size: initial; background-repeat: initia=
l; background-attachment: initial; background-origin: initial; background-c=
lip: initial;">; the resulting value is=C2=A0</span><code><span style=3D"fo=
nt-size: 10pt; font-family: Consolas; color: rgb(36, 39, 41); border-width:=
 1pt; border-style: none; border-color: windowtext; padding: 0in; backgroun=
d: rgb(239, 240, 241);">false</span></code><span style=3D"font-size: 9pt; f=
ont-family: Arial, sans-serif; color: rgb(36, 39, 41); background-image: in=
itial; background-position: initial; background-size: initial; background-r=
epeat: initial; background-attachment: initial; background-origin: initial;=
 background-clip: initial;">.=E2=80=9D</span><span style=3D"font-size:9.0pt=
;font-family:&quot;Arial&quot;,sans-serif;
color:#242729"><br>
</span><sup><span style=3D"font-size: 7pt; font-family: Arial, sans-serif; =
color: rgb(36, 39, 41); border-width: 1pt; border-style: none; border-color=
: windowtext; padding: 0in; background-image: initial; background-position:=
 initial; background-size: initial; background-repeat: initial; background-=
attachment: initial; background-origin: initial; background-clip: initial;"=
>2)</span></sup><span style=3D"font-size: 9pt; font-family: Arial, sans-ser=
if; color: rgb(36, 39, 41); background-image: initial; background-position:=
 initial; background-size: initial; background-repeat: initial; background-=
attachment: initial; background-origin: initial; background-clip: initial;"=
>=C2=A0C99 and
C11 =C2=A76.3.1.2/1 =E2=80=9CWhen any scalar value is converted to=C2=A0</s=
pan><code><span style=3D"font-size: 10pt; font-family: Consolas; color: rgb=
(36, 39, 41); border-width: 1pt; border-style: none; border-color: windowte=
xt; padding: 0in; background: rgb(239, 240, 241);">_Bool</span></code><span=
 style=3D"font-size: 9pt; font-family: Arial, sans-serif; color: rgb(36, 39=
, 41); background-image: initial; background-position: initial; background-=
size: initial; background-repeat: initial; background-attachment: initial; =
background-origin: initial; background-clip: initial;">, the result is 0 if=
 the value compares equal to 0; otherwise, the
result is 1.=E2=80=9D</span><o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">Specifically, the VS1017 compiler has
removed the following warning completely:<o:p></o:p></p>

<p class=3D"MsoNormal"><a href=3D"https://msdn.microsoft.com/en-us/library/=
b6801kcy.aspx">https://msdn.microsoft.com/en-us/library/b6801kcy.aspx</a><o=
:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">Over correspondence with Microsoft I=E2=80=99ve
noticed it my be due to
direct interpretation of standards. See:<o:p></o:p></p>

<p class=3D"MsoNormal"><a href=3D"https://developercommunity.visualstudio.c=
om/content/problem/346302/vs2017-158-c-fails-to-warn-when-forcing-int-to-bo=
o.html">https://developercommunity.visualstudio.com/content/problem/346302/=
vs2017-158-c-fails-to-warn-when-forcing-int-to-boo.html</a><o:p></o:p></p>

<p class=3D"MsoNormal"><a href=3D"https://developercommunity.visualstudio.c=
om/content/problem/349342/visual-studio-2017-158-allows-implicit-conversion=
..html">https://developercommunity.visualstudio.com/content/problem/349342/v=
isual-studio-2017-158-allows-implicit-conversion.html</a><o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">This is moving the bar backward a bit,
resulting in unintended bugs being overlooked that would have previously be=
en
caught by the compiler.<o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">While there is value in implicit
conversion under some circumstances. Explicit conversion clearly identifies=
 the
intent and eliminates mistakes. Enforcing a standard that requires explicit
conversion to bool, at very least for a return value, will eliminate possib=
le
coding errors. The following are some mundane examples and could be overloo=
ked
with given more complex code:<o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); b=
order-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; ov=
erflow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #008;" class=3D"styled-by-prettify">bool</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">TestFunc</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">int</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> a</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"><br></span><font color=3D"#000000"><span style=3D"color: #000;" class=3D"=
styled-by-prettify">=C2=A0 =C2=A0 </span></font><span style=3D"color: #008;=
" class=3D"styled-by-prettify">return</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> a</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> <br></span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">}</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <br=
><br></span><span style=3D"color: #008;" class=3D"styled-by-prettify">bool<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">TestFuncNotOver100</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span style=3D"colo=
r: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> <br></span><span style=3D"color: #660;" clas=
s=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> <br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">if</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">a=
 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #066;" class=3D"styled-by-prettify">100</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">)</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> <br>=C2=A0 =C2=A0 </span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> <br></span><font color=3D"#000000"><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 </span></font><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">return</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
 a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0=
 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> <br>=C2=A0 =C2=A0=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">true</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> <br></span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">}</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> <br><br></span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">bool</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #606;" class=3D"styled-by-p=
rettify">TestPointerForNull</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">(</span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">void</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">*</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> pvX</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> <br></span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">if</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: #008;" class=3D=
"styled-by-prettify">nullptr</span><span style=3D"color: #000;" class=3D"st=
yled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">!=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> pvX</span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <br>=C2=A0 =
=C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by=
-prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">fa=
lse</span><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> <br>=C2=A0 =C2=
=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> <br>=C2=A0 =C2=
=A0 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">return=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> pvX</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> <br></span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">}</span></div></code></div><=
p class=3D"MsoNormal"><br><o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">At very least requiring a check against a
matching type by boolean operation, for example:<o:p></o:p></p>

<br>

<div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); b=
order-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; ov=
erflow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #008;" class=3D"styled-by-prettify">bool</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">TestFunc</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">int</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> a</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</=
span><span style=3D"color: #066;" class=3D"styled-by-prettify">0</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D=3D</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify"> a</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">);</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> <br></span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">}</span></div></code></div><p class=3D"MsoNormal"><=
br><o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">Or for assignment:<o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); b=
order-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; ov=
erflow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #008;" class=3D"styled-by-prettify">int</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> a </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=
: #066;" class=3D"styled-by-prettify">1</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled=
-by-prettify">bool</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> bValue </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><s=
pan style=3D"color: #066;" class=3D"styled-by-prettify">0</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">=3D=3D</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> a</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">);</span></div></code></div><p class=3D"MsoNormal=
"><br><o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<p class=3D"MsoNormal">Moreover, requiring an explicit cast:<o:p></o:p></p>

<p class=3D"MsoNormal">=C2=A0<o:p></o:p></p>

<div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, 250); b=
order-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; ov=
erflow-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #008;" class=3D"styled-by-prettify">bool</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #606;" class=3D"styled-by-prettify">TestFunc</span><span st=
yle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"co=
lor: #008;" class=3D"styled-by-prettify">int</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> a</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">return</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">sta=
tic_cast</span><span style=3D"color: #080;" class=3D"styled-by-prettify">&l=
t;bool&gt;</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">a</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> <br></span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">}</span></div></code></div><p c=
lass=3D"MsoNormal"><br><o:p></o:p></p></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/5df28d28-a2f4-47cd-9da7-49c91ed6d6f4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5df28d28-a2f4-47cd-9da7-49c91ed6d6f4=
%40isocpp.org</a>.<br />

------=_Part_1004_845694214.1538790512418--

------=_Part_1003_1879950856.1538790512417--

.