<s>
C++	B-Language
/CX	I-Language
(	O
C++	B-Language
component	O
extensions	O
)	O
is	O
a	O
language	O
projection	O
for	O
Microsoft	O
's	O
Windows	O
Runtime	O
platform	O
.	O
</s>
<s>
It	O
takes	O
the	O
form	O
of	O
a	O
language	O
extension	O
for	O
C++	B-Language
compilers	B-Language
,	O
and	O
it	O
enables	O
C++	B-Language
programmers	O
to	O
write	O
programs	O
that	O
call	O
Windows	O
Runtime	O
(	O
WinRT	O
)	O
APIs	B-General_Concept
.	O
</s>
<s>
C++	B-Language
/CX	I-Language
is	O
superseded	O
by	O
the	O
C++	B-Language
/WinRT	I-Language
language	O
projection	O
,	O
which	O
is	O
not	O
an	O
extension	O
to	O
the	O
C++	B-Language
language	I-Language
;	O
rather	O
,	O
it	O
's	O
an	O
entirely	O
standard	O
modern	O
ISO	O
C++17	O
header-file-based	O
library	O
.	O
</s>
<s>
The	O
language	O
extensions	O
borrow	O
syntax	O
from	O
C++	B-Language
/CLI	I-Language
but	O
target	O
the	O
Windows	O
Runtime	O
Universal	B-Device
Windows	I-Device
Platform	I-Device
native	B-Language
code	I-Language
instead	O
of	O
the	O
Common	O
Language	O
Runtime	O
and	O
managed	O
code	O
.	O
</s>
<s>
It	O
brings	O
a	O
set	O
of	O
syntax	O
and	O
library	O
abstractions	O
that	O
project	O
COM	B-Application
's	O
WRL	O
subset-based	O
WinRT	O
programming	O
model	O
in	O
a	O
way	O
that	O
is	O
intuitive	O
to	O
C++	B-Language
/CLI	I-Language
managed	O
extensions	O
 '	O
coders	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
call	O
the	O
Windows	O
Runtime	O
from	O
native	O
ISO	O
C++	B-Language
via	O
the	O
lower	O
level	O
(	O
WRL	O
)	O
.	O
</s>
<s>
However	O
,	O
WRL	O
is	O
also	O
superseded	O
by	O
C++	B-Language
/WinRT	I-Language
.	O
</s>
<s>
C++	B-Language
/CX	I-Language
introduces	O
syntax	O
extensions	O
for	O
programming	O
for	O
the	O
Windows	O
Runtime	O
.	O
</s>
<s>
The	O
overall	O
non	O
platform-specific	O
syntax	O
is	O
compatible	O
with	O
the	O
C++11	B-Language
standard	O
.	O
</s>
<s>
WinRT	O
objects	O
are	O
created	O
,	O
or	O
activated	O
,	O
using	O
ref	O
new	O
and	O
assigned	O
to	O
variables	O
declared	O
with	O
the	O
^	O
(	O
hat	O
)	O
notation	O
inherited	O
from	O
C++	B-Language
/CLI	I-Language
.	O
</s>
<s>
A	O
WinRT	O
variable	O
is	O
simply	O
a	O
pair	O
of	O
a	O
pointer	O
to	O
virtual	B-Language
method	I-Language
table	I-Language
and	O
pointer	O
to	O
the	O
object	O
's	O
internal	O
data	O
.	O
</s>
<s>
A	O
WinRT	O
object	O
is	O
reference	B-General_Concept
counted	I-General_Concept
and	O
thus	O
handles	O
similarly	O
to	O
ordinary	O
C++	B-Language
objects	O
enclosed	O
in	O
shared_ptrs	O
.	O
</s>
<s>
There	O
is	O
no	O
garbage	B-General_Concept
collection	I-General_Concept
involved	O
.	O
</s>
<s>
C++	B-Language
/CX	I-Language
introduces	O
the	O
concept	O
of	O
partial	O
classes	O
.	O
</s>
<s>
The	O
feature	O
allows	O
a	O
single	O
class	O
definition	O
to	O
be	O
split	O
across	O
multiple	O
files	O
,	O
mainly	O
to	O
enable	O
the	O
XAML	B-Device
graphical	B-Application
user	I-Application
interface	I-Application
design	O
tools	O
to	O
auto-generate	O
code	O
in	O
a	O
separate	O
file	O
in	O
order	O
not	O
to	O
break	O
the	O
logic	O
written	O
by	O
the	O
developer	O
.	O
</s>
<s>
The	O
parts	O
are	O
later	O
merged	O
at	O
compilation	B-Language
.	O
</s>
<s>
.NET	B-Language
languages	I-Language
like	O
C#	B-Application
have	O
had	O
this	O
feature	O
for	O
many	O
years	O
.	O
</s>
<s>
Partial	O
classes	O
have	O
not	O
yet	O
made	O
it	O
into	O
the	O
C++	B-Language
standard	O
and	O
cannot	O
therefore	O
be	O
used	O
,	O
even	O
in	O
C++20	B-Language
.	O
</s>
<s>
A	O
file	O
that	O
is	O
generated	O
and	O
updated	O
by	O
the	O
GUI-designer	O
,	O
and	O
thus	O
should	O
not	O
be	O
modified	O
by	O
the	O
programmer	O
.	O
</s>
<s>
The	O
header	O
in	O
which	O
the	O
compiler-generated	O
part	O
of	O
the	O
class	O
is	O
defined	O
is	O
imported	O
.	O
</s>
<s>
Windows	O
Runtime	O
and	O
thus	O
C++	B-Language
/CX	I-Language
supports	O
runtime-based	O
generics	B-Language
.	O
</s>
<s>
Generic	B-Language
type	I-Language
information	O
is	O
contained	O
in	O
the	O
metadata	O
and	O
instantiated	O
at	O
runtime	O
,	O
unlike	O
C++	B-Application
templates	I-Application
which	O
are	O
compile-time	O
constructs	O
.	O
</s>
<s>
Both	O
are	O
supported	O
by	O
the	O
compiler	B-Language
and	O
can	O
be	O
combined	O
.	O
</s>
<s>
The	O
format	O
is	O
the	O
same	O
that	O
was	O
standardized	O
as	O
part	O
of	O
the	O
Common	O
Language	O
Infrastructure	O
(	O
CLI	O
)	O
,	O
the	O
standard	O
created	O
from	O
the	O
.NET	B-Application
Framework	I-Application
.	O
</s>
<s>
Because	O
of	O
this	O
,	O
code	O
can	O
be	O
shared	O
across	O
C++	B-Language
/CX	I-Language
,	O
CLI	B-Language
languages	I-Language
,	O
and	O
JavaScript	O
that	O
target	O
Windows	O
Runtime	O
.	O
</s>
<s>
The	O
C++	B-Language
/CX	I-Language
has	O
a	O
set	O
of	O
libraries	O
that	O
target	O
the	O
Windows	O
Runtime	O
.	O
</s>
<s>
These	O
help	O
bridge	O
the	O
functionality	O
of	O
the	O
C++	B-Language
Standard	I-Language
Library	I-Language
and	O
WinRT	O
.	O
</s>
<s>
You	O
can	O
detect	O
if	O
C++	B-Language
/CX	I-Language
extension	O
is	O
turned	O
on	O
by	O
testing	O
existence	O
of	O
__cplusplus_winrt	O
preprocessor	O
symbol	O
.	O
</s>
