Topic: std::max_element_if, std::min_element_if


Author: "'Vlad from Moscow' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Date: Wed, 30 May 2018 07:52:18 -0700 (PDT)
Raw View
------=_Part_44325_176075272.1527691938810
Content-Type: multipart/alternative;
 boundary="----=_Part_44326_1800117291.1527691938811"

------=_Part_44326_1800117291.1527691938811
Content-Type: text/plain; charset="UTF-8"

In my opinion apart from the standard algorithms *std::max_element* and
*std::min_element* there are required algorithms like *std::max_element_if*
and *std::min_element_if* that accept a predicate that selects elements of
a sequence for which the maximum element and minimum element are searched.


--
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/2c402a86-181a-4b7f-8d3d-a830177cbe3b%40isocpp.org.

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

<div dir=3D"ltr">In my opinion apart from the standard algorithms <b>std::m=
ax_element</b> and <b>std::min_element</b> there are required algorithms li=
ke <b>std::max_element_if</b> and <b>std::min_element_if</b> that accept a =
predicate that selects elements of a sequence for which the maximum element=
 and minimum element are searched.<div><br></div><div><br></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/2c402a86-181a-4b7f-8d3d-a830177cbe3b%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2c402a86-181a-4b7f-8d3d-a830177cbe3b=
%40isocpp.org</a>.<br />

------=_Part_44326_1800117291.1527691938811--

------=_Part_44325_176075272.1527691938810--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Wed, 30 May 2018 08:26:09 -0700 (PDT)
Raw View
------=_Part_44785_794852945.1527693969548
Content-Type: multipart/alternative;
 boundary="----=_Part_44786_1617535428.1527693969548"

------=_Part_44786_1617535428.1527693969548
Content-Type: text/plain; charset="UTF-8"

On Wednesday, May 30, 2018 at 10:52:18 AM UTC-4, Vlad from Moscow wrote:
>
> In my opinion apart from the standard algorithms *std::max_element* and
> *std::min_element* there are required algorithms like
> *std::max_element_if* and *std::min_element_if* that accept a predicate
> that selects elements of a sequence for which the maximum element and
> minimum element are searched.
>

This is what range filters are for. We shouldn't have `_if` versions of
algorithms; you should apply a filter to the range.

--
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/18f99d34-4bdb-4e2f-b169-cf64e284029c%40isocpp.org.

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

<div dir=3D"ltr">On Wednesday, May 30, 2018 at 10:52:18 AM UTC-4, Vlad from=
 Moscow wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"=
>In my opinion apart from the standard algorithms <b>std::max_element</b> a=
nd <b>std::min_element</b> there are required algorithms like <b>std::max_e=
lement_if</b> and <b>std::min_element_if</b> that accept a predicate that s=
elects elements of a sequence for which the maximum element and minimum ele=
ment are searched.</div></blockquote><div><br></div><div>This is what range=
 filters are for. We shouldn&#39;t have `_if` versions of algorithms; you s=
hould apply a filter to the range.<br></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/18f99d34-4bdb-4e2f-b169-cf64e284029c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/18f99d34-4bdb-4e2f-b169-cf64e284029c=
%40isocpp.org</a>.<br />

------=_Part_44786_1617535428.1527693969548--

------=_Part_44785_794852945.1527693969548--

.