Topic: D0050 - C++ generic match function
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Tue, 15 Sep 2015 22:09:08 +0200
Raw View
This is a multi-part message in MIME format.
--------------090506070101010402010803
Content-Type: text/plain; charset=UTF-8; format=flowed
Hi,
[1] presents a proposal for generic |match| functions allowing to
visit sum types individually or by groups (product of sum types).
The main difference respect to the proposed visit function is that the
visitation can be applied not only to variant<Ts>, but to any sum type
implementing the match function, in particular optional, expected, ....
Any feedback is welcome.
Vicente Botet
[1] https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
--
---
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/.
--------------090506070101010402010803
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dutf-8=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
Hi,
<br>
<br>
=C2=A0[1]=C2=A0 presents a proposal for generic <code>match</code>
functions allowing to visit sum types individually or by groups
(product of sum types).
<title></title>
<meta name=3D"GENERATOR" content=3D"OpenOffice.org 3.3 (Unix)">
<style type=3D"text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
</style><br>
<br>
The main difference respect to the proposed visit function is that
the visitation can be applied not only to variant<Ts>, but to
any sum type implementing the match function, in particular
optional, expected, ....<br>
<br>
Any feedback is welcome.
<br>
<br>
Vicente Botet<br>
<br>
[1]
<a class=3D"moz-txt-link-freetext" href=3D"https://github.com/viboes/ta=
gs/blob/master/doc/proposals/match/D0050.pdf">https://github.com/viboes/tag=
s/blob/master/doc/proposals/match/D0050.pdf</a><br>
</body>
</html>
<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 />
--------------090506070101010402010803--
.
Author: =?UTF-8?Q?Andrzej_Krzemie=C5=84ski?= <akrzemi1@gmail.com>
Date: Wed, 16 Sep 2015 05:48:51 -0700 (PDT)
Raw View
------=_Part_103_1107677264.1442407731261
Content-Type: multipart/alternative;
boundary="----=_Part_104_233129792.1442407731262"
------=_Part_104_233129792.1442407731262
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
W dniu wtorek, 15 wrze=C5=9Bnia 2015 22:09:10 UTC+2 u=C5=BCytkownik Vicente=
J. Botet=20
Escriba napisa=C5=82:
>
> Hi,=20
>
> [1] presents a proposal for generic match functions allowing to visit=
=20
> sum types individually or by groups (product of sum types).=20
>
> The main difference respect to the proposed visit function is that the=20
> visitation can be applied not only to variant<Ts>, but to any sum type=20
> implementing the match function, in particular optional, expected, ....
>
> Any feedback is welcome.=20
>
> Vicente Botet
>
> [1]=20
> https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
>
So, how with this tool can I perform the following task:
I have:
vatiant<int, std::string, double> v;
optional<double> o
I want to return true when v stores a double and o is empty, and return=20
false otherwise.=20
--=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_104_233129792.1442407731262
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<br><br>W dniu wtorek, 15 wrze=C5=9Bnia 2015 22:09:10 UTC+2 u=C5=BCytkownik=
Vicente J. Botet Escriba napisa=C5=82:<blockquote class=3D"gmail_quote" st=
yle=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-lef=
t: 1ex;">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
Hi,
<br>
<br>
=C2=A0[1]=C2=A0 presents a proposal for generic <code>match</code>
functions allowing to visit sum types individually or by groups
(product of sum types).
=20
=20
<br>
<br>
The main difference respect to the proposed visit function is that
the visitation can be applied not only to variant<Ts>, but to
any sum type implementing the match function, in particular
optional, expected, ....<br>
<br>
Any feedback is welcome.
<br>
<br>
Vicente Botet<br>
<br>
[1]
<a href=3D"https://github.com/viboes/tags/blob/master/doc/proposals/mat=
ch/D0050.pdf" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=
=3D'https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fviboes%2F=
tags%2Fblob%2Fmaster%2Fdoc%2Fproposals%2Fmatch%2FD0050.pdf\46sa\75D\46sntz\=
0751\46usg\75AFQjCNFO47x-6uME0eTeo9mzIYkCveY8vA';return true;" onclick=
=3D"this.href=3D'https://www.google.com/url?q\75https%3A%2F%2Fgithub.co=
m%2Fviboes%2Ftags%2Fblob%2Fmaster%2Fdoc%2Fproposals%2Fmatch%2FD0050.pdf\46s=
a\75D\46sntz\0751\46usg\75AFQjCNFO47x-6uME0eTeo9mzIYkCveY8vA';return tr=
ue;">https://github.com/viboes/<wbr>tags/blob/master/doc/<wbr>proposals/mat=
ch/D0050.pdf</a></div></blockquote><div><br>So, how with this tool can I pe=
rform the following task:<br><br>I have:<br><br>vatiant<int, std::string=
, double> v;<br>optional<double> o<br><br>I want to return true wh=
en v stores a double and o is empty, and return false otherwise. <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_104_233129792.1442407731262--
------=_Part_103_1107677264.1442407731261--
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Wed, 16 Sep 2015 08:32:15 -0700 (PDT)
Raw View
------=_Part_6241_1185941233.1442417535479
Content-Type: multipart/alternative;
boundary="----=_Part_6242_976326927.1442417535479"
------=_Part_6242_976326927.1442417535479
Content-Type: text/plain; charset=UTF-8
On Tuesday, September 15, 2015 at 4:09:10 PM UTC-4, Vicente J. Botet
Escriba wrote:
>
> Hi,
>
> [1] presents a proposal for generic match functions allowing to visit
> sum types individually or by groups (product of sum types).
>
> The main difference respect to the proposed visit function is that the
> visitation can be applied not only to variant<Ts>, but to any sum type
> implementing the match function, in particular optional, expected, ....
>
> Any feedback is welcome.
>
> Vicente Botet
>
> [1]
> https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
>
I'm not clear how this matching scheme works for empty optional objects.
Being empty is a valid state for an optional, but it has no type associated
with it. And this C++ matching scheme is ultimately based on the type in a
"sum type". So how do you match the empty state of an optional, when it has
no type?
I see the use of [](...) in your overload sequences, but I don't really
know what that means (besides the obvious, of course). If that is intended
to be what's called when the source is empty, then how do you match across
two "sum types", when one is an empty optional and the other is not empty?
Also, your visitation needs to be specified to throw an exception if it is
passed a `variant` that is empty. The current version of `variant` does not
have an empty "state" in the traditional sense; it simply has an invalid
state, which can only be achieved by a failure to copy construct the object.
--
---
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_6242_976326927.1442417535479
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Tuesday, September 15, 2015 at 4:09:10 PM UTC-4, Vicente J. Botet Escrib=
a wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0=
..8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
=20
=20
=20
<div bgcolor=3D"#FFFFFF" text=3D"#000000">
Hi,
<br>
<br>
=C2=A0[1]=C2=A0 presents a proposal for generic <code>match</code>
functions allowing to visit sum types individually or by groups
(product of sum types).
=20
=20
<br>
<br>
The main difference respect to the proposed visit function is that
the visitation can be applied not only to variant<Ts>, but to
any sum type implementing the match function, in particular
optional, expected, ....<br>
<br>
Any feedback is welcome.
<br>
<br>
Vicente Botet<br>
<br>
[1]
<a href=3D"https://github.com/viboes/tags/blob/master/doc/proposals/mat=
ch/D0050.pdf" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=
=3D'https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fviboes%2F=
tags%2Fblob%2Fmaster%2Fdoc%2Fproposals%2Fmatch%2FD0050.pdf\46sa\75D\46sntz\=
0751\46usg\75AFQjCNFO47x-6uME0eTeo9mzIYkCveY8vA';return true;" onclick=
=3D"this.href=3D'https://www.google.com/url?q\75https%3A%2F%2Fgithub.co=
m%2Fviboes%2Ftags%2Fblob%2Fmaster%2Fdoc%2Fproposals%2Fmatch%2FD0050.pdf\46s=
a\75D\46sntz\0751\46usg\75AFQjCNFO47x-6uME0eTeo9mzIYkCveY8vA';return tr=
ue;">https://github.com/viboes/<wbr>tags/blob/master/doc/<wbr>proposals/mat=
ch/D0050.pdf</a></div></blockquote><div><br>I'm not clear how this matc=
hing scheme works for empty optional objects. Being empty is a valid state =
for an optional, but it has no type associated with it. And this C++ matchi=
ng scheme is ultimately based on the type in a "sum type". So how=
do you match the empty state of an optional, when it has no type?<br><br>I=
see the use of [](...) in your overload sequences, but I don't really =
know what that means (besides the obvious, of course). If that is intended =
to be what's called when the source is empty, then how do you match acr=
oss two "sum types", when one is an empty optional and the other =
is not empty?<br><br>Also, your visitation needs to be specified to throw a=
n exception if it is passed a `variant` that is empty. The current version =
of `variant` does not have an empty "state" in the traditional se=
nse; it simply has an invalid state, which can only be achieved by a failur=
e to copy construct the object.<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_6242_976326927.1442417535479--
------=_Part_6241_1185941233.1442417535479--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Wed, 16 Sep 2015 19:56:02 +0200
Raw View
This is a multi-part message in MIME format.
--------------010208050202050609020605
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 16/09/15 14:48, Andrzej Krzemie=C5=84ski a =C3=A9crit :
>
> W dniu wtorek, 15 wrze=C5=9Bnia 2015 22:09:10 UTC+2 u=C5=BCytkownik Vicen=
te J. Botet
> Escriba napisa=C5=82:
> So, how with this tool can I perform the following task:
>
> I have:
>
> vatiant<int, std::string, double> v;
> optional<double> o
>
> I want to return true when v stores a double and o is empty, and return
> false otherwise.
>
bool b =3D match(make_tuple(v,o),
[] (double, nullopt_t) { return true;},
[] (...) { return false; }
);
or if you prefer the inspect (there is no wording for yet)
bool b =3D inspect(v,o).match(
[] (double, nullopt_t) { return true;},
[] (...) { return false; }
);
Vicente
--=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/.
--------------010208050202050609020605
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 16/09/15 14:48, Andrzej Krzemie=C5=84=
ski
a =C3=A9crit=C2=A0:<br>
</div>
<blockquote
cite=3D"mid:f6886597-533a-4d6d-adf6-4ca86cad75cd@isocpp.org"
type=3D"cite">
<pre wrap=3D"">
W dniu wtorek, 15 wrze=C5=9Bnia 2015 22:09:10 UTC+2 u=C5=BCytkownik Vicente=
J. Botet=20
Escriba napisa=C5=82:
</pre>
<blockquote type=3D"cite">
<pre wrap=3D"">
</pre>
</blockquote>
<pre wrap=3D"">
So, how with this tool can I perform the following task:
I have:
vatiant<int, std::string, double> v;
optional<double> o
I want to return true when v stores a double and o is empty, and return=20
false otherwise.=20
</pre>
</blockquote>
<font size=3D"+1">bool b =3D match(make_tuple(v,o), <br>
=C2=A0=C2=A0=C2=A0 []</font> (double, nullopt_t) { return true;},<br>
=C2=A0=C2=A0=C2=A0 [] (...) { return false; }<br>
);<br>
<br>
<br>
or if you prefer the inspect (there is no wording for yet)<br>
<br>
<font size=3D"+1">bool b =3D inspect(v,o).match( <br>
=C2=A0=C2=A0=C2=A0 []</font> (double, nullopt_t) { return true;},<br>
=C2=A0=C2=A0=C2=A0 [] (...) { return false; }<br>
);<br>
<br>
<br>
Vicente<br>
</body>
</html>
<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 />
--------------010208050202050609020605--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Wed, 16 Sep 2015 20:02:03 +0200
Raw View
Le 16/09/15 17:32, Nicol Bolas a =C3=A9crit :
> On Tuesday, September 15, 2015 at 4:09:10 PM UTC-4, Vicente J. Botet
> Escriba wrote:
>> Hi,
>>
>> [1] presents a proposal for generic match functions allowing to visit
>> sum types individually or by groups (product of sum types).
>>
>> The main difference respect to the proposed visit function is that the
>> visitation can be applied not only to variant<Ts>, but to any sum type
>> implementing the match function, in particular optional, expected, ....
>>
>> Any feedback is welcome.
>>
>> Vicente Botet
>>
>> [1]
>> https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
>>
> I'm not clear how this matching scheme works for empty optional objects.
See my response to Andrzej.
> Being empty is a valid state for an optional, but it has no type associat=
ed
> with it. And this C++ matching scheme is ultimately based on the type in =
a
> "sum type". So how do you match the empty state of an optional, when it h=
as
> no type?
optional<T> is nulopt_t + T
>
> I see the use of [](...) in your overload sequences, but I don't really
> know what that means (besides the obvious, of course). If that is intende=
d
> to be what's called when the source is empty, then how do you match acros=
s
> two "sum types", when one is an empty optional and the other is not empty=
?
[] (....) matches always but is the worst match so that we can use it as=20
id it was the default: case of a switch.
>
> Also, your visitation needs to be specified to throw an exception if it i=
s
> passed a `variant` that is empty. The current version of `variant` does n=
ot
> have an empty "state" in the traditional sense; it simply has an invalid
> state, which can only be achieved by a failure to copy construct the obje=
ct.
>
It is up to the match customization of variant to do whatever is needed.=20
If variant visitation is UB on an invalid state, match on multiple sum=20
types would as well have UB.
Vicente
--=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/.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Wed, 16 Sep 2015 14:05:55 -0700 (PDT)
Raw View
------=_Part_91_1540240748.1442437555193
Content-Type: multipart/alternative;
boundary="----=_Part_92_542830958.1442437555193"
------=_Part_92_542830958.1442437555193
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Wednesday, September 16, 2015 at 2:02:06 PM UTC-4, Vicente J. Botet=20
Escriba wrote:
>
> Le 16/09/15 17:32, Nicol Bolas a =C3=A9crit :=20
> > Also, your visitation needs to be specified to throw an exception if it=
=20
> is=20
> > passed a `variant` that is empty. The current version of `variant` does=
=20
> not=20
> > have an empty "state" in the traditional sense; it simply has an invali=
d=20
> > state, which can only be achieved by a failure to copy construct the=20
> object.=20
> >=20
> It is up to the match customization of variant to do whatever is needed.=
=20
> If variant visitation is UB on an invalid state, match on multiple sum=20
> types would as well have UB.
>
Fair enough.
--=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_92_542830958.1442437555193
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Wednesday, September 16, 2015 at 2:02:06 PM UTC-4, Vicente J. Botet Escr=
iba wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:=
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Le 16/09/15 17:32, N=
icol Bolas a =C3=A9crit :
<br>> Also, your visitation needs to be specified to throw an exception =
if it is
<br>> passed a `variant` that is empty. The current version of `variant`=
does not
<br>> have an empty "state" in the traditional sense; it simpl=
y has an invalid
<br>> state, which can only be achieved by a failure to copy construct t=
he object.
<br>>
<br>It is up to the match customization of variant to do whatever is needed=
..=20
<br>If variant visitation is UB on an invalid state, match on multiple sum=
=20
<br>types would as well have UB.<br></blockquote><div><br>Fair enough.<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_92_542830958.1442437555193--
------=_Part_91_1540240748.1442437555193--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Wed, 16 Sep 2015 23:34:26 +0200
Raw View
Le 16/09/15 20:02, Vicente J. Botet Escriba a =C3=A9crit :
> Le 16/09/15 17:32, Nicol Bolas a =C3=A9crit :
>> On Tuesday, September 15, 2015 at 4:09:10 PM UTC-4, Vicente J. Botet
>> Escriba wrote:
>>
>> I see the use of [](...) in your overload sequences, but I don't really
>> know what that means (besides the obvious, of course). If that is=20
>> intended
>> to be what's called when the source is empty, then how do you match=20
>> across
>> two "sum types", when one is an empty optional and the other is not=20
>> empty?
> [] (....) matches always but is the worst match so that we can use it=20
> as id it was the default: case of a switch.
Sorry due to this limitation
"cannot pass objects of non-trivially-copyable type =E2=80=98const class=20
std::basic_string<char>=E2=80=99 through =E2=80=98...=E2=80=99"
we need to use auto
bool b =3D match(make_tuple(v,o),
[] (double, nullopt_t) { return true;},
[] (auto, auto) { return false; }
);
Vicente
>>
--=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/.
.
Author: Larry Evans <cppljevans@suddenlink.net>
Date: Thu, 17 Sep 2015 07:20:30 -0500
Raw View
On 09/15/2015 03:09 PM, Vicente J. Botet Escriba wrote:
> Hi,
>
> [1] presents a proposal for generic |match| functions allowing to
> visit sum types individually or by groups (product of sum types).
>
> The main difference respect to the proposed visit function is that the
> visitation can be applied not only to variant<Ts>, but to any sum type
> implementing the match function, in particular optional, expected, ....
>
> Any feedback is welcome.
>
> Vicente Botet
>
> [1]
https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
>
Vicente, on page 2, there's a use of a types template within
a sum_type_alternatives template. This was confusing at
first because I hadn't seen either one of these templates
mentioned before. After searching the whole document, they
were found much later on page 10. I'd find it easier to
read if there was some way you could annotate these terms
with maybe a footnote with a link to their definitions on
page 10 under the section titled, 'Technical Specification'.
However, on page 10, under title 'Type trait
sum_type_alternatives', it says:
sum_type_alternatives<ST>::type
must define the tuple-like helper meta-functions
std::tuple_size and std::tuple_element.
However, on page 2, sum_type_alternatives::type is just
types<Ts...>, which, as defined on page 10, under the
section titled 'Header <experimental/meta> Synopsis', is
just:
template <class ...Ts>
struct types {};
Since this defined no metafunctions, a clearer wording would
be:
For sum_type_alternatives<ST>::type there must be defined
specializations of the tuple-like helper meta-functions
std::tuple_size and std::tuple_element>.
and give a links to the something like:
http://en.cppreference.com/w/cpp/utility/tuple/tuple_size
http://en.cppreference.com/w/cpp/utility/tuple/tuple_element
to be very explicit what these metafunction specializations
would do.
-regards,
Larry
--
---
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: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Thu, 17 Sep 2015 18:49:36 +0200
Raw View
Le 16/09/15 19:56, Vicente J. Botet Escriba a =C3=A9crit :
> Le 16/09/15 14:48, Andrzej Krzemie=C5=84ski a =C3=A9crit :
>>
>> W dniu wtorek, 15 wrze=C5=9Bnia 2015 22:09:10 UTC+2 u=C5=BCytkownik Vice=
nte J.=20
>> Botet
>> Escriba napisa=C5=82:
>> So, how with this tool can I perform the following task:
>>
>> I have:
>>
>> vatiant<int, std::string, double> v;
>> optional<double> o
>>
>> I want to return true when v stores a double and o is empty, and return
>> false otherwise.
>>
> bool b =3D match(make_tuple(v,o),
> [] (double, nullopt_t) { return true;},
> [] (...) { return false; }
> );
>
>
> or if you prefer the inspect (there is no wording for yet)
>
> bool b =3D inspect(v,o).match(
> [] (double, nullopt_t) { return true;},
> [] (...) { return false; }
> );
>
>
> Vicente
>
Sorry due to this limitation
cannot pass objects of non-trivially-copyable type =E2=80=98const class=20
std::basic_string<char>=E2=80=99 through =E2=80=98...=E2=80=99
we need to use auto
bool b =3D match(make_tuple(v,o),
[] (double, nullopt_t) { return true;},
[] (auto, auto) { return false; }
);
Vicente
--=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/.
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Thu, 17 Sep 2015 18:50:39 +0200
Raw View
This is a multi-part message in MIME format.
--------------060005080907050109090507
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 17/09/15 14:20, Larry Evans a =C3=A9crit :
> On 09/15/2015 03:09 PM, Vicente J. Botet Escriba wrote:
>> Hi,
>>
>> [1] presents a proposal for generic |match| functions allowing to
>> visit sum types individually or by groups (product of sum types).
>>
>> The main difference respect to the proposed visit function is that the
>> visitation can be applied not only to variant<Ts>, but to any sum type
>> implementing the match function, in particular optional, expected, ....
>>
>> Any feedback is welcome.
>>
>> Vicente Botet
>>
>> [1]
> https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
> Vicente, on page 2, there's a use of a types template within
> a sum_type_alternatives template. This was confusing at
> first because I hadn't seen either one of these templates
> mentioned before.
I've replace it by
template <class ...Ts >
struct sum_type_alternatives<variant<Ts...>>
{
using type =3D ...;
}
There must be defined specializations of the tuple-like helper=20
meta-functions std::tuple_sizeand std::tuple_elementfor the nested=20
typedef type.
> After searching the whole document, they
> were found much later on page 10. I'd find it easier to
> read if there was some way you could annotate these terms
> with maybe a footnote with a link to their definitions on
> page 10 under the section titled, 'Technical Specification'.
>
> However, on page 10, under title 'Type trait
> sum_type_alternatives', it says:
>
>
> sum_type_alternatives<ST>::type
> must define the tuple-like helper meta-functions
> std::tuple_size and std::tuple_element.
>
> However, on page 2, sum_type_alternatives::type is just
> types<Ts...>, which, as defined on page 10, under the
> section titled 'Header <experimental/meta> Synopsis', is
> just:
>
> template <class ...Ts>
> struct types {};
I"ve removed it from the proposal, as it merits a separated proposal.
> Since this defined no metafunctions, a clearer wording would
> be:
>
> For sum_type_alternatives<ST>::type there must be defined
> specializations of the tuple-like helper meta-functions
> std::tuple_size and std::tuple_element>.
>
> and give a links to the something like:
>
> http://en.cppreference.com/w/cpp/utility/tuple/tuple_size
> http://en.cppreference.com/w/cpp/utility/tuple/tuple_element
>
> to be very explicit what these metafunction specializations
> would do.
>
>
Point taken.
Vicente
--=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/.
--------------060005080907050109090507
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 17/09/15 14:20, Larry Evans a
=C3=A9crit=C2=A0:<br>
</div>
<blockquote cite=3D"mid:mteb6g$vfs$1@ger.gmane.org" type=3D"cite">
<pre wrap=3D"">On 09/15/2015 03:09 PM, Vicente J. Botet Escriba wrote=
:
</pre>
<blockquote type=3D"cite">
<pre wrap=3D"">Hi,
[1] presents a proposal for generic |match| functions allowing to
visit sum types individually or by groups (product of sum types).
The main difference respect to the proposed visit function is that the
visitation can be applied not only to variant<Ts>, but to any sum typ=
e
implementing the match function, in particular optional, expected, ....
Any feedback is welcome.
Vicente Botet
[1]
</pre>
</blockquote>
<pre wrap=3D""><a class=3D"moz-txt-link-freetext" href=3D"https://git=
hub.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf">https://gith=
ub.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf</a>
</pre>
<blockquote type=3D"cite">
<pre wrap=3D"">
</pre>
</blockquote>
<pre wrap=3D"">
Vicente, on page 2, there's a use of a types template within
a sum_type_alternatives template. This was confusing at
first because I hadn't seen either one of these templates
mentioned before. </pre>
</blockquote>
I've replace it by
<pre style=3D"margin-left: 1.25cm">template <class ...Ts >
struct sum_type_alternatives<variant<Ts...>>=20
{
using type =3D ...;
}</pre>
<p>
There must be defined specializations of the tuple-like helper
meta-functions std::tuple_size<font face=3D"Times New Roman, serif">
and </font>std::tuple_element<font face=3D"Times New Roman,
serif"> for the nested typedef </font>type. </p>
<title></title>
<meta name=3D"GENERATOR" content=3D"OpenOffice.org 3.3 (Unix)">
<style type=3D"text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
</style>
<blockquote cite=3D"mid:mteb6g$vfs$1@ger.gmane.org" type=3D"cite">
<pre wrap=3D"">After searching the whole document, they
were found much later on page 10. I'd find it easier to
read if there was some way you could annotate these terms
with maybe a footnote with a link to their definitions on
page 10 under the section titled, 'Technical Specification'.
However, on page 10, under title 'Type trait
sum_type_alternatives', it says:
sum_type_alternatives<ST>::type
must define the tuple-like helper meta-functions
std::tuple_size and std::tuple_element.
However, on page 2, sum_type_alternatives::type is just
types<Ts...>, which, as defined on page 10, under the
section titled 'Header <experimental/meta> Synopsis', is
just:
template <class ...Ts>
struct types {};
</pre>
</blockquote>
I"ve removed it from the proposal, as it merits a separated
proposal.<br>
<blockquote cite=3D"mid:mteb6g$vfs$1@ger.gmane.org" type=3D"cite">
<pre wrap=3D"">
Since this defined no metafunctions, a clearer wording would
be:
For sum_type_alternatives<ST>::type there must be defined
specializations of the tuple-like helper meta-functions
std::tuple_size and std::tuple_element>.
and give a links to the something like:
<a class=3D"moz-txt-link-freetext" href=3D"http://en.cppreference.com/w/c=
pp/utility/tuple/tuple_size">http://en.cppreference.com/w/cpp/utility/tuple=
/tuple_size</a>
<a class=3D"moz-txt-link-freetext" href=3D"http://en.cppreference.com/w/c=
pp/utility/tuple/tuple_element">http://en.cppreference.com/w/cpp/utility/tu=
ple/tuple_element</a>
to be very explicit what these metafunction specializations
would do.
</pre>
</blockquote>
Point taken.<br>
Vicente <br>
</body>
</html>
<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 />
--------------060005080907050109090507--
.
Author: Larry Evans <cppljevans@suddenlink.net>
Date: Thu, 17 Sep 2015 12:45:58 -0500
Raw View
This is a multi-part message in MIME format.
--------------000403000203050104000102
Content-Type: text/plain; charset=UTF-8
On 09/15/2015 03:09 PM, Vicente J. Botet Escriba wrote:
> Hi,
>
> [1] presents a proposal for generic |match| functions allowing to
> visit sum types individually or by groups (product of sum types).
>
> The main difference respect to the proposed visit function is that the
> visitation can be applied not only to variant<Ts>, but to any sum type
> implementing the match function, in particular optional, expected, ....
>
> Any feedback is welcome.
>
> Vicente Botet
>
> [1] https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
>
Page 12 under section title, 'Implementation', contains:
There is an implementation at https://github.com/viboes/tags
including customization for boost::variant
However, after cloning https://github.com/viboes/tags.git, an attempting
to run the variant test, the result was as shown on
the attached. Maybe the include should be:
#include <boost/optional.hpp>
instead of:
#include <optional.hpp>
?
-regards,
Larry
--
---
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/.
--------------000403000203050104000102
Content-Type: text/plain; charset=UTF-8;
name="tags_variant_compilation.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="tags_variant_compilation.txt"
LSotIG1vZGU6IGNvbXBpbGF0aW9uOyBkZWZhdWx0LWRpcmVjdG9yeTogIn4vcHJvZ19kZXYv
Ym9vc3QvZ2l0L3RhZ3MvdGVzdC8iIC0qLQpDb21waWxhdGlvbiBzdGFydGVkIGF0IFRodSBT
ZXAgMTcgMTI6MzE6MjUKCmIyIC1zQk9PU1RfUk9PVD0vaG9tZS9ldmFuc2wvcHJvZ19kZXYv
Ym9vc3QvYm9vc3QtcmVsZWFzZXMvcm8vYm9vc3RfMV81OV8wIHRzX3ZhcmlhbnQKd2Fybmlu
ZzogbWlzbWF0Y2hlZCB2ZXJzaW9ucyBvZiBCb29zdC5CdWlsZCBlbmdpbmUgYW5kIGNvcmUK
d2FybmluZzogQm9vc3QuQnVpbGQgZW5naW5lIChiMikgaXMgMjAxNC4wMy4wMAp3YXJuaW5n
OiBCb29zdC5CdWlsZCBjb3JlIChhdCAvaG9tZS9ldmFuc2wvcHJvZ19kZXYvYm9vc3QvYm9v
c3QtcmVsZWFzZXMvcm8vYm9vc3RfMV81OV8wL3Rvb2xzL2J1aWxkL3NyYykgaXMgMjAxNS4w
Ny1naXQKd2FybmluZzogTm8gdG9vbHNldHMgYXJlIGNvbmZpZ3VyZWQuCndhcm5pbmc6IENv
bmZpZ3VyaW5nIGRlZmF1bHQgdG9vbHNldCAiZ2NjIi4Kd2FybmluZzogSWYgdGhlIGRlZmF1
bHQgaXMgd3JvbmcsIHlvdXIgYnVpbGQgbWF5IG5vdCB3b3JrIGNvcnJlY3RseS4Kd2Fybmlu
ZzogVXNlIHRoZSAidG9vbHNldD14eHh4eCIgb3B0aW9uIHRvIG92ZXJyaWRlIG91ciBndWVz
cy4Kd2FybmluZzogRm9yIG1vcmUgY29uZmlndXJhdGlvbiBvcHRpb25zLCBwbGVhc2UgY29u
c3VsdAp3YXJuaW5nOiBodHRwOi8vYm9vc3Qub3JnL2Jvb3N0LWJ1aWxkMi9kb2MvaHRtbC9i
YnYyL2FkdmFuY2VkL2NvbmZpZ3VyYXRpb24uaHRtbAouLi5wYXRpZW5jZS4uLgouLi5mb3Vu
ZCA3MDYgdGFyZ2V0cy4uLgouLi51cGRhdGluZyA0IHRhcmdldHMuLi4KZ2NjLmNvbXBpbGUu
YysrIGJpbi92YXJpYW50X2luY2x1ZGVfcC50ZXN0L2djYy00LjkuMC9kZWJ1Zy9saW5rLXN0
YXRpYy92YXJpYW50L2luY2x1ZGVfcGFzcy5vCkluIGZpbGUgaW5jbHVkZWQgZnJvbSB2YXJp
YW50L2luY2x1ZGVfcGFzcy5jcHA6MTA6MDoKLi4vaW5jbHVkZS95YWZwbC92MS9kYXRhX3R5
cGUvb3B0aW9uYWwvb3B0aW9uYWwuaHBwOjIwOjI0OiBmYXRhbCBlcnJvcjogb3B0aW9uYWwu
aHBwOiBObyBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5CiAjaW5jbHVkZSA8b3B0aW9uYWwuaHBw
PgogICAgICAgICAgICAgICAgICAgICAgICBeCmNvbXBpbGF0aW9uIHRlcm1pbmF0ZWQuCgog
ICAgImcrKyIgIC1mdGVtcGxhdGUtZGVwdGgtMTI4IC1PMCAtZm5vLWlubGluZSAtV2FsbCAt
ZyAtV25vLXVudXNlZC1sb2NhbC10eXBlZGVmcyAtc3RkPWMrKzExICAgLUkiLiIgLUkiLi4v
aW5jbHVkZSIgLUkiL2hvbWUvZXZhbnNsL3Byb2dfZGV2L2Jvb3N0L2Jvb3N0LXJlbGVhc2Vz
L3JvL2Jvb3N0XzFfNTlfMCIgLWMgLW8gImJpbi92YXJpYW50X2luY2x1ZGVfcC50ZXN0L2dj
Yy00LjkuMC9kZWJ1Zy9saW5rLXN0YXRpYy92YXJpYW50L2luY2x1ZGVfcGFzcy5vIiAidmFy
aWFudC9pbmNsdWRlX3Bhc3MuY3BwIgo=
--------------000403000203050104000102--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 20 Sep 2015 00:57:45 +0200
Raw View
This is a multi-part message in MIME format.
--------------090502060000040805040109
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 17/09/15 19:45, Larry Evans a =C3=A9crit :
> On 09/15/2015 03:09 PM, Vicente J. Botet Escriba wrote:
>> Hi,
>>
>> [1] presents a proposal for generic |match| functions allowing to
>> visit sum types individually or by groups (product of sum types).
>>
>> The main difference respect to the proposed visit function is that the
>> visitation can be applied not only to variant<Ts>, but to any sum type
>> implementing the match function, in particular optional, expected, ....
>>
>> Any feedback is welcome.
>>
>> Vicente Botet
>>
>> [1] https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050=
..pdf
>>
> Page 12 under section title, 'Implementation', contains:
>
> There is an implementation at https://github.com/viboes/tags
> including customization for boost::variant
>
> However, after cloning https://github.com/viboes/tags.git, an attempting
> to run the variant test, the result was as shown on
> the attached. Maybe the include should be:
>
> #include <boost/optional.hpp>
>
> instead of:
>
> #include <optional.hpp>
>
> ?
>
> -regards,
> Larry
>
>
>
The issue has been fixed with the collaboration of Larry.
Thanks Larry,
Vicente
--=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/.
--------------090502060000040805040109
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 17/09/15 19:45, Larry Evans a
=C3=A9crit=C2=A0:<br>
</div>
<blockquote cite=3D"mid:mteu8o$bab$1@ger.gmane.org" type=3D"cite">
<pre wrap=3D"">On 09/15/2015 03:09 PM, Vicente J. Botet Escriba wrote=
:
</pre>
<blockquote type=3D"cite">
<pre wrap=3D"">Hi,
[1] presents a proposal for generic |match| functions allowing to
visit sum types individually or by groups (product of sum types).
The main difference respect to the proposed visit function is that the
visitation can be applied not only to variant<Ts>, but to any sum typ=
e
implementing the match function, in particular optional, expected, ....
Any feedback is welcome.
Vicente Botet
[1] <a class=3D"moz-txt-link-freetext" href=3D"https://github.com/viboes/ta=
gs/blob/master/doc/proposals/match/D0050.pdf">https://github.com/viboes/tag=
s/blob/master/doc/proposals/match/D0050.pdf</a>
</pre>
</blockquote>
<pre wrap=3D"">
Page 12 under section title, 'Implementation', contains:
There is an implementation at <a class=3D"moz-txt-link-freetext" href=3D"=
https://github.com/viboes/tags">https://github.com/viboes/tags</a>
including customization for boost::variant
However, after cloning <a class=3D"moz-txt-link-freetext" href=3D"https://g=
ithub.com/viboes/tags.git">https://github.com/viboes/tags.git</a>, an attem=
pting
to run the variant test, the result was as shown on
the attached. Maybe the include should be:
#include <boost/optional.hpp>
instead of:
#include <optional.hpp>
?
-regards,
Larry
</pre>
</blockquote>
<font size=3D"+1">The issue has been fixed with the collaboration of
Larry.<br>
<br>
Thanks Larry,<br>
Vicente<br>
</font>
</body>
</html>
<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 />
--------------090502060000040805040109--
.
Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Sun, 20 Sep 2015 00:59:28 +0200
Raw View
This is a multi-part message in MIME format.
--------------070301010105000102010307
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Le 15/09/15 22:09, Vicente J. Botet Escriba a =C3=A9crit :
> Hi,
>
> [1] presents a proposal for generic |match| functions allowing to=20
> visit sum types individually or by groups (product of sum types).
>
> The main difference respect to the proposed visit function is that the=20
> visitation can be applied not only to variant<Ts>, but to any sum type=20
> implementing the match function, in particular optional, expected, ....
>
> Any feedback is welcome.
>
> Vicente Botet
>
> [1]=20
> https://github.com/viboes/tags/blob/master/doc/proposals/match/D0050.pdf
>
Hi,
I have updated the proposal taking in account I hope all the comments.=20
Same link.
Vicente
--=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/.
--------------070301010105000102010307
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
">
</head>
<body bgcolor=3D"#FFFFFF" text=3D"#000000">
<div class=3D"moz-cite-prefix">Le 15/09/15 22:09, Vicente J. Botet
Escriba a =C3=A9crit=C2=A0:<br>
</div>
<blockquote cite=3D"mid:55F87AE4.9040506@wanadoo.fr" type=3D"cite">Hi,
<br>
<br>
=C2=A0[1]=C2=A0 presents a proposal for generic |match| functions all=
owing
to visit sum types individually or by groups (product of sum
types).
<br>
<br>
The main difference respect to the proposed visit function is that
the visitation can be applied not only to variant<Ts>, but
to any sum type implementing the match function, in particular
optional, expected, ....
<br>
<br>
Any feedback is welcome.
<br>
<br>
Vicente Botet
<br>
<br>
[1]
<a class=3D"moz-txt-link-freetext" href=3D"https://github.com/viboes/=
tags/blob/master/doc/proposals/match/D0050.pdf">https://github.com/viboes/t=
ags/blob/master/doc/proposals/match/D0050.pdf</a>
<br>
<br>
</blockquote>
<font size=3D"+1">Hi,<br>
<br>
<br>
I have updated the proposal taking in account I hope all the
comments. Same link.<br>
<br>
Vicente<br>
</font>
</body>
</html>
<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 />
--------------070301010105000102010307--
.