Topic: Extend algorithms to take member pointers as functions?
Author: Justin Bassett <jbassett271@gmail.com>
Date: Tue, 27 Jun 2017 22:08:07 -0700 (PDT)
Raw View
------=_Part_63_396713286.1498626487408
Content-Type: multipart/alternative;
boundary="----=_Part_64_1377310688.1498626487408"
------=_Part_64_1377310688.1498626487408
Content-Type: text/plain; charset="UTF-8"
C++17 added std::invoke, which allows invoking pointers to member functions
and function objects with the same syntax. Pointers to data members can
also be invoked as if they were unary functions. This could be added to the
standard algorithms.
Basically, every place where a standard algorithm takes a callable f and
invokes it as f(args, ...), we could replace that with std::invoke(f, args,
....) (or we could use the magic syntax in the specification: INVOKE(f,
args, ...), but it means the same thing).
This would ease the use of the standard algorithms slightly.
For example:
std::vector<MyDataType> vector = someFunctionReturningMyDataType();
std::vector<int> outputVector(vector.size());
std::transform(std::begin(vector), std::end(vector), std::begin(outputVector
), &MyDataType::some_int);
I find this easier to read and type than
std::transform(std::begin(vector), std::end(vector), std::begin(outputVector
), [](auto const& it) { return it.some_int(); });
This would be solved by Universal Function Call Syntax (UFCS) if UFCS were
to be equivalent to std::invoke (basically make f(args, ...) be as if you
wrote std::invoke(f, args, ...)), but the proposal I saw
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf> does
not do this.
--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/befe3aeb-aa8d-47c9-bb0c-fc8397914b1e%40isocpp.org.
------=_Part_64_1377310688.1498626487408
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">C++17 added <font face=3D"courier new, monospace">std::inv=
oke</font><font face=3D"arial, sans-serif">,=C2=A0which allows invoking poi=
nters to member functions and function objects with the same syntax. Pointe=
rs to data members can also be invoked as if they were unary functions. Thi=
s could be added to the standard algorithms.</font><br><div><font face=3D"a=
rial, sans-serif"><br></font></div><div><font face=3D"arial, sans-serif">Ba=
sically, every place where a standard algorithm takes a callable </font><fo=
nt face=3D"courier new, monospace">f</font><font face=3D"arial, sans-serif"=
> and invokes it as </font><font face=3D"courier new, monospace">f(args, ..=
..)</font><font face=3D"arial, sans-serif">, we could replace that with </fo=
nt><font face=3D"courier new, monospace">std::invoke(f, args, ...)</font><f=
ont face=3D"arial, sans-serif"> (or we could use the magic syntax in the sp=
ecification: </font><font face=3D"courier new, monospace">INVOKE(f, args, .=
...)</font><font face=3D"arial, sans-serif">, but it means the same thing).<=
/font></div><div><font face=3D"arial, sans-serif"><br></font></div><div><fo=
nt face=3D"arial, sans-serif">This would ease the use of the standard algor=
ithms slightly.</font></div><div><font face=3D"arial, sans-serif"><br></fon=
t></div><div><font face=3D"arial, sans-serif">For example:</font></div><div=
><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"arial=
, sans-serif"><div class=3D"prettyprint" style=3D"background-color: rgb(250=
, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-=
width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=
=3D"subprettyprint"><span style=3D"color: #000;" class=3D"styled-by-prettif=
y">std</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify">vector</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify"><</span><span=
style=3D"color: #606;" class=3D"styled-by-prettify">MyDataType</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">></span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> vector </span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">=3D</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> someFunctionReturningMyDataType</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">();</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"><br>std</span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D=
"color: #000;" class=3D"styled-by-prettify">vector</span><span style=3D"col=
or: #080;" class=3D"styled-by-prettify"><int></span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> outputVector</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">vector</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">.</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify">size</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">());</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"><br>std</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">::</span><span style=3D"color: #000;" class=3D"styled-by-prettify"=
>transform</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">std</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">begin</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify">vector</span><span style=3D"color: #6=
60;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" cla=
ss=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">::</span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">end</span><span style=3D"color: #660;" class=3D"styled-by-prett=
ify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">vect=
or</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</span=
><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</span><span=
style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">begin</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify">outputVector</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&</span><span style=3D"color: #606;" class=3D"styled-=
by-prettify">MyDataType</span><span style=3D"color: #660;" class=3D"styled-=
by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify">some_int</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">);</span></div></code></div><br></font></div><div><font face=3D"arial, s=
ans-serif">I find this easier to read and type than</font></div><div><font =
face=3D"arial, sans-serif"><br></font></div><div><font face=3D"arial, sans-=
serif"><div class=3D"prettyprint" style=3D"background-color: rgb(250, 250, =
250); border-color: rgb(187, 187, 187); border-style: solid; border-width: =
1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subp=
rettyprint"><font color=3D"#660066"><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">std</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">transform</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">std</s=
pan><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><spa=
n style=3D"color: #008;" class=3D"styled-by-prettify">begin</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify">vector</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" c=
lass=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" class=
=3D"styled-by-prettify">::</span><span style=3D"color: #008;" class=3D"styl=
ed-by-prettify">end</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">(</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
vector</span><span style=3D"color: #660;" class=3D"styled-by-prettify">),</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><span sty=
le=3D"color: #008;" class=3D"styled-by-prettify">begin</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify">outputVector</span><span style=3D"color:=
#660;" class=3D"styled-by-prettify">),</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">[](</span><span style=3D"color: #008;" class=3D"styled-=
by-prettify">auto</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">co=
nst</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> it</span><s=
pan style=3D"color: #660;" class=3D"styled-by-prettify">)</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">{</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"=
styled-by-prettify">return</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"> it</span><span style=3D"color: #660;" class=3D"styled-by-p=
rettify">.</span><span style=3D"color: #000;" class=3D"styled-by-prettify">=
some_int</span><span style=3D"color: #660;" class=3D"styled-by-prettify">()=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><=
span style=3D"color: #660;" class=3D"styled-by-prettify">});</span></font><=
/div></code></div><div><font face=3D"arial, sans-serif"><br></font></div>Th=
is would be solved by Universal Function Call Syntax (UFCS) if UFCS were to=
be equivalent to </font><font face=3D"courier new, monospace">std::invoke<=
/font><font face=3D"arial, sans-serif">=C2=A0(basically make </font><font f=
ace=3D"courier new, monospace">f(args, ...)</font><font face=3D"arial, sans=
-serif"> be as if you wrote </font><font face=3D"courier new, monospace">st=
d::invoke(f, args, ...)</font><font face=3D"arial, sans-serif">), but the <=
a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf=
">proposal I saw</a> does not do this.<br><br></font></div></div>
<p></p>
-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/befe3aeb-aa8d-47c9-bb0c-fc8397914b1e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/befe3aeb-aa8d-47c9-bb0c-fc8397914b1e=
%40isocpp.org</a>.<br />
------=_Part_64_1377310688.1498626487408--
------=_Part_63_396713286.1498626487408--
.
Author: gmisocpp@gmail.com
Date: Tue, 27 Jun 2017 22:36:19 -0700 (PDT)
Raw View
------=_Part_2571_1758782260.1498628179504
Content-Type: multipart/alternative;
boundary="----=_Part_2572_1258826826.1498628179504"
------=_Part_2572_1258826826.1498628179504
Content-Type: text/plain; charset="UTF-8"
Isn't this what you want?
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html
On Wednesday, June 28, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:
> C++17 added std::invoke, which allows invoking pointers to member
> functions and function objects with the same syntax. Pointers to data
> members can also be invoked as if they were unary functions. This could be
> added to the standard algorithms.
>
> Basically, every place where a standard algorithm takes a callable f and
> invokes it as f(args, ...), we could replace that with std::invoke(f,
> args, ...) (or we could use the magic syntax in the specification: INVOKE(f,
> args, ...), but it means the same thing).
>
> This would ease the use of the standard algorithms slightly.
>
> For example:
>
> std::vector<MyDataType> vector = someFunctionReturningMyDataType();
> std::vector<int> outputVector(vector.size());
> std::transform(std::begin(vector), std::end(vector), std::begin(
> outputVector), &MyDataType::some_int);
>
> I find this easier to read and type than
>
> std::transform(std::begin(vector), std::end(vector), std::begin(
> outputVector), [](auto const& it) { return it.some_int(); });
>
> This would be solved by Universal Function Call Syntax (UFCS) if UFCS were
> to be equivalent to std::invoke (basically make f(args, ...) be as if you
> wrote std::invoke(f, args, ...)), but the proposal I saw
> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf> does
> not do this.
>
>
--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/f5d3912c-76ed-462d-9f55-d911bf4dce4a%40isocpp.org.
------=_Part_2572_1258826826.1498628179504
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Isn't this what you want?</div><div><a href=3D"ht=
tp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html">http://=
www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html</a><br><br>On=
Wednesday, June 28, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:</div>=
<blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; paddi=
ng-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px=
; border-left-style: solid;"><div dir=3D"ltr">C++17 added <font face=3D"cou=
rier new, monospace">std::invoke</font><font face=3D"arial, sans-serif">,=
=C2=A0which allows invoking pointers to member functions and function objec=
ts with the same syntax. Pointers to data members can also be invoked as if=
they were unary functions. This could be added to the standard algorithms.=
</font><br><div><font face=3D"arial, sans-serif"><br></font></div><div><fon=
t face=3D"arial, sans-serif">Basically, every place where a standard algori=
thm takes a callable </font><font face=3D"courier new, monospace">f</font><=
font face=3D"arial, sans-serif"> and invokes it as </font><font face=3D"cou=
rier new, monospace">f(args, ...)</font><font face=3D"arial, sans-serif">, =
we could replace that with </font><font face=3D"courier new, monospace">std=
::invoke(f, args, ...)</font><font face=3D"arial, sans-serif"> (or we could=
use the magic syntax in the specification: </font><font face=3D"courier ne=
w, monospace">INVOKE(f, args, ...)</font><font face=3D"arial, sans-serif">,=
but it means the same thing).</font></div><div><font face=3D"arial, sans-s=
erif"><br></font></div><div><font face=3D"arial, sans-serif">This would eas=
e the use of the standard algorithms slightly.</font></div><div><font face=
=3D"arial, sans-serif"><br></font></div><div><font face=3D"arial, sans-seri=
f">For example:</font></div><div><font face=3D"arial, sans-serif"><br></fon=
t></div><div><font face=3D"arial, sans-serif"><div style=3D"border: 1px sol=
id rgb(187, 187, 187); border-image: none; -ms-word-wrap: break-word; backg=
round-color: rgb(250, 250, 250);"><code><div><span style=3D"color: rgb(0, 0=
, 0);">std</span><span style=3D"color: rgb(102, 102, 0);">::</span><span st=
yle=3D"color: rgb(0, 0, 0);">vector</span><span style=3D"color: rgb(102, 10=
2, 0);"><</span><span style=3D"color: rgb(102, 0, 102);">MyDataType</spa=
n><span style=3D"color: rgb(102, 102, 0);">></span><span style=3D"color:=
rgb(0, 0, 0);"> vector </span><span style=3D"color: rgb(102, 102, 0);">=3D=
</span><span style=3D"color: rgb(0, 0, 0);"> someFunctionReturningMyDataTyp=
<wbr>e</span><span style=3D"color: rgb(102, 102, 0);">();</span><span style=
=3D"color: rgb(0, 0, 0);"><br>std</span><span style=3D"color: rgb(102, 102,=
0);">::</span><span style=3D"color: rgb(0, 0, 0);">vector</span><span styl=
e=3D"color: rgb(0, 136, 0);"><int></span><span style=3D"color: rgb(0,=
0, 0);"> outputVector</span><span style=3D"color: rgb(102, 102, 0);">(</sp=
an><span style=3D"color: rgb(0, 0, 0);">vector</span><span style=3D"color: =
rgb(102, 102, 0);">.</span><span style=3D"color: rgb(0, 0, 0);">size</span>=
<span style=3D"color: rgb(102, 102, 0);">());</span><span style=3D"color: r=
gb(0, 0, 0);"><br>std</span><span style=3D"color: rgb(102, 102, 0);">::</sp=
an><span style=3D"color: rgb(0, 0, 0);">transform</span><span style=3D"colo=
r: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0);">std</spa=
n><span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color: r=
gb(0, 0, 136);">begin</span><span style=3D"color: rgb(102, 102, 0);">(</spa=
n><span style=3D"color: rgb(0, 0, 0);">vect<wbr>or</span><span style=3D"col=
or: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);"> std</=
span><span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color=
: rgb(0, 0, 136);">end</span><span style=3D"color: rgb(102, 102, 0);">(</sp=
an><span style=3D"color: rgb(0, 0, 0);">vector</span><span style=3D"color: =
rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);"> std</span=
><span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color: rg=
b(0, 0, 136);">begin</span><span style=3D"color: rgb(102, 102, 0);">(</span=
><span style=3D"color: rgb(0, 0, 0);">outputVector</span><span style=3D"col=
or: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);"> </spa=
n><span style=3D"color: rgb(102, 102, 0);">&</span><span style=3D"color=
: rgb(102, 0, 102);">MyDataType</span><span style=3D"color: rgb(102, 102, 0=
);">::</span><span style=3D"color: rgb(0, 0, 0);">some_int</span><span styl=
e=3D"color: rgb(102, 102, 0);">);</span></div></code></div><br></font></div=
><div><font face=3D"arial, sans-serif">I find this easier to read and type =
than</font></div><div><font face=3D"arial, sans-serif"><br></font></div><di=
v><font face=3D"arial, sans-serif"><div style=3D"border: 1px solid rgb(187,=
187, 187); border-image: none; -ms-word-wrap: break-word; background-color=
: rgb(250, 250, 250);"><code><div><font color=3D"#660066"><span style=3D"co=
lor: rgb(0, 0, 0);">std</span><span style=3D"color: rgb(102, 102, 0);">::</=
span><span style=3D"color: rgb(0, 0, 0);">transform</span><span style=3D"co=
lor: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0);">std</s=
pan><span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color:=
rgb(0, 0, 136);">begin</span><span style=3D"color: rgb(102, 102, 0);">(</s=
pan><span style=3D"color: rgb(0, 0, 0);">vect<wbr>or</span><span style=3D"c=
olor: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);"> std=
</span><span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"col=
or: rgb(0, 0, 136);">end</span><span style=3D"color: rgb(102, 102, 0);">(</=
span><span style=3D"color: rgb(0, 0, 0);">vector</span><span style=3D"color=
: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);"> std</sp=
an><span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color: =
rgb(0, 0, 136);">begin</span><span style=3D"color: rgb(102, 102, 0);">(</sp=
an><span style=3D"color: rgb(0, 0, 0);">outputVector</span><span style=3D"c=
olor: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);"> </s=
pan><span style=3D"color: rgb(102, 102, 0);">[](</span><span style=3D"color=
: rgb(0, 0, 136);">auto</span><span style=3D"color: rgb(0, 0, 0);"> </span>=
<span style=3D"color: rgb(0, 0, 136);">const</span><span style=3D"color: rg=
b(102, 102, 0);">&</span><span style=3D"color: rgb(0, 0, 0);"> it</span=
><span style=3D"color: rgb(102, 102, 0);">)</span><span style=3D"color: rgb=
(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">{</span><span =
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(0, 0, 136)=
;">return</span><span style=3D"color: rgb(0, 0, 0);"> it</span><span style=
=3D"color: rgb(102, 102, 0);">.</span><span style=3D"color: rgb(0, 0, 0);">=
some_int</span><span style=3D"color: rgb(102, 102, 0);">();</span><span sty=
le=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);=
">});</span></font></div></code></div><div><font face=3D"arial, sans-serif"=
><br></font></div>This would be solved by Universal Function Call Syntax (U=
FCS) if UFCS were to be equivalent to </font><font face=3D"courier new, mon=
ospace">std::invoke</font><font face=3D"arial, sans-serif">=C2=A0(basically=
make </font><font face=3D"courier new, monospace">f(args, ...)</font><font=
face=3D"arial, sans-serif"> be as if you wrote </font><font face=3D"courie=
r new, monospace">std::invoke(f, args, ...)</font><font face=3D"arial, sans=
-serif">), but the <a onmousedown=3D"this.href=3D'http://www.google.com=
/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpaper=
s%2F2014%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkJMV_PrQigQyY=
iudR49Ler99jVw';return true;" onclick=3D"this.href=3D'http://www.go=
ogle.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs=
%2Fpapers%2F2014%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkJMV_=
PrQigQyYiudR49Ler99jVw';return true;" href=3D"http://www.open-std.org/j=
tc1/sc22/wg21/docs/papers/2014/n4174.pdf" target=3D"_blank" rel=3D"nofollow=
">proposal I saw</a> does not do this.<br><br></font></div></div></blockquo=
te></div>
<p></p>
-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/f5d3912c-76ed-462d-9f55-d911bf4dce4a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/f5d3912c-76ed-462d-9f55-d911bf4dce4a=
%40isocpp.org</a>.<br />
------=_Part_2572_1258826826.1498628179504--
------=_Part_2571_1758782260.1498628179504--
.
Author: Justin Bassett <jbassett271@gmail.com>
Date: Tue, 27 Jun 2017 22:41:34 -0700 (PDT)
Raw View
------=_Part_2613_1747082405.1498628494510
Content-Type: multipart/alternative;
boundary="----=_Part_2614_1274044774.1498628494511"
------=_Part_2614_1274044774.1498628494511
Content-Type: text/plain; charset="UTF-8"
Yes, that would completely handle this case. The only advantage to this is
that that proposal changes the language, whereas this would only require
changing the standard library.
On Tuesday, June 27, 2017 at 10:36:19 PM UTC-7, gmis...@gmail.com wrote:
>
> Isn't this what you want?
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html
>
> On Wednesday, June 28, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:
>
>> C++17 added std::invoke, which allows invoking pointers to member
>> functions and function objects with the same syntax. Pointers to data
>> members can also be invoked as if they were unary functions. This could be
>> added to the standard algorithms.
>>
>> Basically, every place where a standard algorithm takes a callable f and
>> invokes it as f(args, ...), we could replace that with std::invoke(f,
>> args, ...) (or we could use the magic syntax in the specification: INVOKE(f,
>> args, ...), but it means the same thing).
>>
>> This would ease the use of the standard algorithms slightly.
>>
>> For example:
>>
>> std::vector<MyDataType> vector = someFunctionReturningMyDataType();
>> std::vector<int> outputVector(vector.size());
>> std::transform(std::begin(vector), std::end(vector), std::begin(
>> outputVector), &MyDataType::some_int);
>>
>> I find this easier to read and type than
>>
>> std::transform(std::begin(vector), std::end(vector), std::begin(
>> outputVector), [](auto const& it) { return it.some_int(); });
>>
>> This would be solved by Universal Function Call Syntax (UFCS) if UFCS
>> were to be equivalent to std::invoke (basically make f(args, ...) be as
>> if you wrote std::invoke(f, args, ...)), but the proposal I saw
>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf> does
>> not do this.
>>
>>
--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/66c052f5-75eb-4471-be08-8c42894e0df6%40isocpp.org.
------=_Part_2614_1274044774.1498628494511
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Yes, that would completely handle this case. The only adva=
ntage to this is that that proposal changes the language, whereas this woul=
d only require changing the standard library.<br><br>On Tuesday, June 27, 2=
017 at 10:36:19 PM UTC-7, gmis...@gmail.com wrote:<blockquote class=3D"gmai=
l_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;=
padding-left: 1ex;"><div dir=3D"ltr"><div>Isn't this what you want?</di=
v><div><a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p=
0312r1.html" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D=
'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2F=
sc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fp0312r1.html\x26sa\x3dD\x26sntz\x3d1\x=
26usg\x3dAFQjCNGKq4ARWOJv5GERNRlrOwEOZzbEgQ';return true;" onclick=3D"t=
his.href=3D'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.or=
g%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fp0312r1.html\x26sa\x3dD\x26=
sntz\x3d1\x26usg\x3dAFQjCNGKq4ARWOJv5GERNRlrOwEOZzbEgQ';return true;">h=
ttp://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/papers/2017/<wbr>p0312r1.ht=
ml</a><br><br>On Wednesday, June 28, 2017 at 5:08:07 PM UTC+12, Justin Bass=
ett wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0=
px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-wi=
dth:1px;border-left-style:solid"><div dir=3D"ltr">C++17 added <font face=3D=
"courier new, monospace">std::invoke</font><font face=3D"arial, sans-serif"=
>,=C2=A0which allows invoking pointers to member functions and function obj=
ects with the same syntax. Pointers to data members can also be invoked as =
if they were unary functions. This could be added to the standard algorithm=
s.</font><br><div><font face=3D"arial, sans-serif"><br></font></div><div><f=
ont face=3D"arial, sans-serif">Basically, every place where a standard algo=
rithm takes a callable </font><font face=3D"courier new, monospace">f</font=
><font face=3D"arial, sans-serif"> and invokes it as </font><font face=3D"c=
ourier new, monospace">f(args, ...)</font><font face=3D"arial, sans-serif">=
, we could replace that with </font><font face=3D"courier new, monospace">s=
td::invoke(f, args, ...)</font><font face=3D"arial, sans-serif"> (or we cou=
ld use the magic syntax in the specification: </font><font face=3D"courier =
new, monospace">INVOKE(f, args, ...)</font><font face=3D"arial, sans-serif"=
>, but it means the same thing).</font></div><div><font face=3D"arial, sans=
-serif"><br></font></div><div><font face=3D"arial, sans-serif">This would e=
ase the use of the standard algorithms slightly.</font></div><div><font fac=
e=3D"arial, sans-serif"><br></font></div><div><font face=3D"arial, sans-ser=
if">For example:</font></div><div><font face=3D"arial, sans-serif"><br></fo=
nt></div><div><font face=3D"arial, sans-serif"><div style=3D"border:1px sol=
id rgb(187,187,187);background-color:rgb(250,250,250)"><code><div><span sty=
le=3D"color:rgb(0,0,0)">std</span><span style=3D"color:rgb(102,102,0)">::</=
span><span style=3D"color:rgb(0,0,0)">vector</span><span style=3D"color:rgb=
(102,102,0)"><</span><span style=3D"color:rgb(102,0,102)">MyDataType</sp=
an><span style=3D"color:rgb(102,102,0)">></span><span style=3D"color:rgb=
(0,0,0)"> vector </span><span style=3D"color:rgb(102,102,0)">=3D</span><spa=
n style=3D"color:rgb(0,0,0)"> someFunctionReturningMyDataTyp<wbr>e</span><s=
pan style=3D"color:rgb(102,102,0)">();</span><span style=3D"color:rgb(0,0,0=
)"><br>std</span><span style=3D"color:rgb(102,102,0)">::</span><span style=
=3D"color:rgb(0,0,0)">vector</span><span style=3D"color:rgb(0,136,0)"><i=
nt></span><span style=3D"color:rgb(0,0,0)"> outputVector</span><span sty=
le=3D"color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">vector=
</span><span style=3D"color:rgb(102,102,0)">.</span><span style=3D"color:rg=
b(0,0,0)">size</span><span style=3D"color:rgb(102,102,0)">());</span><span =
style=3D"color:rgb(0,0,0)"><br>std</span><span style=3D"color:rgb(102,102,0=
)">::</span><span style=3D"color:rgb(0,0,0)">transform</span><span style=3D=
"color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">std</span><=
span style=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,1=
36)">begin</span><span style=3D"color:rgb(102,102,0)">(</span><span style=
=3D"color:rgb(0,0,0)">vect<wbr>or</span><span style=3D"color:rgb(102,102,0)=
">),</span><span style=3D"color:rgb(0,0,0)"> std</span><span style=3D"color=
:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,136)">end</span><spa=
n style=3D"color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">v=
ector</span><span style=3D"color:rgb(102,102,0)">),</span><span style=3D"co=
lor:rgb(0,0,0)"> std</span><span style=3D"color:rgb(102,102,0)">::</span><s=
pan style=3D"color:rgb(0,0,136)">begin</span><span style=3D"color:rgb(102,1=
02,0)">(</span><span style=3D"color:rgb(0,0,0)">outputVector</span><span st=
yle=3D"color:rgb(102,102,0)">),</span><span style=3D"color:rgb(0,0,0)"> </s=
pan><span style=3D"color:rgb(102,102,0)">&</span><span style=3D"color:r=
gb(102,0,102)">MyDataType</span><span style=3D"color:rgb(102,102,0)">::</sp=
an><span style=3D"color:rgb(0,0,0)">some_int</span><span style=3D"color:rgb=
(102,102,0)">);</span></div></code></div><br></font></div><div><font face=
=3D"arial, sans-serif">I find this easier to read and type than</font></div=
><div><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"=
arial, sans-serif"><div style=3D"border:1px solid rgb(187,187,187);backgrou=
nd-color:rgb(250,250,250)"><code><div><font color=3D"#660066"><span style=
=3D"color:rgb(0,0,0)">std</span><span style=3D"color:rgb(102,102,0)">::</sp=
an><span style=3D"color:rgb(0,0,0)">transform</span><span style=3D"color:rg=
b(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">std</span><span styl=
e=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,136)">begi=
n</span><span style=3D"color:rgb(102,102,0)">(</span><span style=3D"color:r=
gb(0,0,0)">vect<wbr>or</span><span style=3D"color:rgb(102,102,0)">),</span>=
<span style=3D"color:rgb(0,0,0)"> std</span><span style=3D"color:rgb(102,10=
2,0)">::</span><span style=3D"color:rgb(0,0,136)">end</span><span style=3D"=
color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">vector</span=
><span style=3D"color:rgb(102,102,0)">),</span><span style=3D"color:rgb(0,0=
,0)"> std</span><span style=3D"color:rgb(102,102,0)">::</span><span style=
=3D"color:rgb(0,0,136)">begin</span><span style=3D"color:rgb(102,102,0)">(<=
/span><span style=3D"color:rgb(0,0,0)">outputVector</span><span style=3D"co=
lor:rgb(102,102,0)">),</span><span style=3D"color:rgb(0,0,0)"> </span><span=
style=3D"color:rgb(102,102,0)">[](</span><span style=3D"color:rgb(0,0,136)=
">auto</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:=
rgb(0,0,136)">const</span><span style=3D"color:rgb(102,102,0)">&</span>=
<span style=3D"color:rgb(0,0,0)"> it</span><span style=3D"color:rgb(102,102=
,0)">)</span><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:=
rgb(102,102,0)">{</span><span style=3D"color:rgb(0,0,0)"> </span><span styl=
e=3D"color:rgb(0,0,136)">return</span><span style=3D"color:rgb(0,0,0)"> it<=
/span><span style=3D"color:rgb(102,102,0)">.</span><span style=3D"color:rgb=
(0,0,0)">some_int</span><span style=3D"color:rgb(102,102,0)">();</span><spa=
n style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">}=
);</span></font></div></code></div><div><font face=3D"arial, sans-serif"><b=
r></font></div>This would be solved by Universal Function Call Syntax (UFCS=
) if UFCS were to be equivalent to </font><font face=3D"courier new, monosp=
ace">std::invoke</font><font face=3D"arial, sans-serif">=C2=A0(basically ma=
ke </font><font face=3D"courier new, monospace">f(args, ...)</font><font fa=
ce=3D"arial, sans-serif"> be as if you wrote </font><font face=3D"courier n=
ew, monospace">std::invoke(f, args, ...)</font><font face=3D"arial, sans-se=
rif">), but the <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/pape=
rs/2014/n4174.pdf" rel=3D"nofollow" target=3D"_blank" onmousedown=3D"this.h=
ref=3D'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fj=
tc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2014%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d=
1\x26usg\x3dAFQjCNHkJMV_PrQigQyYiudR49Ler99jVw';return true;" onclick=
=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-s=
td.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2014%2Fn4174.pdf\x26sa\x3dD\x=
26sntz\x3d1\x26usg\x3dAFQjCNHkJMV_PrQigQyYiudR49Ler99jVw';return true;"=
>proposal I saw</a> does not do this.<br><br></font></div></div></blockquot=
e></div></blockquote></div>
<p></p>
-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/66c052f5-75eb-4471-be08-8c42894e0df6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/66c052f5-75eb-4471-be08-8c42894e0df6=
%40isocpp.org</a>.<br />
------=_Part_2614_1274044774.1498628494511--
------=_Part_2613_1747082405.1498628494510--
.
Author: gmisocpp@gmail.com
Date: Tue, 27 Jun 2017 22:59:35 -0700 (PDT)
Raw View
------=_Part_1343_1986216112.1498629575115
Content-Type: multipart/alternative;
boundary="----=_Part_1344_2147045287.1498629575115"
------=_Part_1344_2147045287.1498629575115
Content-Type: text/plain; charset="UTF-8"
True, but the proposal would fix the issue for every library, not just the
standard one, unless I'm mistaken.
But I guess it's an interesting question that if the current proposal isn't
accepted, should your suggestion be accepted.
I assume you'd prefer the submitted proposal be accepted than your
suggestion?
On Wednesday, June 28, 2017 at 5:41:34 PM UTC+12, Justin Bassett wrote:
> Yes, that would completely handle this case. The only advantage to this is
> that that proposal changes the language, whereas this would only require
> changing the standard library.
>
> On Tuesday, June 27, 2017 at 10:36:19 PM UTC-7, gmis...@gmail.com wrote:
>>
>> Isn't this what you want?
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html
>>
>> On Wednesday, June 28, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:
>>
>>> C++17 added std::invoke, which allows invoking pointers to member
>>> functions and function objects with the same syntax. Pointers to data
>>> members can also be invoked as if they were unary functions. This could be
>>> added to the standard algorithms.
>>>
>>> Basically, every place where a standard algorithm takes a callable f
>>> and invokes it as f(args, ...), we could replace that with std::invoke(f,
>>> args, ...) (or we could use the magic syntax in the specification: INVOKE(f,
>>> args, ...), but it means the same thing).
>>>
>>> This would ease the use of the standard algorithms slightly.
>>>
>>> For example:
>>>
>>> std::vector<MyDataType> vector = someFunctionReturningMyDataType();
>>> std::vector<int> outputVector(vector.size());
>>> std::transform(std::begin(vector), std::end(vector), std::begin(
>>> outputVector), &MyDataType::some_int);
>>>
>>> I find this easier to read and type than
>>>
>>> std::transform(std::begin(vector), std::end(vector), std::begin(
>>> outputVector), [](auto const& it) { return it.some_int(); });
>>>
>>> This would be solved by Universal Function Call Syntax (UFCS) if UFCS
>>> were to be equivalent to std::invoke (basically make f(args, ...) be as
>>> if you wrote std::invoke(f, args, ...)), but the proposal I saw
>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf>
>>> does not do this.
>>>
>>>
--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2ec220d0-8b73-4b24-8f50-0c816fdef1d1%40isocpp.org.
------=_Part_1344_2147045287.1498629575115
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>True, but the proposal would fix the issue for every =
library, not just the standard one, unless I'm mistaken.</div><div>But =
I guess it's an interesting question that=C2=A0if the=C2=A0current prop=
osal isn't accepted, should your suggestion be accepted.</div><div>I as=
sume you'd prefer the submitted proposal be accepted than your suggesti=
on?</div><div><br><br>On Wednesday, June 28, 2017 at 5:41:34 PM UTC+12, Jus=
tin Bassett wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin: =
0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204)=
; border-left-width: 1px; border-left-style: solid;"><div dir=3D"ltr">Yes, =
that would completely handle this case. The only advantage to this is that =
that proposal changes the language, whereas this would only require changin=
g the standard library.<br><br>On Tuesday, June 27, 2017 at 10:36:19 PM UTC=
-7, <a>gmis...@gmail.com</a> wrote:<blockquote class=3D"gmail_quote" style=
=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(20=
4, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir=
=3D"ltr"><div>Isn't this what you want?</div><div><a onmousedown=3D"thi=
s.href=3D'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%=
2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fp0312r1.html\x26sa\x3dD\x26sn=
tz\x3d1\x26usg\x3dAFQjCNGKq4ARWOJv5GERNRlrOwEOZzbEgQ';return true;" onc=
lick=3D"this.href=3D'http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.op=
en-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017%2Fp0312r1.html\x26sa=
\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKq4ARWOJv5GERNRlrOwEOZzbEgQ';return=
true;" href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p03=
12r1.html" target=3D"_blank" rel=3D"nofollow">http://www.open-std.org/jtc1/=
<wbr>sc22/wg21/docs/papers/2017/<wbr>p0312r1.html</a><br><br>On Wednesday, =
June 28, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:</div><blockquote =
class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex=
; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-lef=
t-style: solid;"><div dir=3D"ltr">C++17 added <font face=3D"courier new, mo=
nospace">std::invoke</font><font face=3D"arial, sans-serif">,=C2=A0which al=
lows invoking pointers to member functions and function objects with the sa=
me syntax. Pointers to data members can also be invoked as if they were una=
ry functions. This could be added to the standard algorithms.</font><br><di=
v><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"aria=
l, sans-serif">Basically, every place where a standard algorithm takes a ca=
llable </font><font face=3D"courier new, monospace">f</font><font face=3D"a=
rial, sans-serif"> and invokes it as </font><font face=3D"courier new, mono=
space">f(args, ...)</font><font face=3D"arial, sans-serif">, we could repla=
ce that with </font><font face=3D"courier new, monospace">std::invoke(f, ar=
gs, ...)</font><font face=3D"arial, sans-serif"> (or we could use the magic=
syntax in the specification: </font><font face=3D"courier new, monospace">=
INVOKE(f, args, ...)</font><font face=3D"arial, sans-serif">, but it means =
the same thing).</font></div><div><font face=3D"arial, sans-serif"><br></fo=
nt></div><div><font face=3D"arial, sans-serif">This would ease the use of t=
he standard algorithms slightly.</font></div><div><font face=3D"arial, sans=
-serif"><br></font></div><div><font face=3D"arial, sans-serif">For example:=
</font></div><div><font face=3D"arial, sans-serif"><br></font></div><div><f=
ont face=3D"arial, sans-serif"><div style=3D"border: 1px solid rgb(187, 187=
, 187); border-image: none; background-color: rgb(250, 250, 250);"><code><d=
iv><span style=3D"color: rgb(0, 0, 0);">std</span><span style=3D"color: rgb=
(102, 102, 0);">::</span><span style=3D"color: rgb(0, 0, 0);">vector</span>=
<span style=3D"color: rgb(102, 102, 0);"><</span><span style=3D"color: r=
gb(102, 0, 102);">MyDataType</span><span style=3D"color: rgb(102, 102, 0);"=
>></span><span style=3D"color: rgb(0, 0, 0);"> vector </span><span style=
=3D"color: rgb(102, 102, 0);">=3D</span><span style=3D"color: rgb(0, 0, 0);=
"> someFunctionReturningMyDataTyp<wbr>e</span><span style=3D"color: rgb(102=
, 102, 0);">();</span><span style=3D"color: rgb(0, 0, 0);"><br>std</span><s=
pan style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color: rgb(0=
, 0, 0);">vector</span><span style=3D"color: rgb(0, 136, 0);"><int></=
span><span style=3D"color: rgb(0, 0, 0);"> outputVector</span><span style=
=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0);">=
vector</span><span style=3D"color: rgb(102, 102, 0);">.</span><span style=
=3D"color: rgb(0, 0, 0);">size</span><span style=3D"color: rgb(102, 102, 0)=
;">());</span><span style=3D"color: rgb(0, 0, 0);"><br>std</span><span styl=
e=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color: rgb(0, 0, 0);=
">transform</span><span style=3D"color: rgb(102, 102, 0);">(</span><span st=
yle=3D"color: rgb(0, 0, 0);">std</span><span style=3D"color: rgb(102, 102, =
0);">::</span><span style=3D"color: rgb(0, 0, 136);">begin</span><span styl=
e=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0);"=
>vect<wbr>or</span><span style=3D"color: rgb(102, 102, 0);">),</span><span =
style=3D"color: rgb(0, 0, 0);"> std</span><span style=3D"color: rgb(102, 10=
2, 0);">::</span><span style=3D"color: rgb(0, 0, 136);">end</span><span sty=
le=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0);=
">vector</span><span style=3D"color: rgb(102, 102, 0);">),</span><span styl=
e=3D"color: rgb(0, 0, 0);"> std</span><span style=3D"color: rgb(102, 102, 0=
);">::</span><span style=3D"color: rgb(0, 0, 136);">begin</span><span style=
=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0);">=
outputVector</span><span style=3D"color: rgb(102, 102, 0);">),</span><span =
style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, =
0);">&</span><span style=3D"color: rgb(102, 0, 102);">MyDataType</span>=
<span style=3D"color: rgb(102, 102, 0);">::</span><span style=3D"color: rgb=
(0, 0, 0);">some_int</span><span style=3D"color: rgb(102, 102, 0);">);</spa=
n></div></code></div><br></font></div><div><font face=3D"arial, sans-serif"=
>I find this easier to read and type than</font></div><div><font face=3D"ar=
ial, sans-serif"><br></font></div><div><font face=3D"arial, sans-serif"><di=
v style=3D"border: 1px solid rgb(187, 187, 187); border-image: none; backgr=
ound-color: rgb(250, 250, 250);"><code><div><font color=3D"#660066"><span s=
tyle=3D"color: rgb(0, 0, 0);">std</span><span style=3D"color: rgb(102, 102,=
0);">::</span><span style=3D"color: rgb(0, 0, 0);">transform</span><span s=
tyle=3D"color: rgb(102, 102, 0);">(</span><span style=3D"color: rgb(0, 0, 0=
);">std</span><span style=3D"color: rgb(102, 102, 0);">::</span><span style=
=3D"color: rgb(0, 0, 136);">begin</span><span style=3D"color: rgb(102, 102,=
0);">(</span><span style=3D"color: rgb(0, 0, 0);">vect<wbr>or</span><span =
style=3D"color: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0,=
0);"> std</span><span style=3D"color: rgb(102, 102, 0);">::</span><span st=
yle=3D"color: rgb(0, 0, 136);">end</span><span style=3D"color: rgb(102, 102=
, 0);">(</span><span style=3D"color: rgb(0, 0, 0);">vector</span><span styl=
e=3D"color: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0, 0);=
"> std</span><span style=3D"color: rgb(102, 102, 0);">::</span><span style=
=3D"color: rgb(0, 0, 136);">begin</span><span style=3D"color: rgb(102, 102,=
0);">(</span><span style=3D"color: rgb(0, 0, 0);">outputVector</span><span=
style=3D"color: rgb(102, 102, 0);">),</span><span style=3D"color: rgb(0, 0=
, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">[](</span><span sty=
le=3D"color: rgb(0, 0, 136);">auto</span><span style=3D"color: rgb(0, 0, 0)=
;"> </span><span style=3D"color: rgb(0, 0, 136);">const</span><span style=
=3D"color: rgb(102, 102, 0);">&</span><span style=3D"color: rgb(0, 0, 0=
);"> it</span><span style=3D"color: rgb(102, 102, 0);">)</span><span style=
=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(102, 102, 0);">=
{</span><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: =
rgb(0, 0, 136);">return</span><span style=3D"color: rgb(0, 0, 0);"> it</spa=
n><span style=3D"color: rgb(102, 102, 0);">.</span><span style=3D"color: rg=
b(0, 0, 0);">some_int</span><span style=3D"color: rgb(102, 102, 0);">();</s=
pan><span style=3D"color: rgb(0, 0, 0);"> </span><span style=3D"color: rgb(=
102, 102, 0);">});</span></font></div></code></div><div><font face=3D"arial=
, sans-serif"><br></font></div>This would be solved by Universal Function C=
all Syntax (UFCS) if UFCS were to be equivalent to </font><font face=3D"cou=
rier new, monospace">std::invoke</font><font face=3D"arial, sans-serif">=C2=
=A0(basically make </font><font face=3D"courier new, monospace">f(args, ...=
)</font><font face=3D"arial, sans-serif"> be as if you wrote </font><font f=
ace=3D"courier new, monospace">std::invoke(f, args, ...)</font><font face=
=3D"arial, sans-serif">), but the <a onmousedown=3D"this.href=3D'http:/=
/www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21=
%2Fdocs%2Fpapers%2F2014%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjC=
NHkJMV_PrQigQyYiudR49Ler99jVw';return true;" onclick=3D"this.href=3D=
9;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc2=
2%2Fwg21%2Fdocs%2Fpapers%2F2014%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\=
x3dAFQjCNHkJMV_PrQigQyYiudR49Ler99jVw';return true;" href=3D"http://www=
..open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf" target=3D"_blank" =
rel=3D"nofollow">proposal I saw</a> does not do this.<br><br></font></div><=
/div></blockquote></div></blockquote></div></blockquote></div>
<p></p>
-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/2ec220d0-8b73-4b24-8f50-0c816fdef1d1%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2ec220d0-8b73-4b24-8f50-0c816fdef1d1=
%40isocpp.org</a>.<br />
------=_Part_1344_2147045287.1498629575115--
------=_Part_1343_1986216112.1498629575115--
.
Author: Justin Bassett <jbassett271@gmail.com>
Date: Tue, 27 Jun 2017 23:03:36 -0700 (PDT)
Raw View
------=_Part_1424_1848195384.1498629816534
Content-Type: multipart/alternative;
boundary="----=_Part_1425_1067795994.1498629816535"
------=_Part_1425_1067795994.1498629816535
Content-Type: text/plain; charset="UTF-8"
For the most part, yes.
On Tuesday, June 27, 2017 at 10:59:35 PM UTC-7, gmis...@gmail.com wrote:
>
> True, but the proposal would fix the issue for every library, not just the
> standard one, unless I'm mistaken.
> But I guess it's an interesting question that if the current proposal
> isn't accepted, should your suggestion be accepted.
> I assume you'd prefer the submitted proposal be accepted than your
> suggestion?
>
>
> On Wednesday, June 28, 2017 at 5:41:34 PM UTC+12, Justin Bassett wrote:
>
>> Yes, that would completely handle this case. The only advantage to this
>> is that that proposal changes the language, whereas this would only require
>> changing the standard library.
>>
>> On Tuesday, June 27, 2017 at 10:36:19 PM UTC-7, gmis...@gmail.com wrote:
>>>
>>> Isn't this what you want?
>>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html
>>>
>>> On Wednesday, June 28, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:
>>>
>>>> C++17 added std::invoke, which allows invoking pointers to member
>>>> functions and function objects with the same syntax. Pointers to data
>>>> members can also be invoked as if they were unary functions. This could be
>>>> added to the standard algorithms.
>>>>
>>>> Basically, every place where a standard algorithm takes a callable f
>>>> and invokes it as f(args, ...), we could replace that with std::invoke(f,
>>>> args, ...) (or we could use the magic syntax in the specification: INVOKE(f,
>>>> args, ...), but it means the same thing).
>>>>
>>>> This would ease the use of the standard algorithms slightly.
>>>>
>>>> For example:
>>>>
>>>> std::vector<MyDataType> vector = someFunctionReturningMyDataType();
>>>> std::vector<int> outputVector(vector.size());
>>>> std::transform(std::begin(vector), std::end(vector), std::begin(
>>>> outputVector), &MyDataType::some_int);
>>>>
>>>> I find this easier to read and type than
>>>>
>>>> std::transform(std::begin(vector), std::end(vector), std::begin(
>>>> outputVector), [](auto const& it) { return it.some_int(); });
>>>>
>>>> This would be solved by Universal Function Call Syntax (UFCS) if UFCS
>>>> were to be equivalent to std::invoke (basically make f(args, ...) be
>>>> as if you wrote std::invoke(f, args, ...)), but the proposal I saw
>>>> <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf>
>>>> does not do this.
>>>>
>>>>
--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/cc310e2a-b47b-49d2-9dca-777d03e7c969%40isocpp.org.
------=_Part_1425_1067795994.1498629816535
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">For the most part, yes.=C2=A0<br><br>On Tuesday, June 27, =
2017 at 10:59:35 PM UTC-7, gmis...@gmail.com wrote:<blockquote class=3D"gma=
il_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid=
;padding-left: 1ex;"><div dir=3D"ltr"><div>True, but the proposal would fix=
the issue for every library, not just the standard one, unless I'm mis=
taken.</div><div>But I guess it's an interesting question that=C2=A0if =
the=C2=A0current proposal isn't accepted, should your suggestion be acc=
epted.</div><div>I assume you'd prefer the submitted proposal be accept=
ed than your suggestion?</div><div><br><br>On Wednesday, June 28, 2017 at 5=
:41:34 PM UTC+12, Justin Bassett wrote:</div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rg=
b(204,204,204);border-left-width:1px;border-left-style:solid"><div dir=3D"l=
tr">Yes, that would completely handle this case. The only advantage to this=
is that that proposal changes the language, whereas this would only requir=
e changing the standard library.<br><br>On Tuesday, June 27, 2017 at 10:36:=
19 PM UTC-7, <a>gmis...@gmail.com</a> wrote:<blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb=
(204,204,204);border-left-width:1px;border-left-style:solid"><div dir=3D"lt=
r"><div>Isn't this what you want?</div><div><a href=3D"http://www.open-=
std.org/jtc1/sc22/wg21/docs/papers/2017/p0312r1.html" rel=3D"nofollow" targ=
et=3D"_blank" onmousedown=3D"this.href=3D'http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2017=
%2Fp0312r1.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKq4ARWOJv5GERNRlrO=
wEOZzbEgQ';return true;" onclick=3D"this.href=3D'http://www.google.=
com/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpa=
pers%2F2017%2Fp0312r1.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKq4ARWO=
Jv5GERNRlrOwEOZzbEgQ';return true;">http://www.open-std.org/jtc1/<wbr>s=
c22/wg21/docs/papers/2017/<wbr>p0312r1.html</a><br><br>On Wednesday, June 2=
8, 2017 at 5:08:07 PM UTC+12, Justin Bassett wrote:</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-=
left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">=
<div dir=3D"ltr">C++17 added <font face=3D"courier new, monospace">std::inv=
oke</font><font face=3D"arial, sans-serif">,=C2=A0which allows invoking poi=
nters to member functions and function objects with the same syntax. Pointe=
rs to data members can also be invoked as if they were unary functions. Thi=
s could be added to the standard algorithms.</font><br><div><font face=3D"a=
rial, sans-serif"><br></font></div><div><font face=3D"arial, sans-serif">Ba=
sically, every place where a standard algorithm takes a callable </font><fo=
nt face=3D"courier new, monospace">f</font><font face=3D"arial, sans-serif"=
> and invokes it as </font><font face=3D"courier new, monospace">f(args, ..=
..)</font><font face=3D"arial, sans-serif">, we could replace that with </fo=
nt><font face=3D"courier new, monospace">std::invoke(f, args, ...)</font><f=
ont face=3D"arial, sans-serif"> (or we could use the magic syntax in the sp=
ecification: </font><font face=3D"courier new, monospace">INVOKE(f, args, .=
...)</font><font face=3D"arial, sans-serif">, but it means the same thing).<=
/font></div><div><font face=3D"arial, sans-serif"><br></font></div><div><fo=
nt face=3D"arial, sans-serif">This would ease the use of the standard algor=
ithms slightly.</font></div><div><font face=3D"arial, sans-serif"><br></fon=
t></div><div><font face=3D"arial, sans-serif">For example:</font></div><div=
><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"arial=
, sans-serif"><div style=3D"border:1px solid rgb(187,187,187);background-co=
lor:rgb(250,250,250)"><code><div><span style=3D"color:rgb(0,0,0)">std</span=
><span style=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0=
,0)">vector</span><span style=3D"color:rgb(102,102,0)"><</span><span sty=
le=3D"color:rgb(102,0,102)">MyDataType</span><span style=3D"color:rgb(102,1=
02,0)">></span><span style=3D"color:rgb(0,0,0)"> vector </span><span sty=
le=3D"color:rgb(102,102,0)">=3D</span><span style=3D"color:rgb(0,0,0)"> som=
eFunctionReturningMyDataTyp<wbr>e</span><span style=3D"color:rgb(102,102,0)=
">();</span><span style=3D"color:rgb(0,0,0)"><br>std</span><span style=3D"c=
olor:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,0)">vector</span=
><span style=3D"color:rgb(0,136,0)"><int></span><span style=3D"color:=
rgb(0,0,0)"> outputVector</span><span style=3D"color:rgb(102,102,0)">(</spa=
n><span style=3D"color:rgb(0,0,0)">vector</span><span style=3D"color:rgb(10=
2,102,0)">.</span><span style=3D"color:rgb(0,0,0)">size</span><span style=
=3D"color:rgb(102,102,0)">());</span><span style=3D"color:rgb(0,0,0)"><br>s=
td</span><span style=3D"color:rgb(102,102,0)">::</span><span style=3D"color=
:rgb(0,0,0)">transform</span><span style=3D"color:rgb(102,102,0)">(</span><=
span style=3D"color:rgb(0,0,0)">std</span><span style=3D"color:rgb(102,102,=
0)">::</span><span style=3D"color:rgb(0,0,136)">begin</span><span style=3D"=
color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">vect<wbr>or<=
/span><span style=3D"color:rgb(102,102,0)">),</span><span style=3D"color:rg=
b(0,0,0)"> std</span><span style=3D"color:rgb(102,102,0)">::</span><span st=
yle=3D"color:rgb(0,0,136)">end</span><span style=3D"color:rgb(102,102,0)">(=
</span><span style=3D"color:rgb(0,0,0)">vector</span><span style=3D"color:r=
gb(102,102,0)">),</span><span style=3D"color:rgb(0,0,0)"> std</span><span s=
tyle=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,136)">b=
egin</span><span style=3D"color:rgb(102,102,0)">(</span><span style=3D"colo=
r:rgb(0,0,0)">outputVector</span><span style=3D"color:rgb(102,102,0)">),</s=
pan><span style=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,1=
02,0)">&</span><span style=3D"color:rgb(102,0,102)">MyDataType</span><s=
pan style=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,0)=
">some_int</span><span style=3D"color:rgb(102,102,0)">);</span></div></code=
></div><br></font></div><div><font face=3D"arial, sans-serif">I find this e=
asier to read and type than</font></div><div><font face=3D"arial, sans-seri=
f"><br></font></div><div><font face=3D"arial, sans-serif"><div style=3D"bor=
der:1px solid rgb(187,187,187);background-color:rgb(250,250,250)"><code><di=
v><font color=3D"#660066"><span style=3D"color:rgb(0,0,0)">std</span><span =
style=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rgb(0,0,0)">tr=
ansform</span><span style=3D"color:rgb(102,102,0)">(</span><span style=3D"c=
olor:rgb(0,0,0)">std</span><span style=3D"color:rgb(102,102,0)">::</span><s=
pan style=3D"color:rgb(0,0,136)">begin</span><span style=3D"color:rgb(102,1=
02,0)">(</span><span style=3D"color:rgb(0,0,0)">vect<wbr>or</span><span sty=
le=3D"color:rgb(102,102,0)">),</span><span style=3D"color:rgb(0,0,0)"> std<=
/span><span style=3D"color:rgb(102,102,0)">::</span><span style=3D"color:rg=
b(0,0,136)">end</span><span style=3D"color:rgb(102,102,0)">(</span><span st=
yle=3D"color:rgb(0,0,0)">vector</span><span style=3D"color:rgb(102,102,0)">=
),</span><span style=3D"color:rgb(0,0,0)"> std</span><span style=3D"color:r=
gb(102,102,0)">::</span><span style=3D"color:rgb(0,0,136)">begin</span><spa=
n style=3D"color:rgb(102,102,0)">(</span><span style=3D"color:rgb(0,0,0)">o=
utputVector</span><span style=3D"color:rgb(102,102,0)">),</span><span style=
=3D"color:rgb(0,0,0)"> </span><span style=3D"color:rgb(102,102,0)">[](</spa=
n><span style=3D"color:rgb(0,0,136)">auto</span><span style=3D"color:rgb(0,=
0,0)"> </span><span style=3D"color:rgb(0,0,136)">const</span><span style=3D=
"color:rgb(102,102,0)">&</span><span style=3D"color:rgb(0,0,0)"> it</sp=
an><span style=3D"color:rgb(102,102,0)">)</span><span style=3D"color:rgb(0,=
0,0)"> </span><span style=3D"color:rgb(102,102,0)">{</span><span style=3D"c=
olor:rgb(0,0,0)"> </span><span style=3D"color:rgb(0,0,136)">return</span><s=
pan style=3D"color:rgb(0,0,0)"> it</span><span style=3D"color:rgb(102,102,0=
)">.</span><span style=3D"color:rgb(0,0,0)">some_int</span><span style=3D"c=
olor:rgb(102,102,0)">();</span><span style=3D"color:rgb(0,0,0)"> </span><sp=
an style=3D"color:rgb(102,102,0)">});</span></font></div></code></div><div>=
<font face=3D"arial, sans-serif"><br></font></div>This would be solved by U=
niversal Function Call Syntax (UFCS) if UFCS were to be equivalent to </fon=
t><font face=3D"courier new, monospace">std::invoke</font><font face=3D"ari=
al, sans-serif">=C2=A0(basically make </font><font face=3D"courier new, mon=
ospace">f(args, ...)</font><font face=3D"arial, sans-serif"> be as if you w=
rote </font><font face=3D"courier new, monospace">std::invoke(f, args, ...)=
</font><font face=3D"arial, sans-serif">), but the <a href=3D"http://www.op=
en-std.org/jtc1/sc22/wg21/docs/papers/2014/n4174.pdf" rel=3D"nofollow" targ=
et=3D"_blank" onmousedown=3D"this.href=3D'http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpapers%2F2014=
%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkJMV_PrQigQyYiudR49Le=
r99jVw';return true;" onclick=3D"this.href=3D'http://www.google.com=
/url?q\x3dhttp%3A%2F%2Fwww.open-std.org%2Fjtc1%2Fsc22%2Fwg21%2Fdocs%2Fpaper=
s%2F2014%2Fn4174.pdf\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHkJMV_PrQigQyY=
iudR49Ler99jVw';return true;">proposal I saw</a> does not do this.<br><=
br></font></div></div></blockquote></div></blockquote></div></blockquote></=
div></blockquote></div>
<p></p>
-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/cc310e2a-b47b-49d2-9dca-777d03e7c969%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/cc310e2a-b47b-49d2-9dca-777d03e7c969=
%40isocpp.org</a>.<br />
------=_Part_1425_1067795994.1498629816535--
------=_Part_1424_1848195384.1498629816534--
.
Author: "T. C." <rs2740@gmail.com>
Date: Wed, 28 Jun 2017 02:29:22 -0700 (PDT)
Raw View
------=_Part_2567_72408097.1498642162251
Content-Type: multipart/alternative;
boundary="----=_Part_2568_574771380.1498642162251"
------=_Part_2568_574771380.1498642162251
Content-Type: text/plain; charset="UTF-8"
The current solution that is closest to your favored form is std::mem_fn.
Also, this is already in the Ranges TS.
--
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/12647c6a-a1de-4cac-b74d-54598a997417%40isocpp.org.
------=_Part_2568_574771380.1498642162251
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">The current solution that is closest to your favored form =
is std::mem_fn.<div><br></div><div>Also, this is already in the Ranges TS.<=
/div></div>
<p></p>
-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/12647c6a-a1de-4cac-b74d-54598a997417%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/12647c6a-a1de-4cac-b74d-54598a997417=
%40isocpp.org</a>.<br />
------=_Part_2568_574771380.1498642162251--
------=_Part_2567_72408097.1498642162251--
.