Topic: Extend std::function with overloaded function


Author: Lingxi Li <lilingxi.cs@gmail.com>
Date: Sun, 24 Jan 2016 18:40:22 -0800 (PST)
Raw View
------=_Part_188_979298432.1453689622686
Content-Type: multipart/alternative;
 boundary="----=_Part_189_32254695.1453689622687"

------=_Part_189_32254695.1453689622687
Content-Type: text/plain; charset=UTF-8

Current std::function does not disambiguate overloaded function. For
example,
the following code does not compile.

void func(int);
void func(char);

std::function<void(int)> f = func;

Users have to disambiguate themselves, with explicit casts for
example, which is
annoying. Since std::function is aware of the signature, it is
actually possible for it
to disambiguate automatically. So, I propose to add the following two member
functions to std::function to enable this functionality:

template <class R, class... Args>
class function<R(Args...)>
  ...
  function(R(*)(Args...));
  function& operator=(R(*)(Args...));

--

---
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 https://groups.google.com/a/isocpp.org/group/std-proposals/.

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

<div dir=3D"ltr">Current std::function does not disambiguate overloaded fun=
ction. For example,<br>the following code does not compile.<br><br><div cla=
ss=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap=
: break-word; background-color: rgb(250, 250, 250);"><code class=3D"prettyp=
rint"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"s=
tyled-by-prettify">void</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> func</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">i=
nt</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">void</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> func</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #00=
8;" class=3D"styled-by-prettify">char</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">);</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br><br>std</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">::</span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">function</span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-pretti=
fy">void</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(<=
/span><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">)&gt;</span><span =
style=3D"color: #000;" class=3D"styled-by-prettify"> f </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> func</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">;</span></div></code></div><br>Users hav=
e to disambiguate themselves, with explicit casts for example,=C2=A0which i=
s<br>annoying. Since std::function is aware of the signature, it is actuall=
y=C2=A0possible for it<br>to disambiguate automatically. So, I propose to a=
dd the following two=C2=A0member<br>functions to std::function to enable th=
is functionality:<br><br><div class=3D"prettyprint" style=3D"border: 1px so=
lid rgb(187, 187, 187); word-wrap: break-word; background-color: rgb(250, 2=
50, 250);"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span =
style=3D"color: #008;" class=3D"styled-by-prettify">template</span><span st=
yle=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"co=
lor: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color: #=
008;" class=3D"styled-by-prettify">class</span><span style=3D"color: #000;"=
 class=3D"styled-by-prettify"> R</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=3D"style=
d-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pret=
tify">class</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>...</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </spa=
n><span style=3D"color: #606;" class=3D"styled-by-prettify">Args</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&gt;</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">class</span><span style=3D"color:=
 #000;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">function</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&lt;</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify">R</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">(</span><span style=3D"color: #606;" class=3D"styled-by-prettify=
">Args</span><span style=3D"color: #660;" class=3D"styled-by-prettify">...)=
&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=
=C2=A0 </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=
 </span><span style=3D"color: #008;" class=3D"styled-by-prettify">function<=
/span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">R</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(*)(</span><span style=3D"co=
lor: #606;" class=3D"styled-by-prettify">Args</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 </span><span style=3D"color: #008=
;" class=3D"styled-by-prettify">function</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" clas=
s=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">operator</span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">=3D(</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify">R</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(=
*)(</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Args</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">...));</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify"> </span></div></c=
ode></div><br></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

------=_Part_189_32254695.1453689622687--
------=_Part_188_979298432.1453689622686--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 25 Jan 2016 13:46:14 +0800
Raw View
--Apple-Mail=_925758E5-652B-44C6-8801-7D7B75831A3A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2016=E2=80=9301=E2=80=9325, at 10:40 AM, Lingxi Li <lilingxi.cs@gmail.=
com> wrote:
>=20
> Current std::function does not disambiguate overloaded function. For exam=
ple,
> the following code does not compile.
>=20
> void func(int);
> void func(char);
>=20
> std::function<void(int)> f =3D func;
>=20
> Users have to disambiguate themselves, with explicit casts for example, w=
hich is
> annoying. Since std::function is aware of the signature, it is actually p=
ossible for it
> to disambiguate automatically. So, I propose to add the following two mem=
ber
> functions to std::function to enable this functionality:
>=20
> template <class R, class... Args>
> class function<R(Args...)>
>   ...
>   function(R(*)(Args...));
>   function& operator=3D(R(*)(Args...));

Interesting. Far as I see, this is orthogonal to and compatible with the ex=
isting constructor overloads and their SFINAE.

Turning overload sets into entities (e.g. by representing them as generic l=
ambda closures) might also solve the problem, though. I=E2=80=99ll try and =
find a proposal later if nobody else replies first.

--=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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

--Apple-Mail=_925758E5-652B-44C6-8801-7D7B75831A3A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2016=E2=80=9301=
=E2=80=9325, at 10:40 AM, Lingxi Li &lt;<a href=3D"mailto:lilingxi.cs@gmail=
..com" class=3D"">lilingxi.cs@gmail.com</a>&gt; wrote:</div><br class=3D"App=
le-interchange-newline"><div class=3D""><div dir=3D"ltr" class=3D"">Current=
 std::function does not disambiguate overloaded function. For example,<br c=
lass=3D"">the following code does not compile.<br class=3D""><br class=3D""=
><div class=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); =
word-wrap: break-word; background-color: rgb(250, 250, 250);"><code class=
=3D"prettyprint"><div class=3D"subprettyprint"><span style=3D"color: #008;"=
 class=3D"styled-by-prettify">void</span><span style=3D"" class=3D"styled-b=
y-prettify"> func</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">(</span><span style=3D"color: #008;" class=3D"styled-by-prettify">in=
t</span><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span>=
<span style=3D"" class=3D"styled-by-prettify"><br class=3D""></span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">void</span><span style=
=3D"" class=3D"styled-by-prettify"> func</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">(</span><span style=3D"color: #008;" class=3D=
"styled-by-prettify">char</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">);</span><span style=3D"" class=3D"styled-by-prettify"><br c=
lass=3D""><br class=3D"">std</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">::</span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">function</span><span style=3D"color: #660;" class=3D"styled-by-pr=
ettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-prettify=
">void</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(</s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">)&gt;</span><span st=
yle=3D"" class=3D"styled-by-prettify"> f </span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">=3D</span><span style=3D"" class=3D"styled-b=
y-prettify"> func</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">;</span></div></code></div><br class=3D"">Users have to disambiguate=
 themselves, with explicit casts for example,&nbsp;which is<br class=3D"">a=
nnoying. Since std::function is aware of the signature, it is actually&nbsp=
;possible for it<br class=3D"">to disambiguate automatically. So, I propose=
 to add the following two&nbsp;member<br class=3D"">functions to std::funct=
ion to enable this functionality:<br class=3D""><br class=3D""><div class=
=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: =
break-word; background-color: rgb(250, 250, 250);"><code class=3D"prettypri=
nt"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">template</span><span style=3D"" class=3D"styled-by-prettif=
y"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</=
span><span style=3D"color: #008;" class=3D"styled-by-prettify">class</span>=
<span style=3D"" class=3D"styled-by-prettify"> R</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">,</span><span style=3D"" class=3D"sty=
led-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-pr=
ettify">class</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">...</span><span style=3D"" class=3D"styled-by-prettify"> </span><span st=
yle=3D"color: #606;" class=3D"styled-by-prettify">Args</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">&gt;</span><span style=3D"" cla=
ss=3D"styled-by-prettify"><br class=3D""></span><span style=3D"color: #008;=
" class=3D"styled-by-prettify">class</span><span style=3D"" class=3D"styled=
-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">function</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">&lt;</span><span style=3D"" class=3D"styled-by-prettify">R</span><span s=
tyle=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"c=
olor: #606;" class=3D"styled-by-prettify">Args</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">...)&gt;</span><span style=3D"" class=
=3D"styled-by-prettify"><br class=3D"">&nbsp; </span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">...</span><span style=3D"" class=3D"sty=
led-by-prettify"><br class=3D"">&nbsp; </span><span style=3D"color: #008;" =
class=3D"styled-by-prettify">function</span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">(</span><span style=3D"" class=3D"styled-by-pret=
tify">R</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(*)=
(</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Args</spa=
n><span style=3D"color: #660;" class=3D"styled-by-prettify">...));</span><s=
pan style=3D"" class=3D"styled-by-prettify"><br class=3D"">&nbsp; </span><s=
pan style=3D"color: #008;" class=3D"styled-by-prettify">function</span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">&amp;</span><span sty=
le=3D"" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">operator</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">=3D(</span><span style=3D"" class=3D"styled-by-pr=
ettify">R</span><span style=3D"color: #660;" class=3D"styled-by-prettify">(=
*)(</span><span style=3D"color: #606;" class=3D"styled-by-prettify">Args</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">...));</span>=
<span style=3D"" class=3D"styled-by-prettify"> </span></div></code></div></=
div></div></blockquote></div><br class=3D""><div class=3D"">Interesting. Fa=
r as I see, this is orthogonal to and compatible with the existing construc=
tor overloads and their SFINAE.</div><div class=3D""><br class=3D""></div><=
div class=3D"">Turning overload sets into entities (e.g. by representing th=
em as generic lambda closures) might also solve the problem, though. I=E2=
=80=99ll try and find a proposal later if nobody else replies first.</div><=
div class=3D""><br class=3D""></div></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&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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--Apple-Mail=_925758E5-652B-44C6-8801-7D7B75831A3A--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Mon, 25 Jan 2016 07:54:25 +0100
Raw View
This is a multi-part message in MIME format.
--------------050401080207000700010005
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 25/01/2016 06:46, David Krauss a =C3=A9crit :
>
>> On 2016=E2=80=9301=E2=80=9325, at 10:40 AM, Lingxi Li <lilingxi.cs@gmail=
..com=20
>> <mailto:lilingxi.cs@gmail.com>> wrote:
>>
>> Current std::function does not disambiguate overloaded function. For=20
>> example,
>> the following code does not compile.
>>
>> |
>> voidfunc(int);
>> voidfunc(char);
>>
>> std::function<void(int)>f =3Dfunc;
>> |
>>
>> Users have to disambiguate themselves, with explicit casts for=20
>> example, which is
>> annoying. Since std::function is aware of the signature, it is=20
>> actually possible for it
>> to disambiguate automatically. So, I propose to add the following=20
>> two member
>> functions to std::function to enable this functionality:
>>
>> |
>> template<classR,class...Args>
>> classfunction<R(Args...)>
>> ...
>> function(R(*)(Args...));
>> function&operator=3D(R(*)(Args...));
>> |
>
> Interesting. Far as I see, this is orthogonal to and compatible with=20
> the existing constructor overloads and their SFINAE.
>
> Turning overload sets into entities (e.g. by representing them as=20
> generic lambda closures) might also solve the problem, though. I=E2=80=99=
ll=20
> try and find a proposal later if nobody else replies first.
>
>
P0119R0     Overload sets as function arguments

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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

--------------050401080207000700010005
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 25/01/2016 06:46, David Krauss a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote
      cite=3D"mid:B7AF9CD6-8B40-4071-AF33-2BC44B503539@gmail.com"
      type=3D"cite">
      <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf=
-8">
      <br class=3D"">
      <div>
        <blockquote type=3D"cite" class=3D"">
          <div class=3D"">On 2016=E2=80=9301=E2=80=9325, at 10:40 AM, Lingx=
i Li &lt;<a
              moz-do-not-send=3D"true" href=3D"mailto:lilingxi.cs@gmail.com=
"
              class=3D""><a class=3D"moz-txt-link-abbreviated" href=3D"mail=
to:lilingxi.cs@gmail.com">lilingxi.cs@gmail.com</a></a>&gt; wrote:</div>
          <br class=3D"Apple-interchange-newline">
          <div class=3D"">
            <div dir=3D"ltr" class=3D"">Current std::function does not
              disambiguate overloaded function. For example,<br class=3D"">
              the following code does not compile.<br class=3D"">
              <br class=3D"">
              <div class=3D"prettyprint" style=3D"border: 1px solid rgb(187=
,
                187, 187); word-wrap: break-word; background-color:
                rgb(250, 250, 250);"><code class=3D"prettyprint">
                  <div class=3D"subprettyprint"><span style=3D"color: #008;=
"
                      class=3D"styled-by-prettify">void</span><span
                      style=3D"" class=3D"styled-by-prettify"> func</span><=
span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">i=
nt</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">)=
;</span><span
                      style=3D"" class=3D"styled-by-prettify"><br class=3D"=
">
                    </span><span style=3D"color: #008;"
                      class=3D"styled-by-prettify">void</span><span
                      style=3D"" class=3D"styled-by-prettify"> func</span><=
span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">c=
har</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">)=
;</span><span
                      style=3D"" class=3D"styled-by-prettify"><br class=3D"=
">
                      <br class=3D"">
                      std</span><span style=3D"color: #660;"
                      class=3D"styled-by-prettify">::</span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">f=
unction</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">v=
oid</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">i=
nt</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">)=
&gt;</span><span
                      style=3D"" class=3D"styled-by-prettify"> f </span><sp=
an
                      style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D</span><span
                      style=3D"" class=3D"styled-by-prettify"> func</span><=
span
                      style=3D"color: #660;" class=3D"styled-by-prettify">;=
</span></div>
                </code></div>
              <br class=3D"">
              Users have to disambiguate themselves, with explicit casts
              for example,=C2=A0which is<br class=3D"">
              annoying. Since std::function is aware of the signature,
              it is actually=C2=A0possible for it<br class=3D"">
              to disambiguate automatically. So, I propose to add the
              following two=C2=A0member<br class=3D"">
              functions to std::function to enable this functionality:<br
                class=3D"">
              <br class=3D"">
              <div class=3D"prettyprint" style=3D"border: 1px solid rgb(187=
,
                187, 187); word-wrap: break-word; background-color:
                rgb(250, 250, 250);"><code class=3D"prettyprint">
                  <div class=3D"subprettyprint"><span style=3D"color: #008;=
"
                      class=3D"styled-by-prettify">template</span><span
                      style=3D"" class=3D"styled-by-prettify"> </span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">c=
lass</span><span
                      style=3D"" class=3D"styled-by-prettify"> R</span><spa=
n
                      style=3D"color: #660;" class=3D"styled-by-prettify">,=
</span><span
                      style=3D"" class=3D"styled-by-prettify"> </span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">c=
lass</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">.=
...</span><span
                      style=3D"" class=3D"styled-by-prettify"> </span><span
                      style=3D"color: #606;" class=3D"styled-by-prettify">A=
rgs</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">&=
gt;</span><span
                      style=3D"" class=3D"styled-by-prettify"><br class=3D"=
">
                    </span><span style=3D"color: #008;"
                      class=3D"styled-by-prettify">class</span><span
                      style=3D"" class=3D"styled-by-prettify"> </span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">f=
unction</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">&=
lt;</span><span
                      style=3D"" class=3D"styled-by-prettify">R</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span
                      style=3D"color: #606;" class=3D"styled-by-prettify">A=
rgs</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">.=
...)&gt;</span><span
                      style=3D"" class=3D"styled-by-prettify"><br class=3D"=
">
                      =C2=A0 </span><span style=3D"color: #660;"
                      class=3D"styled-by-prettify">...</span><span
                      style=3D"" class=3D"styled-by-prettify"><br class=3D"=
">
                      =C2=A0 </span><span style=3D"color: #008;"
                      class=3D"styled-by-prettify">function</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
</span><span
                      style=3D"" class=3D"styled-by-prettify">R</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
*)(</span><span
                      style=3D"color: #606;" class=3D"styled-by-prettify">A=
rgs</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">.=
...));</span><span
                      style=3D"" class=3D"styled-by-prettify"><br class=3D"=
">
                      =C2=A0 </span><span style=3D"color: #008;"
                      class=3D"styled-by-prettify">function</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">&=
amp;</span><span
                      style=3D"" class=3D"styled-by-prettify"> </span><span
                      style=3D"color: #008;" class=3D"styled-by-prettify">o=
perator</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">=
=3D(</span><span
                      style=3D"" class=3D"styled-by-prettify">R</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">(=
*)(</span><span
                      style=3D"color: #606;" class=3D"styled-by-prettify">A=
rgs</span><span
                      style=3D"color: #660;" class=3D"styled-by-prettify">.=
...));</span><span
                      style=3D"" class=3D"styled-by-prettify"> </span></div=
>
                </code></div>
            </div>
          </div>
        </blockquote>
      </div>
      <br class=3D"">
      <div class=3D"">Interesting. Far as I see, this is orthogonal to and
        compatible with the existing constructor overloads and their
        SFINAE.</div>
      <div class=3D""><br class=3D"">
      </div>
      <div class=3D"">Turning overload sets into entities (e.g. by
        representing them as generic lambda closures) might also solve
        the problem, though. I=E2=80=99ll try and find a proposal later if
        nobody else replies first.</div>
      <div class=3D""><br class=3D"">
      </div>
      <br>
    </blockquote>
    P0119R0 =C2=A0=C2=A0 =C2=A0Overload sets as function arguments<br>
    <br>
    Vicente
  </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&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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--------------050401080207000700010005--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Mon, 25 Jan 2016 07:37:55 -0800 (PST)
Raw View
------=_Part_396_133659535.1453736275806
Content-Type: multipart/alternative;
 boundary="----=_Part_397_438856164.1453736275806"

------=_Part_397_438856164.1453736275806
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Monday, January 25, 2016 at 1:54:22 AM UTC-5, Vicente J. Botet Escriba=
=20
wrote:
>
> Le 25/01/2016 06:46, David Krauss a =C3=A9crit :
>
>
> On 2016=E2=80=9301=E2=80=9325, at 10:40 AM, Lingxi Li < <javascript:>lili=
n...@gmail.com=20
> <javascript:>> wrote:
>
> Current std::function does not disambiguate overloaded function. For=20
> example,
> the following code does not compile.
>
> void func(int);
> void func(char);
>
> std::function<void(int)> f =3D func;
>
> Users have to disambiguate themselves, with explicit casts for=20
> example, which is
> annoying. Since std::function is aware of the signature, it is=20
> actually possible for it
> to disambiguate automatically. So, I propose to add the following=20
> two member
> functions to std::function to enable this functionality:
>
> template <class R, class... Args>
> class function<R(Args...)>
>   ...
>   function(R(*)(Args...));
>   function& operator=3D(R(*)(Args...));=20
>
>
> Interesting. Far as I see, this is orthogonal to and compatible with the=
=20
> existing constructor overloads and their SFINAE.
>
> Turning overload sets into entities (e.g. by representing them as generic=
=20
> lambda closures) might also solve the problem, though. I=E2=80=99ll try a=
nd find a=20
> proposal later if nobody else replies first.
>
>
> P0119R0     Overload sets as function arguments
>

What exactly happened with that proposal? Neither of the two=20
<https://isocpp.org/blog/2015/11/kona-standards-meeting-trip-report>=20
detailed trip reports=20
<https://botondballo.wordpress.com/2015/11/09/trip-report-c-standards-meeti=
ng-in-kona-october-2015/>=20
from Kona mention it. Did it progress at all? Did the committee reject it?=
=20
Was it even presented?

Also, did someone suggest the obvious addition of allowing *member=20
functions* as well (ie: the implicit lambda captures `this` if `f` refers=
=20
to a member function)? Because that seems curiously missing from the=20
proposal...

--=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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

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

<br><br>On Monday, January 25, 2016 at 1:54:22 AM UTC-5, Vicente J. Botet E=
scriba wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
 =20
   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    <div>Le 25/01/2016 06:46, David Krauss a
      =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <br>
      <div>
        <blockquote type=3D"cite">
          <div>On 2016=E2=80=9301=E2=80=9325, at 10:40 AM, Lingxi Li &lt;<a=
 href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"eHyN1-VqGQ=
AJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;;retur=
n true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;"></a><a =
href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"eHyN1-VqGQA=
J" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;;return=
 true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true;">lilin...=
@gmail.com</a>&gt; wrote:</div>
          <br>
          <div>
            <div dir=3D"ltr">Current std::function does not
              disambiguate overloaded function. For example,<br>
              the following code does not compile.<br>
              <br>
              <div style=3D"border:1px solid rgb(187,187,187);word-wrap:bre=
ak-word;background-color:rgb(250,250,250)"><code>
                  <div><span style=3D"color:#008">void</span><span> func</s=
pan><span style=3D"color:#660">(</span><span style=3D"color:#008">int</span=
><span style=3D"color:#660">);</span><span><br>
                    </span><span style=3D"color:#008">void</span><span> fun=
c</span><span style=3D"color:#660">(</span><span style=3D"color:#008">char<=
/span><span style=3D"color:#660">);</span><span><br>
                      <br>
                      std</span><span style=3D"color:#660">::</span><span s=
tyle=3D"color:#008">function</span><span style=3D"color:#660">&lt;</span><s=
pan style=3D"color:#008">void</span><span style=3D"color:#660">(</span><spa=
n style=3D"color:#008">int</span><span style=3D"color:#660">)&gt;</span><sp=
an> f </span><span style=3D"color:#660">=3D</span><span> func</span><span s=
tyle=3D"color:#660">;</span></div>
                </code></div>
              <br>
              Users have to disambiguate themselves, with explicit casts
              for example,=C2=A0which is<br>
              annoying. Since std::function is aware of the signature,
              it is actually=C2=A0possible for it<br>
              to disambiguate automatically. So, I propose to add the
              following two=C2=A0member<br>
              functions to std::function to enable this functionality:<br>
              <br>
              <div style=3D"border:1px solid rgb(187,187,187);word-wrap:bre=
ak-word;background-color:rgb(250,250,250)"><code>
                  <div><span style=3D"color:#008">template</span><span> </s=
pan><span style=3D"color:#660">&lt;</span><span style=3D"color:#008">class<=
/span><span> R</span><span style=3D"color:#660">,</span><span> </span><span=
 style=3D"color:#008">class</span><span style=3D"color:#660">...</span><spa=
n> </span><span style=3D"color:#606">Args</span><span style=3D"color:#660">=
&gt;</span><span><br>
                    </span><span style=3D"color:#008">class</span><span> </=
span><span style=3D"color:#008">function</span><span style=3D"color:#660">&=
lt;</span><span>R</span><span style=3D"color:#660">(</span><span style=3D"c=
olor:#606">Args</span><span style=3D"color:#660">...)&gt;</span><span><br>
                      =C2=A0 </span><span style=3D"color:#660">...</span><s=
pan><br>
                      =C2=A0 </span><span style=3D"color:#008">function</sp=
an><span style=3D"color:#660">(</span><span>R</span><span style=3D"color:#6=
60">(*)(</span><span style=3D"color:#606">Args</span><span style=3D"color:#=
660">...));</span><span><br>
                      =C2=A0 </span><span style=3D"color:#008">function</sp=
an><span style=3D"color:#660">&amp;</span><span> </span><span style=3D"colo=
r:#008">operator</span><span style=3D"color:#660">=3D(</span><span>R</span>=
<span style=3D"color:#660">(*)(</span><span style=3D"color:#606">Args</span=
><span style=3D"color:#660">...));</span><span> </span></div>
                </code></div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <div>Interesting. Far as I see, this is orthogonal to and
        compatible with the existing constructor overloads and their
        SFINAE.</div>
      <div><br>
      </div>
      <div>Turning overload sets into entities (e.g. by
        representing them as generic lambda closures) might also solve
        the problem, though. I=E2=80=99ll try and find a proposal later if
        nobody else replies first.</div>
      <div><br>
      </div>
      <br>
    </blockquote>
    P0119R0 =C2=A0=C2=A0 =C2=A0Overload sets as function arguments</div></b=
lockquote><div><br>What exactly happened with that proposal? Neither of the=
 <a href=3D"https://isocpp.org/blog/2015/11/kona-standards-meeting-trip-rep=
ort">two</a> detailed <a href=3D"https://botondballo.wordpress.com/2015/11/=
09/trip-report-c-standards-meeting-in-kona-october-2015/">trip reports</a> =
from Kona mention it. Did it progress at all? Did the committee reject it? =
Was it even presented?<br><br>Also, did someone suggest the obvious additio=
n of allowing <i>member functions</i> as well (ie: the implicit lambda capt=
ures `this` if `f` refers to a member function)? Because that seems curious=
ly missing from the proposal...<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&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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

------=_Part_397_438856164.1453736275806--
------=_Part_396_133659535.1453736275806--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 25 Jan 2016 23:58:20 +0800
Raw View
--Apple-Mail=_2E60668E-4E66-4EC6-B407-4900A55CF407
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


> On 2016=E2=80=9301=E2=80=9325, at 11:37 PM, Nicol Bolas <jmckesson@gmail.=
com> wrote:
>=20
> What exactly happened with that proposal? Neither of the two <https://iso=
cpp.org/blog/2015/11/kona-standards-meeting-trip-report> detailed trip repo=
rts <https://botondballo.wordpress.com/2015/11/09/trip-report-c-standards-m=
eeting-in-kona-october-2015/> from Kona mention it. Did it progress at all?=
 Did the committee reject it? Was it even presented?

It was postponed due to lack of time :( .

> Also, did someone suggest the obvious addition of allowing member functio=
ns as well (ie: the implicit lambda captures `this` if `f` refers to a memb=
er function)? Because that seems curiously missing from the proposal=E2=80=
=A6

That seems like a can of worms.

P0119R0 <http://wg21.link/P0119R0> mentions a prior proposal N3617 <http://=
wg21.link/N3617> with syntax like [] fn. I think it would be nice to have b=
oth. [this] fn would explicitly capture a member overload set, [&] fn would=
 always pass a lambda (even with one overload), and for symmetry, + fn idio=
matically passes a function pointer and never a lambda.

--=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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

--Apple-Mail=_2E60668E-4E66-4EC6-B407-4900A55CF407
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;" class=3D""><br class=3D""><di=
v><blockquote type=3D"cite" class=3D""><div class=3D"">On 2016=E2=80=9301=
=E2=80=9325, at 11:37 PM, Nicol Bolas &lt;<a href=3D"mailto:jmckesson@gmail=
..com" class=3D"">jmckesson@gmail.com</a>&gt; wrote:</div><br class=3D"Apple=
-interchange-newline"><div class=3D"">What exactly happened with that propo=
sal? Neither of the <a href=3D"https://isocpp.org/blog/2015/11/kona-standar=
ds-meeting-trip-report" class=3D"">two</a> detailed <a href=3D"https://boto=
ndballo.wordpress.com/2015/11/09/trip-report-c-standards-meeting-in-kona-oc=
tober-2015/" class=3D"">trip reports</a> from Kona mention it. Did it progr=
ess at all? Did the committee reject it? Was it even presented?</div></bloc=
kquote><div><br class=3D""></div><div>It was postponed due to lack of time =
:( .</div><br class=3D""><blockquote type=3D"cite" class=3D""><div class=3D=
""><div class=3D"">Also, did someone suggest the obvious addition of allowi=
ng <i class=3D"">member functions</i> as well (ie: the implicit lambda capt=
ures `this` if `f` refers to a member function)? Because that seems curious=
ly missing from the proposal=E2=80=A6</div></div></blockquote><br class=3D"=
"></div><div>That seems like a can of worms.</div><br class=3D""><div class=
=3D""><a href=3D"http://wg21.link/P0119R0" class=3D"">P0119R0</a>&nbsp;ment=
ions a prior proposal&nbsp;<a href=3D"http://wg21.link/N3617" class=3D"">N3=
617</a>&nbsp;with syntax like <font face=3D"Courier" class=3D"">[] fn</font=
>. I think it would be nice to have both.&nbsp;<font face=3D"Courier" class=
=3D"">[this] fn</font>&nbsp;would explicitly capture a member overload set,=
 <font face=3D"Courier" class=3D"">[&amp;] fn</font> would always pass a la=
mbda (even with one overload), and for symmetry, <font face=3D"Courier" cla=
ss=3D"">+ fn</font> idiomatically passes a function pointer and never a lam=
bda.</div><div class=3D""><br class=3D""></div></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&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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--Apple-Mail=_2E60668E-4E66-4EC6-B407-4900A55CF407--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Mon, 25 Jan 2016 08:52:33 -0800 (PST)
Raw View
------=_Part_461_650294978.1453740753243
Content-Type: multipart/alternative;
 boundary="----=_Part_462_1139905179.1453740753243"

------=_Part_462_1139905179.1453740753243
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Monday, January 25, 2016 at 10:58:30 AM UTC-5, David Krauss wrote:
>
> On 2016=E2=80=9301=E2=80=9325, at 11:37 PM, Nicol Bolas <jmck...@gmail.co=
m <javascript:>>=20
> wrote:
>
> What exactly happened with that proposal? Neither of the two=20
> <https://isocpp.org/blog/2015/11/kona-standards-meeting-trip-report>=20
> detailed trip reports=20
> <https://botondballo.wordpress.com/2015/11/09/trip-report-c-standards-mee=
ting-in-kona-october-2015/>=20
> from Kona mention it. Did it progress at all? Did the committee reject it=
?=20
> Was it even presented?
>
> It was postponed due to lack of time :( .
>
> Also, did someone suggest the obvious addition of allowing *member=20
> functions* as well (ie: the implicit lambda captures `this` if `f` refers=
=20
> to a member function)? Because that seems curiously missing from the=20
> proposal=E2=80=A6
>
>
> That seems like a can of worms.
>

Worms they may be, but it's a very important can to open. Not everybody=20
uses free functions, after all.
=20

> P0119R0 <http://wg21.link/P0119R0> mentions a prior proposal N3617=20
> <http://wg21.link/N3617> with syntax like [] fn. I think it would be nice=
=20
> to have both. [this] fn would explicitly capture a member overload set, [=
&]=20
> fn would always pass a lambda (even with one overload), and for symmetry,=
 +=20
> fn idiomatically passes a function pointer and never a lambda.
>

I'm not picky about the form, as long as it works.

And actually, as an expansion to that, you might even want `[]ClassName` to=
=20
mean an overload set of constructors, with the newly created object being=
=20
returned. This would be especially nifty with the new elision syntax.

--=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 https://groups.google.com/a/isocpp.org/group/std-propos=
als/.

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

On Monday, January 25, 2016 at 10:58:30 AM UTC-5, David Krauss wrote:<block=
quote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-le=
ft: 1px #ccc solid;padding-left: 1ex;"><div style=3D"word-wrap:break-word">=
<div><blockquote type=3D"cite"><div>On 2016=E2=80=9301=E2=80=9325, at 11:37=
 PM, Nicol Bolas &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscat=
ed-mailto=3D"zU54apeIGQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39=
;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39=
;;return true;">jmck...@gmail.com</a>&gt; wrote:</div><br><div>What exactly=
 happened with that proposal? Neither of the <a href=3D"https://isocpp.org/=
blog/2015/11/kona-standards-meeting-trip-report" target=3D"_blank" rel=3D"n=
ofollow" onmousedown=3D"this.href=3D&#39;https://www.google.com/url?q\75htt=
ps%3A%2F%2Fisocpp.org%2Fblog%2F2015%2F11%2Fkona-standards-meeting-trip-repo=
rt\46sa\75D\46sntz\0751\46usg\75AFQjCNEqYLuQO11BCv_AYTNRcsyrE0KXnQ&#39;;ret=
urn true;" onclick=3D"this.href=3D&#39;https://www.google.com/url?q\75https=
%3A%2F%2Fisocpp.org%2Fblog%2F2015%2F11%2Fkona-standards-meeting-trip-report=
\46sa\75D\46sntz\0751\46usg\75AFQjCNEqYLuQO11BCv_AYTNRcsyrE0KXnQ&#39;;retur=
n true;">two</a> detailed <a href=3D"https://botondballo.wordpress.com/2015=
/11/09/trip-report-c-standards-meeting-in-kona-october-2015/" target=3D"_bl=
ank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://www.google.co=
m/url?q\75https%3A%2F%2Fbotondballo.wordpress.com%2F2015%2F11%2F09%2Ftrip-r=
eport-c-standards-meeting-in-kona-october-2015%2F\46sa\75D\46sntz\0751\46us=
g\75AFQjCNH0fDsHBDmgIXlDvga9RNUVFObifw&#39;;return true;" onclick=3D"this.h=
ref=3D&#39;https://www.google.com/url?q\75https%3A%2F%2Fbotondballo.wordpre=
ss.com%2F2015%2F11%2F09%2Ftrip-report-c-standards-meeting-in-kona-october-2=
015%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNH0fDsHBDmgIXlDvga9RNUVFObifw&#39;=
;return true;">trip reports</a> from Kona mention it. Did it progress at al=
l? Did the committee reject it? Was it even presented?</div></blockquote><d=
iv></div><div>It was postponed due to lack of time :( .</div><br><blockquot=
e type=3D"cite"><div><div>Also, did someone suggest the obvious addition of=
 allowing <i>member functions</i> as well (ie: the implicit lambda captures=
 `this` if `f` refers to a member function)? Because that seems curiously m=
issing from the proposal=E2=80=A6</div></div></blockquote><br></div><div>Th=
at seems like a can of worms.</div></div></blockquote><div><br>Worms they m=
ay be, but it&#39;s a very important can to open. Not everybody uses free f=
unctions, after all.<br>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><div style=3D"word-wrap:break-word"><div><a href=3D"http://wg21.link/=
P0119R0" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39=
;http://www.google.com/url?q\75http%3A%2F%2Fwg21.link%2FP0119R0\46sa\75D\46=
sntz\0751\46usg\75AFQjCNHrfjyXJ6cLd74M_c7HH3jTSN_sgw&#39;;return true;" onc=
lick=3D"this.href=3D&#39;http://www.google.com/url?q\75http%3A%2F%2Fwg21.li=
nk%2FP0119R0\46sa\75D\46sntz\0751\46usg\75AFQjCNHrfjyXJ6cLd74M_c7HH3jTSN_sg=
w&#39;;return true;">P0119R0</a>=C2=A0mentions a prior proposal=C2=A0<a hre=
f=3D"http://wg21.link/N3617" target=3D"_blank" rel=3D"nofollow" onmousedown=
=3D"this.href=3D&#39;http://www.google.com/url?q\75http%3A%2F%2Fwg21.link%2=
FN3617\46sa\75D\46sntz\0751\46usg\75AFQjCNEin3SLzig0Z9YxSFvP90LJkqx_rg&#39;=
;return true;" onclick=3D"this.href=3D&#39;http://www.google.com/url?q\75ht=
tp%3A%2F%2Fwg21.link%2FN3617\46sa\75D\46sntz\0751\46usg\75AFQjCNEin3SLzig0Z=
9YxSFvP90LJkqx_rg&#39;;return true;">N3617</a>=C2=A0with syntax like <font =
face=3D"Courier">[] fn</font>. I think it would be nice to have both.=C2=A0=
<font face=3D"Courier">[this] fn</font>=C2=A0would explicitly capture a mem=
ber overload set, <font face=3D"Courier">[&amp;] fn</font> would always pas=
s a lambda (even with one overload), and for symmetry, <font face=3D"Courie=
r">+ fn</font> idiomatically passes a function pointer and never a lambda.<=
/div></div></blockquote><div><br>I&#39;m not picky about the form, as long =
as it works.<br><br>And actually, as an expansion to that, you might even w=
ant `[]ClassName` to mean an overload set of constructors, with the newly c=
reated object being returned. This would be especially nifty with the new e=
lision syntax.<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&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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

------=_Part_462_1139905179.1453740753243--
------=_Part_461_650294978.1453740753243--

.