Topic: Placeholder operators


Author: Cleiton Santoia <cleitonsantoia@gmail.com>
Date: Wed, 2 Aug 2017 20:03:57 -0700 (PDT)
Raw View
------=_Part_2913_1831376114.1501729437672
Content-Type: multipart/alternative;
 boundary="----=_Part_2914_2136799076.1501729437673"

------=_Part_2914_2136799076.1501729437673
Content-Type: text/plain; charset="UTF-8"

From Jakko Jarvi lambda lib
<https://pdfs.semanticscholar.org/06e4/a10a9603fb72decb778f2ca2129da90135ba.pdf>,
we got good things, most of it inspired variadic templates and std::tuple,
but a little bit was left aside...
Is there any proposals to make placeholders great again ?

using namespace std::placeholders;

std::vector<int> c = {1, 89, 24, 3};
auto it = std::find_if( c.begin(), c.end(), _1 > 10); // instead of:
//auto it = std::find_if( c.begin(), c.end(), [](auto& i) { return i > 10;
} );


allowing operators on placeholders to return predicates ? ( and other
interesting things )

--
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/12bf36f7-881c-478b-a859-6008e2cc8be3%40isocpp.org.

------=_Part_2914_2136799076.1501729437673
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>From <a href=3D"https://pdfs.semanticscholar.org/06e4=
/a10a9603fb72decb778f2ca2129da90135ba.pdf">Jakko Jarvi lambda lib</a>, we g=
ot good things, most of it inspired variadic templates and std::tuple, but =
a little bit was left aside...</div><div>Is there any proposals to make pla=
ceholders great again ?=C2=A0</div><div><br></div><div><div><div class=3D"p=
rettyprint" style=3D"background-color: rgb(250, 250, 250); border-color: rg=
b(187, 187, 187); border-style: solid; border-width: 1px; word-wrap: break-=
word;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><div class=
=3D"subprettyprint">using namespace std::placeholders;<br><br>std::vector&l=
t;int&gt; c =3D {1, 89, 24, 3};<br>auto it =3D std::find_if( c.begin(), c.e=
nd(), _1 &gt; 10); // instead of:=C2=A0<br>//auto it =3D std::find_if( c.be=
gin(), c.end(), [](auto&amp; i) { return i &gt; 10; } );<br><br></div></div=
></code></div></div><div><br></div><div>allowing operators on placeholders =
to return predicates ? ( and other interesting things )=C2=A0</div></div></=
div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/12bf36f7-881c-478b-a859-6008e2cc8be3%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/12bf36f7-881c-478b-a859-6008e2cc8be3=
%40isocpp.org</a>.<br />

------=_Part_2914_2136799076.1501729437673--

------=_Part_2913_1831376114.1501729437672--

.