Topic: A need for unrestricted_union and tagged_union - your thoughts?
Author: Piotr Nycz <piotrwn1@gmail.com>
Date: Tue, 14 Jul 2015 07:46:49 -0700 (PDT)
Raw View
------=_Part_2544_1178987420.1436885209435
Content-Type: multipart/alternative;
boundary="----=_Part_2545_1351843585.1436885209436"
------=_Part_2545_1351843585.1436885209436
Content-Type: text/plain; charset=UTF-8
Hello All,
I know there is ongoing (or finished) work to incorporated into standard
the boost::variant.
But for me it sometimes too big machinery - when comparing to C++11
unrestricted unions - see this:
using namespace std;
union SomeUnrestrictedUnion
{
string str;
vector<int> intvector;
int number;
};
Since C++11 we can deal with such union by placement new and explicit
destructor calling (assuming we have full control on what is going on in
our code):
SomeUnrestrictedUnion suu;
new (&suu.str) string("Hello there");
std::cout << suu.str << std::endl;
suu.str->~string();
What I think would be needed to make usage of such unrestricted unions - is
to define some kind of very simple std container - like std::tuple for
simple struct - that can be used in generic C++ code:
template <typename ...V>
class SomeClass
{
unrestricted_union<V...> oneValueAtATime;
};
To make it easier to make these placement new and get value and destruction
operations - function templates construct, destruct and get can be defined
- so first example can look like this:
unrestricted_union<string, vector<int>, int> suu;
construct<0>(suu, "Hello there");
std::cout << get<0>(suu) << std::endl;
destruct<0>(suu);
For me it is obvious that at some point "full control over what is going on
in the code" is lost. So we need some discriminator to track what is in
such union and use proper destructor when time comes...
So what - make apologies to boost::variant and return to it? Not
necessarily...
For me boost::variant - has two problems - it cannot be tagged like Pascal
variant records: wikipedia/Tagged_union
<https://en.wikipedia.org/wiki/Tagged_union> and practically types cannot
be duplicated in its definition - but with discriminator that should be
possible.
So - basing a little on Pascal variant records syntax - I am making
proposition to add such tagged_union class:
enum class Discriminator : uint8_t { String = 31, IntVector = 197, Int = 203
}; // these numbers are just to show that values do not have to be in
0...N-1 range
tagged_union<Discriminator>
::with<Discriminator::String>::as<string>
::with<Discriminator::IntVector>::as<vector<int>>
::with<Discriminator::Int>::as<int>::type tu("Hello there");
cout << tu.get<Discriminator::String>() << endl;
// or just like in boost::variant -
cout << tu.tag_value() << ": " << tu << endl;
And all of this is implementable - I make some first working implementation
approach in github:PiotrNycz:tagged_union
<https://github.com/PiotrNycz/tagged_union>
BR,
Piotr Nycz
--
---
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_2545_1351843585.1436885209436
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hello All,<br><br>I know there is ongoing (or finished) wo=
rk to incorporated into standard the boost::variant. <br>But for me it some=
times too big machinery - when comparing to C++11 unrestricted unions - see=
this:<br><br><div class=3D"prettyprint" style=3D"background-color: rgb(250=
, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-=
width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=
=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettif=
y">using</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> <=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">namespace</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=3D"c=
olor: #008;" class=3D"styled-by-prettify">union</span><span style=3D"color:=
#000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #606;" c=
lass=3D"styled-by-prettify">SomeUnrestrictedUnion</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> <br></span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">string</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> str</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"><br>=C2=A0 =C2=A0 vector</span><span style=3D"color: #080;" =
class=3D"styled-by-prettify"><int></span><span style=3D"color: #000;"=
class=3D"styled-by-prettify"> intvector</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> number</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">;</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br></span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">};</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><b=
r><br></span></div></code></div><br><br>Since C++11 we can deal with such u=
nion by placement new and explicit destructor calling (assuming we have ful=
l control on what is going on in our code):<br><br><div class=3D"prettyprin=
t" style=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 18=
7, 187); border-style: solid; border-width: 1px; word-wrap: break-word;"><c=
ode class=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">SomeUnrestrictedUnion</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> suu</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">new</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">(&</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify">suu</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">.</span><span style=3D"color: #000;" class=3D"styled-by-prettify">str</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">)</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">string</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #0=
80;" class=3D"styled-by-prettify">"Hello there"</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">);</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>std</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">cout </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify"><<</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> suu</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">.</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify">str </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y"><<</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">endl</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>suu</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">str</span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">->~</span><span style=3D"color: #008;" class=
=3D"styled-by-prettify">string</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">();</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"><br><br></span></div></code></div><br><br>What I think would b=
e needed to make usage of such unrestricted unions - is to define some kind=
of very simple std container - like std::tuple for simple struct - that ca=
n be used in generic C++ code:<br><br><div class=3D"prettyprint" style=3D"b=
ackground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); bord=
er-style: solid; border-width: 1px; word-wrap: break-word;"><code class=3D"=
prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">template</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify"><</span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">..=
..</span><span style=3D"color: #000;" class=3D"styled-by-prettify">V</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">></span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">class</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #60=
6;" class=3D"styled-by-prettify">SomeClass</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">{</span><span style=3D"color: #000;" class=3D"sty=
led-by-prettify"><br>=C2=A0 =C2=A0 =C2=A0unrestricted_union</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=3D"=
color: #000;" class=3D"styled-by-prettify">V</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">...></span><span style=3D"color: #000;=
" class=3D"styled-by-prettify"> =C2=A0oneValueAtATime</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" c=
lass=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"><br><br></span></div></code></div><br><br>To make it ea=
sier to make these placement new and get value and destruction operations -=
function templates construct, destruct and get can be defined - so first e=
xample can look like this:<br><br><div class=3D"prettyprint" style=3D"backg=
round-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-s=
tyle: solid; border-width: 1px; word-wrap: break-word;"><code class=3D"pret=
typrint"><div class=3D"subprettyprint"><span style=3D"color: #000;" class=
=3D"styled-by-prettify">unrestricted_union</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify"><</span><span style=3D"color: #008;" cla=
ss=3D"styled-by-prettify">string</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> vector</span><span style=3D"color: #080;" class=3D"styled-b=
y-prettify"><int></span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">></span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> suu</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"><br>construct</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=3D"co=
lor: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">>(</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify">suu</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prettify=
">"Hello there"</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">);</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"><br>std</span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">::</span><span style=3D"color: #000;" class=3D"styled-by-prettify">cout=
</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><<<=
/span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">get</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=3D"c=
olor: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">>(</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify">suu</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y"><<</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
> std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</s=
pan><span style=3D"color: #000;" class=3D"styled-by-prettify">endl</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"><br>destruct</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify"><</span><span style=3D"=
color: #066;" class=3D"styled-by-prettify">0</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">>(</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify">suu</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br><br></span></div></code></div><br>For me it is obvious =
that at some point "full control over what is going on in the code&quo=
t; is lost. So we need some discriminator to track what is in such union an=
d use proper=C2=A0 destructor when time comes...<br>So what - make apologie=
s to boost::variant and return to it? Not necessarily...<br>For me boost::v=
ariant - has two problems - it cannot be tagged like Pascal variant records=
: <a href=3D"https://en.wikipedia.org/wiki/Tagged_union">wikipedia/Tagged_u=
nion</a> and practically types cannot be duplicated in its definition - but=
with discriminator that should be possible.<br>So - basing a little on Pas=
cal variant records syntax - I am making proposition to add such tagged_uni=
on class:<br><br><div class=3D"prettyprint" style=3D"background-color: rgb(=
250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; bord=
er-width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div cla=
ss=3D"subprettyprint"><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">enum</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #008;" class=3D"styled-by-prettify">class</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #606;" class=3D"styled-by-prettify">Discriminator</span><spa=
n style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">:</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> uint8_t </span><span style=3D"color:=
#660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> </span><span style=3D"color: #606;" class=3D"s=
tyled-by-prettify">String</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #066;" class=3D"styled-by-prettify">31</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span styl=
e=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"colo=
r: #606;" class=3D"styled-by-prettify">IntVector</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">197</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> =
</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Int</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"c=
olor: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #06=
6;" class=3D"styled-by-prettify">203</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">};</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #800;" class=3D"styled-by-prettify">=
// these numbers are just to show that values do not have to be in 0...N-1 =
range</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>t=
agged_union</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
><</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Discr=
iminator</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&g=
t;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=
=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>::</span><span style=3D"color: #008;" class=3D"styled-by-prettify">with</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify"><</span><s=
pan style=3D"color: #606;" class=3D"styled-by-prettify">Discriminator</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span s=
tyle=3D"color: #606;" class=3D"styled-by-prettify">String</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">>::</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">as</span><span style=3D"color: #=
080;" class=3D"styled-by-prettify"><string></span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #008;" class=3D"styled-by-prettify">with</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify"><</span><span style=3D"color: #606;" cl=
ass=3D"styled-by-prettify">Discriminator</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">::</span><span style=3D"color: #606;" class=
=3D"styled-by-prettify">IntVector</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">>::</span><span style=3D"color: #008;" class=3D"=
styled-by-prettify">as</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify"><</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify">vector</span><span style=3D"color: #080;" class=3D"styled-by-prettify=
"><int></span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">></span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
>=C2=A0 =C2=A0 </span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">::</span><span style=3D"color: #008;" class=3D"styled-by-prettify">wit=
h</span><span style=3D"color: #660;" class=3D"styled-by-prettify"><</spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">Discriminator</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><sp=
an style=3D"color: #606;" class=3D"styled-by-prettify">Int</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">>::</span><span style=3D=
"color: #008;" class=3D"styled-by-prettify">as</span><span style=3D"color: =
#080;" class=3D"styled-by-prettify"><int></span><span style=3D"color:=
#660;" class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify">type tu</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">(</span><span style=3D"color: #080;" class=3D"sty=
led-by-prettify">"Hello there"</span><span style=3D"color: #660;"=
class=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br>cout </span><span style=3D"color: #660;" class=
=3D"styled-by-prettify"><<</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> tu</span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">.</span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">get</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
><</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Discr=
iminator</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::=
</span><span style=3D"color: #606;" class=3D"styled-by-prettify">String</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">>()</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify"><<</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> endl</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #800;" cl=
ass=3D"styled-by-prettify">// or just like in boost::variant - </span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"><br>cout </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify"><<</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> tu</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">.</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify">tag_value</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">()</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify"><<</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> </span><span style=3D"color: #080;" class=3D"styled-by-prett=
ify">": "</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
<<</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> t=
u </span><span style=3D"color: #660;" class=3D"styled-by-prettify"><<=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> endl</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">;</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br><br></span></div></c=
ode></div><br><br><br>And all of this is implementable - I make some first =
working implementation approach in <a href=3D"https://github.com/PiotrNycz/=
tagged_union">github:PiotrNycz:tagged_union</a><br><br>BR,<br>Piotr Nycz<br=
><br><br><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 />
------=_Part_2545_1351843585.1436885209436--
------=_Part_2544_1178987420.1436885209435--
.