Topic: Anonymous unions in inherited class with parent class variables


Author: Jonatan Wallmander <jonatan.wallmander@gmail.com>
Date: Sun, 8 Jun 2014 03:18:04 -0700 (PDT)
Raw View
------=_Part_106_13124427.1402222684270
Content-Type: text/plain; charset=UTF-8

The idea is to allow child classes to form unions with parent class
variables.

Consider this (current state of affairs):


   1. class vsx_tuple3
   2. {
   3. public:
   4.   float v0;
   5.   float v1;
   6.   float v2;
   7. };
   8.
   9. class vsx_vector : public vsx_tuple3
   10. {
   11. public:
   12.   union
   13.   {
   14.     float v0;
   15.     float x;
   16.   };
   17.
   18.   union
   19.   {
   20.     float v1;
   21.     float y;
   22.   };
   23.   ...etc...
   24. };
   25.
   26. int main(int argc, char* argv[])
   27. {
   28.   vsx_vector* nv = new vsx_nvector();
   29.   nv->a = 2.5;
   30.   vsx_printf(" sizeof vector: %d\n ", sizeof(vsx_vector));   //
   Outputs: sizeof nvector: 16
   31.   vsx_printf(" sizeof tuple3: %d\n ", sizeof(vsx_tuple3)); //
   Outputs: sizeof tuple3: 8
   32.   vsx_printf(" nv t3 a: %f\n ", ((vsx_tuple3*)nv)->a ); // Outputs:
   0.0
   33. }


Here's a bug (or maybe not) in the language: The vsx_tuple3 variables are
effectively inaccessible.
Also, I kind of would have expected introducing that overridden new "a"
would result in an error.
Alas, no error.


So, maybe it would be possible to improve the language into something like
this:


   1. class vsx_tuple3
   2. {
   3. public:
   4.   float v0;
   5.   float v1;
   6.   float v2;
   7. };
   8.
   9. class vsx_vector : public vsx_tuple3
   10. {
   11. public:
   12.   union : vsx_tuple3::v0
   13.   {
   14.     float x;
   15.   };
   16.
   17.   union : vsx_tuple3::v1
   18.   {
   19.     float y;
   20.   };
   21.   ...decorative methods that deal with dot/cross product etc...
   22. };
   23.


Here, (in the derived class) x point to the same memory area as
vsx_tuple3::a.

This adds a syntactic bonus - one can rename variables (or rather, add an
alias name to them) in child classes - useful to make code more readable
when using the child class, and still access the base class.

I.e.

  myObject->v0 = 3.14159 * 0.5;

is not as readable as:

  myObject->angleRadians = 3.14159 * 0.5;

when they share the same base class...


Also yet an alternative way of doing the declaration is:


   1. class vsx_vector : public vsx_tuple3
   2. {
   3. public:
   4.   union
   5.   {
   6.     vsx_tuple3::v0;
   7.     float x;
   8.   };
   9. ...




--

---
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/.

------=_Part_106_13124427.1402222684270
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>The idea is to allow child classes to form unions wit=
h parent class variables.</div><div><br></div>Consider this (current state =
of affairs):<div><br></div><div><ol style=3D"margin: 0px; padding: 0px 0px =
0px 48px; color: rgb(172, 172, 172); font-family: Consolas, Menlo, Monaco, =
'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sa=
ns Mono', monospace, serif; font-size: 12px; line-height: 21px; background-=
color: rgb(248, 248, 248);"><li class=3D"li1" style=3D"-webkit-user-select:=
 none;"><div class=3D"de1" style=3D"-webkit-user-select: text; padding-righ=
t: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border=
-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204=
, 204); margin-left: -7px; position: relative; background-color: rgb(255, 2=
55, 255); line-height: 21px;"><span class=3D"kw2" style=3D"color: rgb(0, 0,=
 255);">class</span>&nbsp;vsx_tuple3</div></li><li class=3D"li2" style=3D"-=
webkit-user-select: none;"><div class=3D"de2" style=3D"-webkit-user-select:=
 text; padding-right: 5px; padding-left: 5px; vertical-align: top; color: r=
gb(0, 0, 0); border-left-width: 1px; border-left-style: solid; border-left-=
color: rgb(204, 204, 204); margin-left: -7px; position: relative; backgroun=
d-color: rgb(255, 255, 255); line-height: 21px;"><span class=3D"br0" style=
=3D"color: rgb(0, 128, 0);">{</span></div></li><li class=3D"li1" style=3D"-=
webkit-user-select: none;"><div class=3D"de1" style=3D"-webkit-user-select:=
 text; padding-right: 5px; padding-left: 5px; vertical-align: top; color: r=
gb(0, 0, 0); border-left-width: 1px; border-left-style: solid; border-left-=
color: rgb(204, 204, 204); margin-left: -7px; position: relative; backgroun=
d-color: rgb(255, 255, 255); line-height: 21px;"><span class=3D"kw2" style=
=3D"color: rgb(0, 0, 255);">public</span><span class=3D"sy4" style=3D"color=
: rgb(0, 128, 128);">:</span></div></li><li class=3D"li2" style=3D"-webkit-=
user-select: none;"><div class=3D"de2" style=3D"-webkit-user-select: text; =
padding-right: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0=
, 0); border-left-width: 1px; border-left-style: solid; border-left-color: =
rgb(204, 204, 204); margin-left: -7px; position: relative; background-color=
: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span class=3D"kw4" s=
tyle=3D"color: rgb(0, 0, 255);">float</span>&nbsp;v0<span class=3D"sy4" sty=
le=3D"color: rgb(0, 128, 128);">;</span></div></li><li class=3D"li1" style=
=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-webkit-user-se=
lect: text; padding-right: 5px; padding-left: 5px; vertical-align: top; col=
or: rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; border-=
left-color: rgb(204, 204, 204); margin-left: -7px; position: relative; back=
ground-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span cla=
ss=3D"kw4" style=3D"color: rgb(0, 0, 255);">float</span>&nbsp;v1<span class=
=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span></div></li><li class=3D=
"li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-web=
kit-user-select: text; padding-right: 5px; padding-left: 5px; vertical-alig=
n: top; color: rgb(0, 0, 0); border-left-width: 1px; border-left-style: sol=
id; border-left-color: rgb(204, 204, 204); margin-left: -7px; position: rel=
ative; background-color: rgb(255, 255, 255); line-height: 21px;"><span clas=
s=3D"sy4" style=3D"color: rgb(0, 128, 128);">&nbsp; float v2;</span></div><=
/li><li class=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de=
2" style=3D"-webkit-user-select: text; padding-right: 5px; padding-left: 5p=
x; vertical-align: top; color: rgb(0, 0, 0); border-left-width: 1px; border=
-left-style: solid; border-left-color: rgb(204, 204, 204); margin-left: -7p=
x; position: relative; background-color: rgb(255, 255, 255); line-height: 2=
1px;"><span class=3D"br0" style=3D"color: rgb(0, 128, 0);">}</span><span cl=
ass=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span></div></li><li class=
=3D"li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-=
webkit-user-select: text; padding-right: 5px; padding-left: 5px; vertical-a=
lign: top; color: rgb(0, 0, 0); border-left-width: 1px; border-left-style: =
solid; border-left-color: rgb(204, 204, 204); margin-left: -7px; position: =
relative; background-color: rgb(255, 255, 255); line-height: 21px;"><br></d=
iv></li><li class=3D"li2" style=3D"-webkit-user-select: none;"><div class=
=3D"de2" style=3D"-webkit-user-select: text; padding-right: 5px; padding-le=
ft: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-width: 1px; =
border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-lef=
t: -7px; position: relative; background-color: rgb(255, 255, 255); line-hei=
ght: 21px;"><span class=3D"kw2" style=3D"color: rgb(0, 0, 255);">class</spa=
n>&nbsp;vsx_vector&nbsp;<span class=3D"sy4" style=3D"color: rgb(0, 128, 128=
);">:</span>&nbsp;<span class=3D"kw2" style=3D"color: rgb(0, 0, 255);">publ=
ic</span>&nbsp;vsx_tuple3</div></li><li class=3D"li1" style=3D"-webkit-user=
-select: none;"><div class=3D"de1" style=3D"-webkit-user-select: text; padd=
ing-right: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0)=
; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(=
204, 204, 204); margin-left: -7px; position: relative; background-color: rg=
b(255, 255, 255); line-height: 21px;"><span class=3D"br0" style=3D"color: r=
gb(0, 128, 0);">{</span></div></li><li class=3D"li2" style=3D"-webkit-user-=
select: none;"><div class=3D"de2" style=3D"-webkit-user-select: text; paddi=
ng-right: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0);=
 border-left-width: 1px; border-left-style: solid; border-left-color: rgb(2=
04, 204, 204); margin-left: -7px; position: relative; background-color: rgb=
(255, 255, 255); line-height: 21px;"><span class=3D"kw2" style=3D"color: rg=
b(0, 0, 255);">public</span><span class=3D"sy4" style=3D"color: rgb(0, 128,=
 128);">:</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: =
none;"><div class=3D"de1" style=3D"-webkit-user-select: text; padding-right=
: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-=
left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204,=
 204); margin-left: -7px; position: relative; background-color: rgb(255, 25=
5, 255); line-height: 21px;">&nbsp;&nbsp;<span class=3D"kw4" style=3D"color=
: rgb(0, 0, 255);">union</span></div></li><li class=3D"li2" style=3D"-webki=
t-user-select: none;"><div class=3D"de2" style=3D"-webkit-user-select: text=
; padding-right: 5px; padding-left: 5px; vertical-align: top; color: rgb(0,=
 0, 0); border-left-width: 1px; border-left-style: solid; border-left-color=
: rgb(204, 204, 204); margin-left: -7px; position: relative; background-col=
or: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span class=3D"br0"=
 style=3D"color: rgb(0, 128, 0);">{</span></div></li><li class=3D"li1" styl=
e=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-webkit-user-s=
elect: text; padding-right: 5px; padding-left: 5px; vertical-align: top; co=
lor: rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; border=
-left-color: rgb(204, 204, 204); margin-left: -7px; position: relative; bac=
kground-color: rgb(255, 255, 255); line-height: 21px;">&nbsp; &nbsp;&nbsp;<=
span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">float</span>&nbsp;v0<sp=
an class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span></div></li><li =
class=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" style=
=3D"-webkit-user-select: text; padding-right: 5px; padding-left: 5px; verti=
cal-align: top; color: rgb(0, 0, 0); border-left-width: 1px; border-left-st=
yle: solid; border-left-color: rgb(204, 204, 204); margin-left: -7px; posit=
ion: relative; background-color: rgb(255, 255, 255); line-height: 21px;">&n=
bsp; &nbsp;&nbsp;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">float=
</span>&nbsp;x<span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</spa=
n></div></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><div cl=
ass=3D"de1" style=3D"-webkit-user-select: text; padding-right: 5px; padding=
-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-width: 1p=
x; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-=
left: -7px; position: relative; background-color: rgb(255, 255, 255); line-=
height: 21px;">&nbsp;&nbsp;<span class=3D"br0" style=3D"color: rgb(0, 128, =
0);">}</span><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span=
></div></li><li class=3D"li2" style=3D"-webkit-user-select: none;"><div cla=
ss=3D"de2" style=3D"-webkit-user-select: text; padding-right: 5px; padding-=
left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-width: 1px=
; border-left-style: solid; border-left-color: rgb(204, 204, 204); margin-l=
eft: -7px; position: relative; background-color: rgb(255, 255, 255); line-h=
eight: 21px;">&nbsp;</div></li><li class=3D"li1" style=3D"-webkit-user-sele=
ct: none;"><div class=3D"de1" style=3D"-webkit-user-select: text; padding-r=
ight: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); bor=
der-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, =
204, 204); margin-left: -7px; position: relative; background-color: rgb(255=
, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span class=3D"kw4" style=3D"c=
olor: rgb(0, 0, 255);">union</span></div></li><li class=3D"li2" style=3D"-w=
ebkit-user-select: none;"><div class=3D"de2" style=3D"-webkit-user-select: =
text; padding-right: 5px; padding-left: 5px; vertical-align: top; color: rg=
b(0, 0, 0); border-left-width: 1px; border-left-style: solid; border-left-c=
olor: rgb(204, 204, 204); margin-left: -7px; position: relative; background=
-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span class=3D"=
br0" style=3D"color: rgb(0, 128, 0);">{</span></div></li><li class=3D"li1" =
style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-webkit-us=
er-select: text; padding-right: 5px; padding-left: 5px; vertical-align: top=
; color: rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; bo=
rder-left-color: rgb(204, 204, 204); margin-left: -7px; position: relative;=
 background-color: rgb(255, 255, 255); line-height: 21px;">&nbsp; &nbsp;&nb=
sp;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">float</span>&nbsp;v=
1<span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span></div></li>=
<li class=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" s=
tyle=3D"-webkit-user-select: text; padding-right: 5px; padding-left: 5px; v=
ertical-align: top; color: rgb(0, 0, 0); border-left-width: 1px; border-lef=
t-style: solid; border-left-color: rgb(204, 204, 204); margin-left: -7px; p=
osition: relative; background-color: rgb(255, 255, 255); line-height: 21px;=
">&nbsp; &nbsp;&nbsp;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">f=
loat</span>&nbsp;y<span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;<=
/span></div></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><di=
v class=3D"de1" style=3D"-webkit-user-select: text; padding-right: 5px; pad=
ding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-width=
: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); mar=
gin-left: -7px; position: relative; background-color: rgb(255, 255, 255); l=
ine-height: 21px;">&nbsp;&nbsp;<span class=3D"br0" style=3D"color: rgb(0, 1=
28, 0);">}</span><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</=
span></div></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><div=
 class=3D"de1" style=3D"-webkit-user-select: text; padding-right: 5px; padd=
ing-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-width:=
 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); marg=
in-left: -7px; position: relative; background-color: rgb(255, 255, 255); li=
ne-height: 21px;"><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">&n=
bsp; ...etc...</span></div></li><li class=3D"li2" style=3D"-webkit-user-sel=
ect: none;"><div class=3D"de2" style=3D"-webkit-user-select: text; padding-=
right: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); bo=
rder-left-width: 1px; border-left-style: solid; border-left-color: rgb(204,=
 204, 204); margin-left: -7px; position: relative; background-color: rgb(25=
5, 255, 255); line-height: 21px;"><span class=3D"br0" style=3D"color: rgb(0=
, 128, 0);">}</span><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">=
;</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><=
div class=3D"de1" style=3D"-webkit-user-select: text; padding-right: 5px; p=
adding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-wid=
th: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); m=
argin-left: -7px; position: relative; background-color: rgb(255, 255, 255);=
 line-height: 21px;">&nbsp;</div></li><li class=3D"li2" style=3D"-webkit-us=
er-select: none;"><div class=3D"de2" style=3D"-webkit-user-select: text; pa=
dding-right: 5px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, =
0); border-left-width: 1px; border-left-style: solid; border-left-color: rg=
b(204, 204, 204); margin-left: -7px; position: relative; background-color: =
rgb(255, 255, 255); line-height: 21px;"><span class=3D"kw4" style=3D"color:=
 rgb(0, 0, 255);">int</span>&nbsp;main<span class=3D"br0" style=3D"color: r=
gb(0, 128, 0);">(</span><span class=3D"kw4" style=3D"color: rgb(0, 0, 255);=
">int</span>&nbsp;argc,&nbsp;<span class=3D"kw4" style=3D"color: rgb(0, 0, =
255);">char</span><span class=3D"sy2" style=3D"color: rgb(0, 0, 64);">*</sp=
an>&nbsp;argv<span class=3D"br0" style=3D"color: rgb(0, 128, 0);">[</span><=
span class=3D"br0" style=3D"color: rgb(0, 128, 0);">]</span><span class=3D"=
br0" style=3D"color: rgb(0, 128, 0);">)</span></div></li><li class=3D"li1" =
style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-webkit-us=
er-select: text; padding-right: 5px; padding-left: 5px; vertical-align: top=
; color: rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; bo=
rder-left-color: rgb(204, 204, 204); margin-left: -7px; position: relative;=
 background-color: rgb(255, 255, 255); line-height: 21px;"><span class=3D"b=
r0" style=3D"color: rgb(0, 128, 0);">{</span></div></li><li class=3D"li2" s=
tyle=3D"-webkit-user-select: none;"><div class=3D"de2" style=3D"-webkit-use=
r-select: text; padding-right: 5px; padding-left: 5px; vertical-align: top;=
 color: rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; bor=
der-left-color: rgb(204, 204, 204); margin-left: -7px; position: relative; =
background-color: rgb(255, 255, 255); line-height: 21px;">&nbsp; vsx_vector=
<span class=3D"sy2" style=3D"color: rgb(0, 0, 64);">*</span>&nbsp;nv&nbsp;<=
span class=3D"sy1" style=3D"color: rgb(0, 0, 128);">=3D</span>&nbsp;<span c=
lass=3D"kw3" style=3D"color: rgb(0, 0, 221);">new</span>&nbsp;vsx_nvector<s=
pan class=3D"br0" style=3D"color: rgb(0, 128, 0);">(</span><span class=3D"b=
r0" style=3D"color: rgb(0, 128, 0);">)</span><span class=3D"sy4" style=3D"c=
olor: rgb(0, 128, 128);">;</span><br></div></li><li class=3D"li2" style=3D"=
-webkit-user-select: none;"><div class=3D"de2" style=3D"-webkit-user-select=
: text; padding-right: 5px; padding-left: 5px; vertical-align: top; color: =
rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; border-left=
-color: rgb(204, 204, 204); margin-left: -7px; position: relative; backgrou=
nd-color: rgb(255, 255, 255); line-height: 21px;">&nbsp; nv<span class=3D"s=
y2" style=3D"color: rgb(0, 0, 64);">-</span><span class=3D"sy1" style=3D"co=
lor: rgb(0, 0, 128);">&gt;</span>a&nbsp;<span class=3D"sy1" style=3D"color:=
 rgb(0, 0, 128);">=3D</span>&nbsp;<span class=3D"nu16" style=3D"color: rgb(=
128, 0, 128);">2.5</span><span class=3D"sy4" style=3D"color: rgb(0, 128, 12=
8);">;</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: non=
e;"><div class=3D"de1" style=3D"-webkit-user-select: text; padding-right: 5=
px; padding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-lef=
t-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 20=
4); margin-left: -7px; position: relative; background-color: rgb(255, 255, =
255); line-height: 21px;">&nbsp; vsx_printf<span class=3D"br0" style=3D"col=
or: rgb(0, 128, 0);">(</span><span class=3D"st0" style=3D"color: rgb(255, 0=
, 0);">" sizeof vector: %d<span class=3D"es1" style=3D"color: rgb(0, 0, 153=
); font-weight: bold;">\n</span>&nbsp;"</span>,&nbsp;<span class=3D"kw3" st=
yle=3D"color: rgb(0, 0, 221);">sizeof</span><span class=3D"br0" style=3D"co=
lor: rgb(0, 128, 0);">(</span>vsx_vector<span class=3D"br0" style=3D"color:=
 rgb(0, 128, 0);">)</span><span class=3D"br0" style=3D"color: rgb(0, 128, 0=
);">)</span><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">; &nbsp;=
 // Outputs: sizeof nvector: 16</span><br></div></li><li class=3D"li1" styl=
e=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"-webkit-user-s=
elect: text; padding-right: 5px; padding-left: 5px; vertical-align: top; co=
lor: rgb(0, 0, 0); border-left-width: 1px; border-left-style: solid; border=
-left-color: rgb(204, 204, 204); margin-left: -7px; position: relative; bac=
kground-color: rgb(255, 255, 255); line-height: 21px;">&nbsp; vsx_printf<sp=
an class=3D"br0" style=3D"color: rgb(0, 128, 0);">(</span><span class=3D"st=
0" style=3D"color: rgb(255, 0, 0);">" sizeof tuple3: %d<span class=3D"es1" =
style=3D"color: rgb(0, 0, 153); font-weight: bold;">\n</span>&nbsp;"</span>=
,&nbsp;<span class=3D"kw3" style=3D"color: rgb(0, 0, 221);">sizeof</span><s=
pan class=3D"br0" style=3D"color: rgb(0, 128, 0);">(</span>vsx_tuple3<span =
class=3D"br0" style=3D"color: rgb(0, 128, 0);">)</span><span class=3D"br0" =
style=3D"color: rgb(0, 128, 0);">)</span><span class=3D"sy4" style=3D"color=
: rgb(0, 128, 128);">; // Outputs: sizeof tuple3: 8</span></div></li><li cl=
ass=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" style=
=3D"-webkit-user-select: text; padding-right: 5px; padding-left: 5px; verti=
cal-align: top; color: rgb(0, 0, 0); border-left-width: 1px; border-left-st=
yle: solid; border-left-color: rgb(204, 204, 204); margin-left: -7px; posit=
ion: relative; background-color: rgb(255, 255, 255); line-height: 21px;">&n=
bsp; vsx_printf<span class=3D"br0" style=3D"color: rgb(0, 128, 0);">(</span=
><span class=3D"st0" style=3D"color: rgb(255, 0, 0);">" nv t3 a: %f<span cl=
ass=3D"es1" style=3D"color: rgb(0, 0, 153); font-weight: bold;">\n</span>&n=
bsp;"</span>,&nbsp;<span class=3D"br0" style=3D"color: rgb(0, 128, 0);">(</=
span><span class=3D"br0" style=3D"color: rgb(0, 128, 0);">(</span>vsx_tuple=
3<span class=3D"sy2" style=3D"color: rgb(0, 0, 64);">*</span><span class=3D=
"br0" style=3D"color: rgb(0, 128, 0);">)</span>nv<span class=3D"br0" style=
=3D"color: rgb(0, 128, 0);">)</span><span class=3D"sy2" style=3D"color: rgb=
(0, 0, 64);">-</span><span class=3D"sy1" style=3D"color: rgb(0, 0, 128);">&=
gt;</span>a&nbsp;<span class=3D"br0" style=3D"color: rgb(0, 128, 0);">)</sp=
an><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">; // Outputs: 0.0=
</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><d=
iv class=3D"de1" style=3D"-webkit-user-select: text; padding-right: 5px; pa=
dding-left: 5px; vertical-align: top; color: rgb(0, 0, 0); border-left-widt=
h: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); ma=
rgin-left: -7px; position: relative; background-color: rgb(255, 255, 255); =
line-height: 21px;"><span style=3D"color: rgb(0, 128, 0);">}</span><br></di=
v></li></ol><div><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco, L=
ucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,=
 monospace, serif"><span style=3D"font-size: 12px; line-height: 21px;"><br>=
</span></font></div></div><div><font color=3D"#008000" face=3D"Consolas, Me=
nlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream V=
era Sans Mono, monospace, serif"><span style=3D"font-size: 12px; line-heigh=
t: 21px;">Here's a bug (or maybe not) in the language: The vsx_tuple3 varia=
bles are effectively inaccessible.</span></font></div><div><font color=3D"#=
008000" face=3D"Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, D=
ejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif"><span style=3D=
"font-size: 12px; line-height: 21px;">Also, I kind of would have expected i=
ntroducing that overridden new "a" would result in an error.</span></font><=
/div><div><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco, Lucida C=
onsole, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monosp=
ace, serif"><span style=3D"font-size: 12px; line-height: 21px;">Alas, no er=
ror.</span></font></div><div><font color=3D"#008000" face=3D"Consolas, Menl=
o, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Ver=
a Sans Mono, monospace, serif"><span style=3D"font-size: 12px; line-height:=
 21px;"><br></span></font></div><div><font color=3D"#008000" face=3D"Consol=
as, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitst=
ream Vera Sans Mono, monospace, serif"><span style=3D"font-size: 12px; line=
-height: 21px;"><br></span></font></div><div><font color=3D"#008000" face=
=3D"Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans M=
ono, Bitstream Vera Sans Mono, monospace, serif"><span style=3D"font-size: =
12px; line-height: 21px;">So, maybe it would be possible to improve the lan=
guage into something like this:</span></font></div><div><font color=3D"#008=
000" face=3D"Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, Deja=
Vu Sans Mono, Bitstream Vera Sans Mono, monospace, serif"><span style=3D"fo=
nt-size: 12px; line-height: 21px;"><br></span></font></div><div><ol style=
=3D"margin: 0px; padding: 0px 0px 0px 48px; color: rgb(172, 172, 172); font=
-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'Dej=
aVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12=
px; line-height: 21px; background-color: rgb(248, 248, 248);"><li class=3D"=
li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"margi=
n-left: -7px; padding-right: 5px; padding-left: 5px; border-left-width: 1px=
; border-left-style: solid; border-left-color: rgb(204, 204, 204); vertical=
-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); position: rela=
tive; background-color: rgb(255, 255, 255); line-height: 21px;"><span class=
=3D"kw2" style=3D"color: rgb(0, 0, 255);">class</span>&nbsp;vsx_tuple3</div=
></li><li class=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"=
de2" style=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; bor=
der-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, =
204, 204); vertical-align: top; -webkit-user-select: text; color: rgb(0, 0,=
 0); position: relative; background-color: rgb(255, 255, 255); line-height:=
 21px;"><span class=3D"br0" style=3D"color: rgb(0, 128, 0);">{</span></div>=
</li><li class=3D"li1" style=3D"-webkit-user-select: none;"><div class=3D"d=
e1" style=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; bord=
er-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 2=
04, 204); vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, =
0); position: relative; background-color: rgb(255, 255, 255); line-height: =
21px;"><span class=3D"kw2" style=3D"color: rgb(0, 0, 255);">public</span><s=
pan class=3D"sy4" style=3D"color: rgb(0, 128, 128);">:</span></div></li><li=
 class=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" styl=
e=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; border-left-=
width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204)=
; vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); posi=
tion: relative; background-color: rgb(255, 255, 255); line-height: 21px;">&=
nbsp;&nbsp;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">float</span=
>&nbsp;v0<span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span></d=
iv></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><div class=
=3D"de1" style=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px;=
 border-left-width: 1px; border-left-style: solid; border-left-color: rgb(2=
04, 204, 204); vertical-align: top; -webkit-user-select: text; color: rgb(0=
, 0, 0); position: relative; background-color: rgb(255, 255, 255); line-hei=
ght: 21px;">&nbsp;&nbsp;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);=
">float</span>&nbsp;v1<span class=3D"sy4" style=3D"color: rgb(0, 128, 128);=
">;</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: none;"=
><div class=3D"de1" style=3D"margin-left: -7px; padding-right: 5px; padding=
-left: 5px; border-left-width: 1px; border-left-style: solid; border-left-c=
olor: rgb(204, 204, 204); vertical-align: top; -webkit-user-select: text; c=
olor: rgb(0, 0, 0); position: relative; background-color: rgb(255, 255, 255=
); line-height: 21px;"><span class=3D"sy4" style=3D"color: rgb(0, 128, 128)=
;">&nbsp; float v2;</span></div></li><li class=3D"li2" style=3D"-webkit-use=
r-select: none;"><div class=3D"de2" style=3D"margin-left: -7px; padding-rig=
ht: 5px; padding-left: 5px; border-left-width: 1px; border-left-style: soli=
d; border-left-color: rgb(204, 204, 204); vertical-align: top; -webkit-user=
-select: text; color: rgb(0, 0, 0); position: relative; background-color: r=
gb(255, 255, 255); line-height: 21px;"><span class=3D"br0" style=3D"color: =
rgb(0, 128, 0);">}</span><span class=3D"sy4" style=3D"color: rgb(0, 128, 12=
8);">;</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: non=
e;"><div class=3D"de1" style=3D"margin-left: -7px; padding-right: 5px; padd=
ing-left: 5px; border-left-width: 1px; border-left-style: solid; border-lef=
t-color: rgb(204, 204, 204); vertical-align: top; -webkit-user-select: text=
; color: rgb(0, 0, 0); position: relative; background-color: rgb(255, 255, =
255); line-height: 21px;">&nbsp;</div></li><li class=3D"li2" style=3D"-webk=
it-user-select: none;"><div class=3D"de2" style=3D"margin-left: -7px; paddi=
ng-right: 5px; padding-left: 5px; border-left-width: 1px; border-left-style=
: solid; border-left-color: rgb(204, 204, 204); vertical-align: top; -webki=
t-user-select: text; color: rgb(0, 0, 0); position: relative; background-co=
lor: rgb(255, 255, 255); line-height: 21px;"><span class=3D"kw2" style=3D"c=
olor: rgb(0, 0, 255);">class</span>&nbsp;vsx_vector&nbsp;<span class=3D"sy4=
" style=3D"color: rgb(0, 128, 128);">:</span>&nbsp;<span class=3D"kw2" styl=
e=3D"color: rgb(0, 0, 255);">public</span>&nbsp;vsx_tuple3</div></li><li cl=
ass=3D"li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=
=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; border-left-w=
idth: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);=
 vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); posit=
ion: relative; background-color: rgb(255, 255, 255); line-height: 21px;"><s=
pan class=3D"br0" style=3D"color: rgb(0, 128, 0);">{</span></div></li><li c=
lass=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" style=
=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; border-left-w=
idth: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);=
 vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); posit=
ion: relative; background-color: rgb(255, 255, 255); line-height: 21px;"><s=
pan class=3D"kw2" style=3D"color: rgb(0, 0, 255);">public</span><span class=
=3D"sy4" style=3D"color: rgb(0, 128, 128);">:</span></div></li><li class=3D=
"li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"marg=
in-left: -7px; padding-right: 5px; padding-left: 5px; border-left-width: 1p=
x; border-left-style: solid; border-left-color: rgb(204, 204, 204); vertica=
l-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); position: rel=
ative; background-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbs=
p;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">union : vsx_tuple3::=
v0</span></div></li><li class=3D"li2" style=3D"-webkit-user-select: none;">=
<div class=3D"de2" style=3D"margin-left: -7px; padding-right: 5px; padding-=
left: 5px; border-left-width: 1px; border-left-style: solid; border-left-co=
lor: rgb(204, 204, 204); vertical-align: top; -webkit-user-select: text; co=
lor: rgb(0, 0, 0); position: relative; background-color: rgb(255, 255, 255)=
; line-height: 21px;">&nbsp;&nbsp;<span class=3D"br0" style=3D"color: rgb(0=
, 128, 0);">{</span></div></li><li class=3D"li1" style=3D"-webkit-user-sele=
ct: none;"><div class=3D"de1" style=3D"margin-left: -7px; padding-right: 5p=
x; padding-left: 5px; border-left-width: 1px; border-left-style: solid; bor=
der-left-color: rgb(204, 204, 204); vertical-align: top; -webkit-user-selec=
t: text; color: rgb(0, 0, 0); position: relative; background-color: rgb(255=
, 255, 255); line-height: 21px;">&nbsp; &nbsp;&nbsp;<span class=3D"kw4" sty=
le=3D"color: rgb(0, 0, 255);">float</span>&nbsp;x<span class=3D"sy4" style=
=3D"color: rgb(0, 128, 128);">;&nbsp;</span><br></div></li><li class=3D"li1=
" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"margin-l=
eft: -7px; padding-right: 5px; padding-left: 5px; border-left-width: 1px; b=
order-left-style: solid; border-left-color: rgb(204, 204, 204); vertical-al=
ign: top; -webkit-user-select: text; color: rgb(0, 0, 0); position: relativ=
e; background-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<s=
pan class=3D"br0" style=3D"color: rgb(0, 128, 0);">}</span><span class=3D"s=
y4" style=3D"color: rgb(0, 128, 128);">;</span><br></div></li><li class=3D"=
li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" style=3D"margi=
n-left: -7px; padding-right: 5px; padding-left: 5px; border-left-width: 1px=
; border-left-style: solid; border-left-color: rgb(204, 204, 204); vertical=
-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); position: rela=
tive; background-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;</div=
></li><li class=3D"li1" style=3D"-webkit-user-select: none;"><div class=3D"=
de1" style=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; bor=
der-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, =
204, 204); vertical-align: top; -webkit-user-select: text; color: rgb(0, 0,=
 0); position: relative; background-color: rgb(255, 255, 255); line-height:=
 21px;">&nbsp;&nbsp;<span class=3D"kw4" style=3D"color: rgb(0, 0, 255);">un=
ion : vsx_tuple3::v1</span></div></li><li class=3D"li2" style=3D"-webkit-us=
er-select: none;"><div class=3D"de2" style=3D"margin-left: -7px; padding-ri=
ght: 5px; padding-left: 5px; border-left-width: 1px; border-left-style: sol=
id; border-left-color: rgb(204, 204, 204); vertical-align: top; -webkit-use=
r-select: text; color: rgb(0, 0, 0); position: relative; background-color: =
rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span class=3D"br0" sty=
le=3D"color: rgb(0, 128, 0);">{</span></div></li><li class=3D"li1" style=3D=
"-webkit-user-select: none;"><div class=3D"de1" style=3D"margin-left: -7px;=
 padding-right: 5px; padding-left: 5px; border-left-width: 1px; border-left=
-style: solid; border-left-color: rgb(204, 204, 204); vertical-align: top; =
-webkit-user-select: text; color: rgb(0, 0, 0); position: relative; backgro=
und-color: rgb(255, 255, 255); line-height: 21px;">&nbsp; &nbsp;&nbsp;<span=
 class=3D"kw4" style=3D"color: rgb(0, 0, 255);">float</span>&nbsp;y<span cl=
ass=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span><br></div></li><li c=
lass=3D"li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" style=
=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; border-left-w=
idth: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);=
 vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); posit=
ion: relative; background-color: rgb(255, 255, 255); line-height: 21px;">&n=
bsp;&nbsp;<span class=3D"br0" style=3D"color: rgb(0, 128, 0);">}</span><spa=
n class=3D"sy4" style=3D"color: rgb(0, 128, 128);">;</span><br></div></li><=
li class=3D"li1" style=3D"-webkit-user-select: none;"><div class=3D"de1" st=
yle=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; border-lef=
t-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 20=
4); vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); po=
sition: relative; background-color: rgb(255, 255, 255); line-height: 21px;"=
><span class=3D"sy4" style=3D"color: rgb(0, 128, 128);">&nbsp; ...decorativ=
e methods that deal with dot/cross product etc...</span></div></li><li clas=
s=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" style=3D"=
margin-left: -7px; padding-right: 5px; padding-left: 5px; border-left-width=
: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); ver=
tical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); position:=
 relative; background-color: rgb(255, 255, 255); line-height: 21px;"><span =
class=3D"br0" style=3D"color: rgb(0, 128, 0);">}</span><span class=3D"sy4" =
style=3D"color: rgb(0, 128, 128);">;</span></div></li><li class=3D"li1" sty=
le=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"margin-left: =
-7px; padding-right: 5px; padding-left: 5px; border-left-width: 1px; border=
-left-style: solid; border-left-color: rgb(204, 204, 204); vertical-align: =
top; -webkit-user-select: text; color: rgb(0, 0, 0); position: relative; ba=
ckground-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;</div></li></=
ol><div><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco, Lucida Con=
sole, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospac=
e, serif"><span style=3D"font-size: 12px; line-height: 17px;"><br></span></=
font></div></div><div><font color=3D"#008000" face=3D"Consolas, Menlo, Mona=
co, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans =
Mono, monospace, serif"><span style=3D"font-size: 12px; line-height: 17px;"=
>Here, (in the derived class) x point to the same memory area as vsx_tuple3=
::a.</span></font></div><div><font color=3D"#008000" face=3D"Consolas, Menl=
o, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Ver=
a Sans Mono, monospace, serif"><span style=3D"font-size: 12px; line-height:=
 17px;"><br></span></font></div><div><span style=3D"color: rgb(0, 128, 0); =
font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', =
'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size=
: 12px; line-height: 17px;">This adds a syntactic bonus - one can rename va=
riables (or rather, add an alias name to them) in child classes - useful to=
 make code more readable when using the child class, and still access the b=
ase class.</span><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco, L=
ucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,=
 monospace, serif"><span style=3D"font-size: 12px; line-height: 17px;"><br>=
</span></font></div><div><span style=3D"color: rgb(0, 128, 0); font-family:=
 Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans=
 Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px; line=
-height: 17px;"><br></span></div><div><span style=3D"color: rgb(0, 128, 0);=
 font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono',=
 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-siz=
e: 12px; line-height: 17px;">I.e.</span></div><div><span style=3D"color: rg=
b(0, 128, 0); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Libe=
ration Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, se=
rif; font-size: 12px; line-height: 17px;"><br></span></div><div><span style=
=3D"color: rgb(0, 128, 0); font-family: Consolas, Menlo, Monaco, 'Lucida Co=
nsole', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', =
monospace, serif; font-size: 12px; line-height: 17px;">&nbsp; myObject-&gt;=
v0 =3D 3.14159 * 0.5;</span><br></div><div><span style=3D"color: rgb(0, 128=
, 0); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation M=
ono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace, serif; fon=
t-size: 12px; line-height: 17px;"><br></span></div><div><span style=3D"colo=
r: rgb(0, 128, 0); font-family: Consolas, Menlo, Monaco, 'Lucida Console', =
'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospac=
e, serif; font-size: 12px; line-height: 17px;">is not as readable as:</span=
></div><div><span style=3D"color: rgb(0, 128, 0); font-family: Consolas, Me=
nlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bits=
tream Vera Sans Mono', monospace, serif; font-size: 12px; line-height: 17px=
;"><br></span></div><div><span style=3D"color: rgb(0, 128, 0); font-family:=
 Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans=
 Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px; line=
-height: 17px;">&nbsp; myObject-&gt;angleRadians =3D 3.14159 * 0.5;</span><=
br></div><div><span style=3D"color: rgb(0, 128, 0); font-family: Consolas, =
Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bi=
tstream Vera Sans Mono', monospace, serif; font-size: 12px; line-height: 17=
px;"><br></span></div><div><span style=3D"color: rgb(0, 128, 0); font-famil=
y: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sa=
ns Mono', 'Bitstream Vera Sans Mono', monospace, serif; font-size: 12px; li=
ne-height: 17px;">when they share the same base class...</span></div><div><=
span style=3D"color: rgb(0, 128, 0); font-family: Consolas, Menlo, Monaco, =
'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sa=
ns Mono', monospace, serif; font-size: 12px; line-height: 17px;"><br></span=
></div><div><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco, Lucida=
 Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, mono=
space, serif"><span style=3D"font-size: 12px; line-height: 17px;"><br></spa=
n></font></div><div><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco=
, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mo=
no, monospace, serif"><span style=3D"font-size: 12px; line-height: 17px;">A=
lso yet an alternative way of doing the declaration is:</span></font></div>=
<div><font color=3D"#008000" face=3D"Consolas, Menlo, Monaco, Lucida Consol=
e, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, =
serif"><span style=3D"font-size: 12px; line-height: 17px;"><br></span></fon=
t></div><div><ol style=3D"margin: 0px; padding: 0px 0px 0px 48px; color: rg=
b(172, 172, 172); font-family: Consolas, Menlo, Monaco, 'Lucida Console', '=
Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace=
, serif; font-size: 12px; line-height: 21px; background-color: rgb(248, 248=
, 248);"><li class=3D"li2" style=3D"-webkit-user-select: none;"><div class=
=3D"de2" style=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px;=
 border-left-width: 1px; border-left-style: solid; border-left-color: rgb(2=
04, 204, 204); vertical-align: top; -webkit-user-select: text; color: rgb(0=
, 0, 0); position: relative; background-color: rgb(255, 255, 255); line-hei=
ght: 21px;"><span class=3D"kw2" style=3D"color: rgb(0, 0, 255);">class</spa=
n>&nbsp;vsx_vector&nbsp;<span class=3D"sy4" style=3D"color: rgb(0, 128, 128=
);">:</span>&nbsp;<span class=3D"kw2" style=3D"color: rgb(0, 0, 255);">publ=
ic</span>&nbsp;vsx_tuple3</div></li><li class=3D"li1" style=3D"-webkit-user=
-select: none;"><div class=3D"de1" style=3D"margin-left: -7px; padding-righ=
t: 5px; padding-left: 5px; border-left-width: 1px; border-left-style: solid=
; border-left-color: rgb(204, 204, 204); vertical-align: top; -webkit-user-=
select: text; color: rgb(0, 0, 0); position: relative; background-color: rg=
b(255, 255, 255); line-height: 21px;"><span class=3D"br0" style=3D"color: r=
gb(0, 128, 0);">{</span></div></li><li class=3D"li2" style=3D"-webkit-user-=
select: none;"><div class=3D"de2" style=3D"margin-left: -7px; padding-right=
: 5px; padding-left: 5px; border-left-width: 1px; border-left-style: solid;=
 border-left-color: rgb(204, 204, 204); vertical-align: top; -webkit-user-s=
elect: text; color: rgb(0, 0, 0); position: relative; background-color: rgb=
(255, 255, 255); line-height: 21px;"><span class=3D"kw2" style=3D"color: rg=
b(0, 0, 255);">public</span><span class=3D"sy4" style=3D"color: rgb(0, 128,=
 128);">:</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: =
none;"><span style=3D"background-color: rgb(255, 255, 255); color: rgb(0, 0=
, 0); line-height: 21px;">&nbsp;&nbsp;</span><span class=3D"kw4" style=3D"l=
ine-height: 21px; color: rgb(0, 0, 255);">union</span><br></li><li class=3D=
"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" style=3D"marg=
in-left: -7px; padding-right: 5px; padding-left: 5px; border-left-width: 1p=
x; border-left-style: solid; border-left-color: rgb(204, 204, 204); vertica=
l-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); position: rel=
ative; background-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbs=
p;<span class=3D"br0" style=3D"color: rgb(0, 128, 0);">{</span></div></li><=
li class=3D"li2" style=3D"-webkit-user-select: none;"><div class=3D"de2" st=
yle=3D"margin-left: -7px; padding-right: 5px; padding-left: 5px; border-lef=
t-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 20=
4); vertical-align: top; -webkit-user-select: text; color: rgb(0, 0, 0); po=
sition: relative; background-color: rgb(255, 255, 255); line-height: 21px;"=
><span class=3D"br0" style=3D"color: rgb(0, 128, 0);">&nbsp; &nbsp; vsx_tup=
le3::v0;</span></div></li><li class=3D"li1" style=3D"-webkit-user-select: n=
one;"><div class=3D"de1" style=3D"margin-left: -7px; padding-right: 5px; pa=
dding-left: 5px; border-left-width: 1px; border-left-style: solid; border-l=
eft-color: rgb(204, 204, 204); vertical-align: top; -webkit-user-select: te=
xt; color: rgb(0, 0, 0); position: relative; background-color: rgb(255, 255=
, 255); line-height: 21px;">&nbsp; &nbsp;&nbsp;<span class=3D"kw4" style=3D=
"color: rgb(0, 0, 255);">float</span>&nbsp;x<span class=3D"sy4" style=3D"co=
lor: rgb(0, 128, 128);">;&nbsp;</span><br></div></li><li class=3D"li1" styl=
e=3D"-webkit-user-select: none;"><div class=3D"de1" style=3D"margin-left: -=
7px; padding-right: 5px; padding-left: 5px; border-left-width: 1px; border-=
left-style: solid; border-left-color: rgb(204, 204, 204); vertical-align: t=
op; -webkit-user-select: text; color: rgb(0, 0, 0); position: relative; bac=
kground-color: rgb(255, 255, 255); line-height: 21px;">&nbsp;&nbsp;<span cl=
ass=3D"br0" style=3D"color: rgb(0, 128, 0);">}</span><span class=3D"sy4" st=
yle=3D"color: rgb(0, 128, 128);">;</span><br></div></li><li class=3D"li2" s=
tyle=3D"-webkit-user-select: none;">...</li></ol></div><div><font color=3D"=
#008000" face=3D"Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, =
DejaVu Sans Mono, Bitstream Vera Sans Mono, monospace, serif"><span style=
=3D"font-size: 12px; line-height: 17px;"><br></span></font></div><div><br><=
/div><div><br></div></div>

<p></p>

-- <br />
<br />
--- <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 />
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_106_13124427.1402222684270--

.