Topic: Extend uniform initializer for unions
Author: "Dr. Frank Heimes" <drfghde10@kabelbw.de>
Date: Mon, 9 Jun 2014 04:07:05 -0700 (PDT)
Raw View
------=_Part_665_1159743.1402312025776
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
The new uniform initializer lists allow initializing compound types=20
conveniently.=20
But consider this concrete example:
#include "stdafx.h"
#include "objidl.h"
=20
int _tmain(int argc, _TCHAR* argv[])
{
IStream* s;
STGMEDIUM newStyle {TYMED_ISTREAM, s}; (7)
=20
STGMEDIUM oldStyle; (9)
oldStyle.tymed =3D TYMED_ISTREAM;
oldStyle.pstm =3D s;
oldStyle.pUnkForRelease =3D nullptr;
return 0;
}
=20
Unfortunately, line (7) fails to compile with error C2440, because 'IStream=
=20
*' cannot be converted to 'HBITMAP'. So the old syntax starting at line (9)=
=20
still has to be used.
The reason is that STGMEDIUM contains an embedded union and according to=20
the current standard, an initializer may only be provided for the first=20
member of a union, which is an HBITMAP in this case:
*8.5.1/15 When a union is initialized with a brace-enclosed initializer,=20
the braces shall only contain an initializer-clause for the first=20
non-static data member of the union.*
I see no good justification for this limitation. Clearly, only one argument=
=20
can be provided to initialize a union. But the compiler should compare the=
=20
type of the supplied argument with that of all union members and initialize=
=20
the member that has a compatible type.
What happens if the argument can be implicitly converted to more than one=
=20
union member type?
Option 1: The compiler issues a warning or an error (=E2=80=9Cambiguous=
=20
conversion=E2=80=9D). This will likely break a lot of existing code that re=
lies on=20
the current behavior. I think many unions have member types that are=20
implicitly convertible into each other.
Option 2: The compiler issues an error only if an explicit cast is=20
applied. This will not break existing code but still allow the user to be=
=20
explicit about the type conversion.
Option 3: The compiler silently applies the first applicable conversion.=
=20
This might be OK. My gut feeling tells me that this may also lead to=20
surprising and unexpected results but I couldn=E2=80=99t figure out an exam=
ple yet.
A common constraint for this scenario is that the union is supplied by a=20
third party (e.g. Microsoft) so that converting constructors cannot be=20
added to it.
The following code contains a minimum example that sketches the problem.=20
The initializer for b4 should compile and assign nullptr to b4.l.
struct A { int k; void* l; };
union B { int k; void* l; };
void T()
{
A a1 {1, nullptr}; // OK
A a2 {'c', 2.0}; // Error: cannot convert from 'double' to 'void *'
B b1 {1}; // OK
B b2 {2.0}; // Implicitly convertible (with warnings)
B b3 {'c'}; // Implicitly converted from char to int
B b4 {nullptr}; // Error: 'nullptr' not convertible to 'int'
}
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
------=_Part_665_1159743.1402312025776
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-US">Th=
e new
uniform initializer lists allow initializing compound types conveniently.</=
span>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">But consider
this concrete example:</span></p>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;
font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">#in=
clude</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:blac=
k;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-size:12.0pt;font-fam=
ily:Consolas;
color:#A31515;mso-ansi-language:EN-US" lang=3D"EN-US">"stdafx.h"</span><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-langu=
age:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:blue;mso-ansi-language:E=
N-US" lang=3D"EN-US">#include</span><span style=3D"font-size:12.0pt;font-fa=
mily:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-size:12.0pt;font-fam=
ily:Consolas;
color:#A31515;mso-ansi-language:EN-US" lang=3D"EN-US">"objidl.h"</span><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-langu=
age:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span></pre><pre style=3D"background:white"><s=
pan style=3D"font-size:12.0pt;font-family:Consolas;color:blue;mso-ansi-lang=
uage:
EN-US" lang=3D"EN-US">int</span><span style=3D"font-size:12.0pt;font-family=
:Consolas;
color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> </span><span styl=
e=3D"font-size:12.0pt;font-family:Consolas;color:#6F008A;mso-ansi-language:
EN-US" lang=3D"EN-US">_tmain</span><span style=3D"font-size:12.0pt;font-fam=
ily:Consolas;
color:black;mso-ansi-language:EN-US" lang=3D"EN-US">(</span><span style=3D"=
font-size:
12.0pt;font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-=
US">int</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:bl=
ack;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-size:12.0pt;font-fam=
ily:Consolas;
color:gray;mso-ansi-language:EN-US" lang=3D"EN-US">argc</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US">, </span><span style=3D"font-size:12.0pt;font-fa=
mily:Consolas;
color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">_TCHAR</span><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US">* </span><span style=3D"font-size:12.0pt;font-fa=
mily:Consolas;
color:gray;mso-ansi-language:EN-US" lang=3D"EN-US">argv</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US">[])</span></pre><pre style=3D"background:white"><span=
style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-langua=
ge:
EN-US" lang=3D"EN-US">{</span></pre><pre style=3D"background:white"><span s=
tyle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language=
:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
IStream</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:bl=
ack;mso-ansi-language:
EN-US" lang=3D"EN-US">* s;</span></pre><pre style=3D"background:white"=
><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-=
language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
STGMEDIUM</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:=
black;mso-ansi-language:
EN-US" lang=3D"EN-US"> newStyle {</span><span style=3D"font-size:=
12.0pt;
font-family:Consolas;color:darkslategray;mso-ansi-language:EN-US" lang=3D"E=
N-US">TYMED_ISTREAM</span><span style=3D"font-size:12.0pt;font-family:Conso=
las;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US">, s}; (7)</span></pre><pr=
e style=3D"background:white"><span style=3D"font-size:12.0pt;font-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> </span><=
/pre><pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-f=
amily:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> &n=
bsp; STGMEDIUM oldStyle; &nbs=
p; &=
nbsp; (9)</span></pre><pre style=3D"background:white"><span styl=
e=3D"font-size:12.0pt;font-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> &n=
bsp; oldStyle.tymed =3D TYMED_ISTREAM;</span></pre><pre style=3D"=
background:white"><span style=3D"font-size:12.0pt;font-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> &n=
bsp; oldStyle.pstm =3D s;</span></pre><pre style=3D"backgrou=
nd:white"><span style=3D"font-size:12.0pt;font-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> &n=
bsp; oldStyle.pUnkForRelease =3D </span><span style=3D"font-=
size:12.0pt;font-family:Consolas;color:blue;mso-ansi-language:
EN-US" lang=3D"EN-US">nullptr</span><span style=3D"font-size:12.0pt;font-fa=
mily:Consolas;
color:black;mso-ansi-language:EN-US" lang=3D"EN-US">;</span></pre><pre styl=
e=3D"background:white"><span style=3D"font-size:12.0pt;font-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> &n=
bsp; </span><span style=3D"font-size:12.0pt;font-family:Consolas;color=
:blue">return</span><span style=3D"font-size:12.0pt;font-family:Consolas;co=
lor:black"> 0;</span></pre><pre style=3D"background:white"><span style=
=3D"font-size:12.0pt;font-family:Consolas;
color:black">}</span></pre><pre style=3D"background:white"><span style=3D"m=
so-ansi-language:EN-US" lang=3D"EN-US"> </span></pre>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">Unfortunately,
line (7) fails to compile with error C2440, because </span><span style=3D"f=
ont-size:10.0pt;line-height:115%;font-family:"Courier New";mso-fa=
reast-font-family:
"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:DE=
" lang=3D"EN-US">'IStream *'</span><span style=3D"mso-ansi-language:EN-US" =
lang=3D"EN-US"> cannot be converted to </span><span style=3D"font-size:10.0=
pt;line-height:115%;font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US=
;mso-fareast-language:
DE" lang=3D"EN-US">'HBITMAP'</span><span style=3D"mso-ansi-language:EN-US" =
lang=3D"EN-US">. So the
old syntax starting at line (9) still has to be used.</span></p>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">The reason
is that STGMEDIUM contains an embedded union and according to the current
standard, an initializer may only be provided for the first member of a uni=
on,
which is an HBITMAP in this case:</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:35.4pt"><i style=3D"mso-bidi-fo=
nt-style:
normal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-US">8.5.1/15 Whe=
n a union
is initialized with a brace-enclosed initializer, the braces shall only con=
tain
an initializer-clause for the first non-static data member of the union.</s=
pan></i></p>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">I see no
good justification for this limitation. Clearly, only one argument can be
provided to initialize a union. But the compiler should compare the type of=
the
supplied argument with that of all union members and initialize the member =
that
has a compatible type.</span></p>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">What
happens if the argument can be implicitly converted to more than one union
member type?</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:2.0cm;text-indent:-49.6pt;tab-s=
tops:2.0cm"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-US">Option 1=
:<span style=3D"mso-tab-count:
1"> </span>The compiler issues a warning or an error (=E2=
=80=9Cambiguous conversion=E2=80=9D).
This will likely break a lot of existing code that relies on the current
behavior. I think many unions have member types that are implicitly convert=
ible
into each other.</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:2.0cm;text-indent:-49.6pt;tab-s=
tops:2.0cm"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-US">Option 2=
:<span style=3D"mso-tab-count:
1"> </span>The compiler issues an error only if an explic=
it cast is applied.
This will not break existing code but still allow the user to be explicit a=
bout
the type conversion.</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:2.0cm;text-indent:-49.6pt;tab-s=
tops:2.0cm"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-US">Option 3=
:<span style=3D"mso-tab-count:
1"> </span>The compiler silently applies the first applic=
able conversion.
This might be OK. My gut feeling tells me that this may also lead to surpri=
sing
and unexpected results but I couldn=E2=80=99t figure out an example yet.</s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">A common
constraint for this scenario is that the union is supplied by a third party
(e.g. Microsoft) so that converting constructors cannot be added to it.</sp=
an></p>
<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:EN-US" lang=3D"EN-U=
S">The
following code contains a minimum example that sketches the problem. The
initializer for b4 should compile and assign nullptr to b4.l.</span></p>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;
font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">str=
uct</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;=
mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-size:12.0pt;font-fam=
ily:Consolas;
color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">A</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> { </span><span style=3D"font-size:12.0pt;f=
ont-family:
Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">int</span><span=
style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-langua=
ge:
EN-US" lang=3D"EN-US"> k; </span><span style=3D"font-size:12.0pt;
font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">voi=
d</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US">* l; };</span></pre><pre style=3D"backgroun=
d:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;m=
so-ansi-language:
EN-US" lang=3D"EN-US"> </span></pre><pre style=3D"background:white"><span s=
tyle=3D"font-size:12.0pt;font-family:Consolas;color:blue;mso-ansi-language:=
EN-US" lang=3D"EN-US">union</span><span style=3D"font-size:12.0pt;font-fami=
ly:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-size:12.0pt;font-fam=
ily:Consolas;
color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">B</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> { </span><span style=3D"font-size:12.0pt;f=
ont-family:
Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">int</span><span=
style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-langua=
ge:
EN-US" lang=3D"EN-US"> k; </span><span style=3D"font-size:12.0pt;
font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">voi=
d</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US">* l; };</span></pre><pre style=3D"backgroun=
d:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;m=
so-ansi-language:
EN-US" lang=3D"EN-US"> </span></pre><pre style=3D"background:white"><span s=
tyle=3D"font-size:12.0pt;font-family:Consolas;color:blue;mso-ansi-language:=
EN-US" lang=3D"EN-US">void</span><span style=3D"font-size:12.0pt;font-famil=
y:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> T()</span></pre><pre style=3D"background:white"=
><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-=
language:
EN-US" lang=3D"EN-US">{</span></pre><pre style=3D"background:white"><span s=
tyle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language=
:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
A</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US"> a1 {1, </span><span style=3D"font-siz=
e:12.0pt;
font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">nul=
lptr</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black=
;mso-ansi-language:
EN-US" lang=3D"EN-US">}; </span><span style=3D"font-=
size:12.0pt;
font-family:Consolas;color:green;mso-ansi-language:EN-US" lang=3D"EN-US">//=
OK</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:b=
lack;mso-ansi-language:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
A</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US"> a2 {</span><span style=3D"font-size:12.0pt=
;
font-family:Consolas;color:#A31515;mso-ansi-language:EN-US" lang=3D"EN-US">=
'c'</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;=
mso-ansi-language:
EN-US" lang=3D"EN-US">, 2.0}; </span><span styl=
e=3D"font-size:12.0pt;font-family:Consolas;color:green;mso-ansi-language:
EN-US" lang=3D"EN-US">// Error: cannot convert from&nbs=
p;'double' to 'void *'</span><span style=3D"font-size:12.0pt=
;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US"> b1 {1}; </span><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:green;mso-ansi-langu=
age:
EN-US" lang=3D"EN-US">// OK</span><span style=3D"font-size:12.0pt;font=
-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"></span></pre><=
pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family:
Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US"> &n=
bsp; </span><span style=3D"font-size:12.0pt;font-family:Consolas;color=
:#2B91AF;
mso-ansi-language:EN-US" lang=3D"EN-US">B</span><span style=3D"font-size:12=
..0pt;
font-family:Consolas;color:black;mso-ansi-language:EN-US" lang=3D"EN-US">&n=
bsp;b2 {2.0}; </span><span style=3D"font-size:1=
2.0pt;font-family:Consolas;color:green;mso-ansi-language:
EN-US" lang=3D"EN-US">// Implicitly convertible (with w=
arnings)</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:b=
lack;mso-ansi-language:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US"> b3 {</span><span style=3D"font-size:12.0pt=
;
font-family:Consolas;color:#A31515;mso-ansi-language:EN-US" lang=3D"EN-US">=
'c'</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;=
mso-ansi-language:
EN-US" lang=3D"EN-US">}; </span><span style=3D"font-=
size:12.0pt;
font-family:Consolas;color:green;mso-ansi-language:EN-US" lang=3D"EN-US">//=
Implicitly converted from char to int</span>=
<span style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-l=
anguage:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-ansi-language:
EN-US" lang=3D"EN-US"> </span><span style=3D"font-si=
ze:12.0pt;
font-family:Consolas;color:#2B91AF;mso-ansi-language:EN-US" lang=3D"EN-US">=
B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;ms=
o-ansi-language:
EN-US" lang=3D"EN-US"> b4 {</span><span style=3D"font-size:12.0pt=
;
font-family:Consolas;color:blue;mso-ansi-language:EN-US" lang=3D"EN-US">nul=
lptr</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black=
;mso-ansi-language:
EN-US" lang=3D"EN-US">}; </span><span style=3D"font-=
size:12.0pt;
font-family:Consolas;color:green;mso-ansi-language:EN-US" lang=3D"EN-US">//=
Error: 'nullptr' not convertible to 'int'</s=
pan><span style=3D"font-size:12.0pt;font-family:Consolas;color:black;mso-an=
si-language:
EN-US" lang=3D"EN-US"></span></pre><pre style=3D"background:white"><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:black">}</span></pre><!-=
-[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>DE</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=3D"Cambria Math"/>
<m:brkBin m:val=3D"before"/>
<m:brkBinSub m:val=3D"--"/>
<m:smallFrac m:val=3D"off"/>
<m:dispDef/>
<m:lMargin m:val=3D"0"/>
<m:rMargin m:val=3D"0"/>
<m:defJc m:val=3D"centerGroup"/>
<m:wrapIndent m:val=3D"1440"/>
<m:intLim m:val=3D"subSup"/>
<m:naryLim m:val=3D"undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState=3D"false" DefUnhideWhenUsed=3D"true"
DefSemiHidden=3D"true" DefQFormat=3D"false" DefPriority=3D"99"
LatentStyleCount=3D"267">
<w:LsdException Locked=3D"false" Priority=3D"0" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Normal"/>
<w:LsdException Locked=3D"false" Priority=3D"9" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"heading 1"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 2"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 3"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 4"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 5"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 6"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 7"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 8"/>
<w:LsdException Locked=3D"false" Priority=3D"9" QFormat=3D"true" Name=3D"=
heading 9"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 1"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 2"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 3"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 4"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 5"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 6"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 7"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 8"/>
<w:LsdException Locked=3D"false" Priority=3D"39" Name=3D"toc 9"/>
<w:LsdException Locked=3D"false" Priority=3D"35" QFormat=3D"true" Name=3D=
"caption"/>
<w:LsdException Locked=3D"false" Priority=3D"10" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Title"/>
<w:LsdException Locked=3D"false" Priority=3D"1" Name=3D"Default Paragraph=
Font"/>
<w:LsdException Locked=3D"false" Priority=3D"11" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtitle"/>
<w:LsdException Locked=3D"false" Priority=3D"22" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Strong"/>
<w:LsdException Locked=3D"false" Priority=3D"20" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Emphasis"/>
<w:LsdException Locked=3D"false" Priority=3D"59" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Table Grid"/>
<w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" Name=3D"Placeho=
lder Text"/>
<w:LsdException Locked=3D"false" Priority=3D"1" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"No Spacing"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 1"/>
<w:LsdException Locked=3D"false" UnhideWhenUsed=3D"false" Name=3D"Revisio=
n"/>
<w:LsdException Locked=3D"false" Priority=3D"34" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"List Paragraph"/>
<w:LsdException Locked=3D"false" Priority=3D"29" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Quote"/>
<w:LsdException Locked=3D"false" Priority=3D"30" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Quote"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 1"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 2"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 3"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 4"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 5"/>
<w:LsdException Locked=3D"false" Priority=3D"60" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Shading Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"61" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light List Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"62" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Light Grid Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"63" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 1 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"64" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Shading 2 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"65" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 1 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"66" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium List 2 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"67" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 1 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"68" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 2 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"69" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Medium Grid 3 Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"70" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Dark List Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"71" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Shading Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"72" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful List Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"73" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" Name=3D"Colorful Grid Accent 6"/>
<w:LsdException Locked=3D"false" Priority=3D"19" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Emphasis"/>
<w:LsdException Locked=3D"false" Priority=3D"21" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Emphasis"/>
<w:LsdException Locked=3D"false" Priority=3D"31" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Subtle Reference"/>
<w:LsdException Locked=3D"false" Priority=3D"32" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Intense Reference"/>
<w:LsdException Locked=3D"false" Priority=3D"33" SemiHidden=3D"false"
UnhideWhenUsed=3D"false" QFormat=3D"true" Name=3D"Book Title"/>
<w:LsdException Locked=3D"false" Priority=3D"37" Name=3D"Bibliography"/>
<w:LsdException Locked=3D"false" Priority=3D"39" QFormat=3D"true" Name=3D=
"TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Normale Tabelle";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]--></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
------=_Part_665_1159743.1402312025776--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Mon, 9 Jun 2014 15:22:00 +0300
Raw View
On 9 June 2014 14:07, Dr. Frank Heimes <drfghde10@kabelbw.de> wrote:
> The following code contains a minimum example that sketches the problem. The
> initializer for b4 should compile and assign nullptr to b4.l.
>
> struct A { int k; void* l; };
>
>
>
> union B { int k; void* l; };
>
>
>
> void T()
>
> {
>
> A a1 {1, nullptr}; // OK
>
> A a2 {'c', 2.0}; // Error: cannot convert from 'double' to 'void *'
>
> B b1 {1}; // OK
>
> B b2 {2.0}; // Implicitly convertible (with warnings)
>
> B b3 {'c'}; // Implicitly converted from char to int
>
> B b4 {nullptr}; // Error: 'nullptr' not convertible to 'int'
>
> }
union B { int k; void* l; };
struct BWrap {
B b;
BWrap(int k) {b.k = k;}
BWrap(void* l) {b.l = l;}
operator B&() {return b;}
};
int main()
{
BWrap bw{nullptr};
BWrap bw2{5};
}
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
.
Author: "'Geoffrey Romer' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Tue, 10 Jun 2014 11:27:33 -0700
Raw View
--001a11c11708344a9704fb7f7bb4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I'd rather see this kind of thing addressed through a proposal for a tagged
variant type in the standard library (e.g. boost::variant).
On Mon, Jun 9, 2014 at 4:07 AM, Dr. Frank Heimes <drfghde10@kabelbw.de>
wrote:
> The new uniform initializer lists allow initializing compound types
> conveniently.
>
> But consider this concrete example:
>
> #include "stdafx.h"
>
> #include "objidl.h"
>
>
>
> int _tmain(int argc, _TCHAR* argv[])
>
> {
>
> IStream* s;
>
> STGMEDIUM newStyle {TYMED_ISTREAM, s}; (7)
>
>
>
> STGMEDIUM oldStyle; (9)
>
> oldStyle.tymed =3D TYMED_ISTREAM;
>
> oldStyle.pstm =3D s;
>
> oldStyle.pUnkForRelease =3D nullptr;
>
> return 0;
>
> }
>
>
>
> Unfortunately, line (7) fails to compile with error C2440, because 'IStre=
am
> *' cannot be converted to 'HBITMAP'. So the old syntax starting at line
> (9) still has to be used.
>
> The reason is that STGMEDIUM contains an embedded union and according to
> the current standard, an initializer may only be provided for the first
> member of a union, which is an HBITMAP in this case:
>
> *8.5.1/15 When a union is initialized with a brace-enclosed initializer,
> the braces shall only contain an initializer-clause for the first
> non-static data member of the union.*
>
> I see no good justification for this limitation. Clearly, only one
> argument can be provided to initialize a union. But the compiler should
> compare the type of the supplied argument with that of all union members
> and initialize the member that has a compatible type.
>
> What happens if the argument can be implicitly converted to more than one
> union member type?
>
> Option 1: The compiler issues a warning or an error (=E2=80=9Cambiguou=
s
> conversion=E2=80=9D). This will likely break a lot of existing code that =
relies on
> the current behavior. I think many unions have member types that are
> implicitly convertible into each other.
>
> Option 2: The compiler issues an error only if an explicit cast is
> applied. This will not break existing code but still allow the user to be
> explicit about the type conversion.
>
> Option 3: The compiler silently applies the first applicable
> conversion. This might be OK. My gut feeling tells me that this may also
> lead to surprising and unexpected results but I couldn=E2=80=99t figure o=
ut an
> example yet.
>
> A common constraint for this scenario is that the union is supplied by a
> third party (e.g. Microsoft) so that converting constructors cannot be
> added to it.
>
> The following code contains a minimum example that sketches the problem.
> The initializer for b4 should compile and assign nullptr to b4.l.
>
> struct A { int k; void* l; };
>
> union B { int k; void* l; };
>
> void T()
>
> {
>
> A a1 {1, nullptr}; // OK
>
> A a2 {'c', 2.0}; // Error: cannot convert from 'double' to 'void *=
'
>
> B b1 {1}; // OK
>
> B b2 {2.0}; // Implicitly convertible (with warnings)
>
> B b3 {'c'}; // Implicitly converted from char to int
>
> B b4 {nullptr}; // Error: 'nullptr' not convertible to 'int'
>
> }
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
--=20
---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.
--001a11c11708344a9704fb7f7bb4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I'd rather see this kind of thing addressed through a =
proposal for a tagged variant type in the standard library (e.g. boost::var=
iant).</div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">O=
n Mon, Jun 9, 2014 at 4:07 AM, Dr. Frank Heimes <span dir=3D"ltr"><<a hr=
ef=3D"mailto:drfghde10@kabelbw.de" target=3D"_blank">drfghde10@kabelbw.de</=
a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span lang=3D"EN-US">The ne=
w
uniform initializer lists allow initializing compound types conveniently.</=
span>
<p class=3D"MsoNormal"><span lang=3D"EN-US">But consider
this concrete example:</span></p>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:blue" lang=3D"EN-US">#include</span><span style=3D"font-siz=
e:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=C2=A0</span><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:#a31515" lang=3D"EN-=
US">"stdafx.h"</span><span style=3D"font-size:12.0pt;font-family:=
Consolas;color:black" lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:blue" lang=3D"EN-US">#include</span><span style=3D"font-siz=
e:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=C2=A0</span><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:#a31515" lang=3D"EN-=
US">"objidl.h"</span><span style=3D"font-size:12.0pt;font-family:=
Consolas;color:black" lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0</span></pre><pre style=3D"back=
ground:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:bl=
ue" lang=3D"EN-US">int</span><span style=3D"font-size:12.0pt;font-family:Co=
nsolas;color:black" lang=3D"EN-US">=C2=A0</span><span style=3D"font-size:12=
..0pt;font-family:Consolas;color:#6f008a" lang=3D"EN-US">_tmain</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=
(</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:blue" la=
ng=3D"EN-US">int</span><span style=3D"font-size:12.0pt;font-family:Consolas=
;color:black" lang=3D"EN-US">=C2=A0</span><span style=3D"font-size:12.0pt;f=
ont-family:Consolas;color:gray" lang=3D"EN-US">argc</span><span style=3D"fo=
nt-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">,=C2=A0</sp=
an><span style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=
=3D"EN-US">_TCHAR</span><span style=3D"font-size:12.0pt;font-family:Consola=
s;color:black" lang=3D"EN-US">*=C2=A0</span><span style=3D"font-size:12.0pt=
;font-family:Consolas;color:gray" lang=3D"EN-US">argv</span><span style=3D"=
font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">[])</span=
></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">{</span></pre><pre style=3D"backgroun=
d:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:black" =
lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12.0=
pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US">IStream</span><span s=
tyle=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">*=
=C2=A0s;</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">STGMEDIUM</span><span style=3D"font-size:12.0pt;font-family:Consolas;colo=
r:black" lang=3D"EN-US">=C2=A0newStyle=C2=A0{</span><span style=3D"font-siz=
e:12.0pt;font-family:Consolas;color:darkslategray" lang=3D"EN-US">TYMED_IST=
REAM</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black=
" lang=3D"EN-US">,=C2=A0s};=C2=A0=C2=A0=C2=A0=C2=A0(7)</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0</span></pre><pre style=3D"back=
ground:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:bl=
ack" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0 STGMEDIUM=C2=A0oldStyle;=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(9)</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0 oldStyle.tymed=C2=
=A0=3D=C2=A0TYMED_ISTREAM;</span></pre><pre style=3D"background:white"><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US=
">=C2=A0=C2=A0=C2=A0=C2=A0oldStyle.pstm=C2=A0=3D=C2=A0s;</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0oldStyle.pUnk=
ForRelease=C2=A0=3D=C2=A0</span><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:blue" lang=3D"EN-US">nullptr</span><span style=3D"font-size=
:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">;</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:blue">return</span><sp=
an style=3D"font-size:12.0pt;font-family:Consolas;color:black">=C2=A00;</sp=
an></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black">}</span></pre><pre style=3D"background:white"><span =
lang=3D"EN-US">=C2=A0</span></pre>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Unfortunately,
line (7) fails to compile with error C2440, because </span><span style=3D"f=
ont-size:10.0pt;line-height:115%;font-family:"Courier New"" lang=
=3D"EN-US">'IStream *'</span><span lang=3D"EN-US"> cannot be conver=
ted to </span><span style=3D"font-size:10.0pt;line-height:115%;font-family:=
"Courier New"" lang=3D"EN-US">'HBITMAP'</span><span lang=
=3D"EN-US">. So the
old syntax starting at line (9) still has to be used.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">The reason
is that STGMEDIUM contains an embedded union and according to the current
standard, an initializer may only be provided for the first member of a uni=
on,
which is an HBITMAP in this case:</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:35.4pt"><i><span lang=3D"EN-US"=
>8.5.1/15 When a union
is initialized with a brace-enclosed initializer, the braces shall only con=
tain
an initializer-clause for the first non-static data member of the union.</s=
pan></i></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I see no
good justification for this limitation. Clearly, only one argument can be
provided to initialize a union. But the compiler should compare the type of=
the
supplied argument with that of all union members and initialize the member =
that
has a compatible type.</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">What
happens if the argument can be implicitly converted to more than one union
member type?</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:2.0cm"><span lang=3D"EN-US">Opt=
ion 1:<span>=C2=A0=C2=A0=C2=A0 </span>The compiler issues a warning or an e=
rror (=E2=80=9Cambiguous conversion=E2=80=9D).
This will likely break a lot of existing code that relies on the current
behavior. I think many unions have member types that are implicitly convert=
ible
into each other.</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:2.0cm"><span lang=3D"EN-US">Opt=
ion 2:<span>=C2=A0=C2=A0=C2=A0 </span>The compiler issues an error only if =
an explicit cast is applied.
This will not break existing code but still allow the user to be explicit a=
bout
the type conversion.</span></p>
<p class=3D"MsoNormal" style=3D"margin-left:2.0cm"><span lang=3D"EN-US">Opt=
ion 3:<span>=C2=A0=C2=A0=C2=A0 </span>The compiler silently applies the fir=
st applicable conversion.
This might be OK. My gut feeling tells me that this may also lead to surpri=
sing
and unexpected results but I couldn=E2=80=99t figure out an example yet.</s=
pan></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">A common
constraint for this scenario is that the union is supplied by a third party
(e.g. Microsoft) so that converting constructors cannot be added to it.</sp=
an></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">The
following code contains a minimum example that sketches the problem. The
initializer for b4 should compile and assign nullptr to b4.l.</span></p>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:blue" lang=3D"EN-US">struct</span><span style=3D"font-size:=
12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">A</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black"=
lang=3D"EN-US">=C2=A0{=C2=A0</span><span style=3D"font-size:12.0pt;font-fa=
mily:Consolas;color:blue" lang=3D"EN-US">int</span><span style=3D"font-size=
:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=C2=A0k;=C2=A0</sp=
an><span style=3D"font-size:12.0pt;font-family:Consolas;color:blue" lang=3D=
"EN-US">void</span><span style=3D"font-size:12.0pt;font-family:Consolas;col=
or:black" lang=3D"EN-US">*=C2=A0l;=C2=A0};</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US"> </span></pre><pre style=3D"backgroun=
d:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:blue" l=
ang=3D"EN-US">union</span><span style=3D"font-size:12.0pt;font-family:Conso=
las;color:black" lang=3D"EN-US">=C2=A0</span><span style=3D"font-size:12.0p=
t;font-family:Consolas;color:#2b91af" lang=3D"EN-US">B</span><span style=3D=
"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=C2=A0{=
=C2=A0</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:blu=
e" lang=3D"EN-US">int</span><span style=3D"font-size:12.0pt;font-family:Con=
solas;color:black" lang=3D"EN-US">=C2=A0k;=C2=A0</span><span style=3D"font-=
size:12.0pt;font-family:Consolas;color:blue" lang=3D"EN-US">void</span><spa=
n style=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US=
">*=C2=A0l;=C2=A0};</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US"> </span></pre><pre style=3D"backgroun=
d:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:blue" l=
ang=3D"EN-US">void</span><span style=3D"font-size:12.0pt;font-family:Consol=
as;color:black" lang=3D"EN-US">=C2=A0T()</span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">{</span></pre><pre style=3D"backgroun=
d:white"><span style=3D"font-size:12.0pt;font-family:Consolas;color:black" =
lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12.0=
pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US">A</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">=C2=
=A0a1=C2=A0{1,=C2=A0</span><span style=3D"font-size:12.0pt;font-family:Cons=
olas;color:blue" lang=3D"EN-US">nullptr</span><span style=3D"font-size:12.0=
pt;font-family:Consolas;color:black" lang=3D"EN-US">};=C2=A0=C2=A0=C2=A0=C2=
=A0</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:green"=
lang=3D"EN-US">//=C2=A0OK</span><span style=3D"font-size:12.0pt;font-famil=
y:Consolas;color:black" lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">A</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black"=
lang=3D"EN-US">=C2=A0a2=C2=A0{</span><span style=3D"font-size:12.0pt;font-=
family:Consolas;color:#a31515" lang=3D"EN-US">'c'</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">,=C2=
=A02.0};=C2=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12.0pt;font=
-family:Consolas;color:green" lang=3D"EN-US">//=C2=A0Error:=C2=A0cannot=C2=
=A0convert=C2=A0from=C2=A0'double'=C2=A0to=C2=A0'void=C2=A0*=
9;</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black" =
lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black"=
lang=3D"EN-US">=C2=A0b1=C2=A0{1};=C2=A0=C2=A0=C2=A0=C2=A0</span><span styl=
e=3D"font-size:12.0pt;font-family:Consolas;color:green" lang=3D"EN-US">//=
=C2=A0OK</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:b=
lack" lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black"=
lang=3D"EN-US">=C2=A0b2=C2=A0{2.0};=C2=A0=C2=A0=C2=A0=C2=A0</span><span st=
yle=3D"font-size:12.0pt;font-family:Consolas;color:green" lang=3D"EN-US">//=
=C2=A0Implicitly=C2=A0convertible=C2=A0(with=C2=A0warnings)</span><span sty=
le=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US"></s=
pan></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black"=
lang=3D"EN-US">=C2=A0b3=C2=A0{</span><span style=3D"font-size:12.0pt;font-=
family:Consolas;color:#a31515" lang=3D"EN-US">'c'</span><span style=
=3D"font-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">};=C2=
=A0=C2=A0=C2=A0=C2=A0</span><span style=3D"font-size:12.0pt;font-family:Con=
solas;color:green" lang=3D"EN-US">//=C2=A0Implicitly=C2=A0converted=C2=A0fr=
om=C2=A0char=C2=A0to=C2=A0int</span><span style=3D"font-size:12.0pt;font-fa=
mily:Consolas;color:black" lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black" lang=3D"EN-US">=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D"font-size:12.0pt;font-family:Consolas;color:#2b91af" lang=3D"EN-US=
">B</span><span style=3D"font-size:12.0pt;font-family:Consolas;color:black"=
lang=3D"EN-US">=C2=A0b4=C2=A0{</span><span style=3D"font-size:12.0pt;font-=
family:Consolas;color:blue" lang=3D"EN-US">nullptr</span><span style=3D"fon=
t-size:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US">};=C2=A0=C2=
=A0=C2=A0=C2=A0</span><span style=3D"font-size:12.0pt;font-family:Consolas;=
color:green" lang=3D"EN-US">//=C2=A0Error:=C2=A0'nullptr'=C2=A0not=
=C2=A0convertible=C2=A0to=C2=A0'int'</span><span style=3D"font-size=
:12.0pt;font-family:Consolas;color:black" lang=3D"EN-US"></span></pre>
<pre style=3D"background:white"><span style=3D"font-size:12.0pt;font-family=
:Consolas;color:black">}</span></pre></div><span class=3D"HOEnZb"><font col=
or=3D"#888888">
<p></p>
-- <br>
<br>
--- <br>
You received this message because you are subscribed to the Google Groups &=
quot;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" 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>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</font></span></blockquote></div><br></div>
<p></p>
-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
--001a11c11708344a9704fb7f7bb4--
.