Topic: std::any_of and friends without predicates


Author: Anton Bikineev <ant.bikineev@gmail.com>
Date: Tue, 11 Sep 2018 03:32:59 -0700 (PDT)
Raw View
------=_Part_1491_305806476.1536661979296
Content-Type: multipart/alternative;
 boundary="----=_Part_1492_1129476195.1536661979296"

------=_Part_1492_1129476195.1536661979296
Content-Type: text/plain; charset="UTF-8"

Today I wanted to check a sequence of convertible-to-bool elements type for
being all set to false and found out that there are no counterparts for
std::any_of, std::all_of, std::none_of that would take no predicate and
just use (*it) in underlying conditions. Would it make sense to add them to
avoid writing silly predicates, like
[](const auto& i) noexcept -> bool {return i;}
?
Sorry if the question has popped up before.

--
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/9b1c3d8e-39ef-4a68-a49e-ef8ad13e5e74%40isocpp.org.

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

<div dir=3D"ltr"><div>Today I wanted to check a sequence of convertible-to-=
bool  elements type for being all set to false and found out that there are=
 no counterparts for std::any_of, std::all_of, std::none_of that would take=
 no predicate and just use (*it) in underlying conditions. Would it make se=
nse to add them to avoid writing silly predicates, like</div><div><div styl=
e=3D"background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187)=
; border-style: solid; border-width: 1px; overflow-wrap: break-word;" class=
=3D"prettyprint"><code class=3D"prettyprint"><div class=3D"subprettyprint">=
<span style=3D"color: #660;" class=3D"styled-by-prettify">[](</span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">const</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"color=
: #008;" class=3D"styled-by-prettify">auto</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">&amp;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"> i</span><span style=3D"color: #660;" class=3D"s=
tyled-by-prettify">)</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> noexcept </span><span style=3D"color: #660;" class=3D"styled-by-=
prettify">-&gt;</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> </span><span style=3D"color: #008;" class=3D"styled-by-prettify">bool=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><s=
pan style=3D"color: #660;" 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"styled-by-prettify"> i</span><span style=3D"color: #=
660;" class=3D"styled-by-prettify">;}</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br></span></div></code></div>?</div><div>Sorry =
if the question has popped up before.<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/9b1c3d8e-39ef-4a68-a49e-ef8ad13e5e74%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/9b1c3d8e-39ef-4a68-a49e-ef8ad13e5e74=
%40isocpp.org</a>.<br />

------=_Part_1492_1129476195.1536661979296--

------=_Part_1491_305806476.1536661979296--

.


Author: Sarfaraz Nawaz <nawazzz@gmail.com>
Date: Tue, 11 Sep 2018 18:23:04 +0530
Raw View
--00000000000017b37b057597f50f
Content-Type: text/plain; charset="UTF-8"

I think the standard missed that.

Anyway, it seems it'd be good if the core language allows passing `type` as
argument to a function, as the compiler should be able to create a callable
entity out of this so that the following could be allowed:

 std::any_of(begin(x), end(x), bool);


and from the third argument, the compiler should create a function that
takes zero or more arguments (templatized) and returns bool, so the above
should be equivalent to this:

 std::any_of(begin(x), end(x), [(auto && .. args) { return bool{args...};
> });


I guess such feature would be very useful in other data transformation
scenario as well.

On Tue, Sep 11, 2018 at 4:03 PM Anton Bikineev <ant.bikineev@gmail.com>
wrote:

> Today I wanted to check a sequence of convertible-to-bool elements type
> for being all set to false and found out that there are no counterparts for
> std::any_of, std::all_of, std::none_of that would take no predicate and
> just use (*it) in underlying conditions. Would it make sense to add them to
> avoid writing silly predicates, like
> [](const auto& i) noexcept -> bool {return i;}
> ?
> Sorry if the question has popped up before.
>
> --
> 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/9b1c3d8e-39ef-4a68-a49e-ef8ad13e5e74%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9b1c3d8e-39ef-4a68-a49e-ef8ad13e5e74%40isocpp.org?utm_medium=email&utm_source=footer>
> .
>

--
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/CAJ2mQS2cdqQDhhVjwcaQgXVw%2BbmAq3JM4Jg-aZU3JhnsNqnXeg%40mail.gmail.com.

--00000000000017b37b057597f50f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I think the standard missed that.<br><br>Anyway, it seems =
it&#39;d be good if the core language allows passing `type` as argument to =
a function, as the compiler should be able to create a callable entity out =
of this so that the following could be allowed:<div><div><br></div></div><b=
lockquote style=3D"margin:0 0 0 40px;border:none;padding:0px"><div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px=
 solid rgb(204,204,204);padding-left:1ex">=C2=A0std::any_of(begin(x), end(x=
), bool);</blockquote></div></blockquote><div><div><br></div><div>and from =
the third argument, the compiler should create a function that takes zero o=
r more arguments (templatized) and returns bool, so the above=C2=A0 should =
be equivalent to this:</div></div><div><br></div><div><blockquote style=3D"=
margin:0 0 0 40px;border:none;padding:0px"><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">=C2=A0std::any_of(begin(x), end(x), [(auto &amp;&amp; .. =
args) { return bool{args...}; });</blockquote><div><br></div></blockquote>I=
 guess such feature would be very useful in other data transformation scena=
rio as well.</div><div><br></div><div class=3D"gmail_quote"><div dir=3D"ltr=
">On Tue, Sep 11, 2018 at 4:03 PM Anton Bikineev &lt;<a href=3D"mailto:ant.=
bikineev@gmail.com">ant.bikineev@gmail.com</a>&gt; wrote:<br></div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s=
olid;padding-left:1ex"><div dir=3D"ltr"><div>Today I wanted to check a sequ=
ence of convertible-to-bool  elements type for being all set to false and f=
ound out that there are no counterparts for std::any_of, std::all_of, std::=
none_of that would take no predicate and just use (*it) in underlying condi=
tions. Would it make sense to add them to avoid writing silly predicates, l=
ike</div><div><div style=3D"background-color:rgb(250,250,250);border-color:=
rgb(187,187,187);border-style:solid;border-width:1px" class=3D"m_6373505818=
596202319prettyprint"><code class=3D"m_6373505818596202319prettyprint"><div=
 class=3D"m_6373505818596202319subprettyprint"><span style=3D"color:#660" c=
lass=3D"m_6373505818596202319styled-by-prettify">[](</span><span style=3D"c=
olor:#008" class=3D"m_6373505818596202319styled-by-prettify">const</span><s=
pan style=3D"color:#000" class=3D"m_6373505818596202319styled-by-prettify">=
 </span><span style=3D"color:#008" class=3D"m_6373505818596202319styled-by-=
prettify">auto</span><span style=3D"color:#660" class=3D"m_6373505818596202=
319styled-by-prettify">&amp;</span><span style=3D"color:#000" class=3D"m_63=
73505818596202319styled-by-prettify"> i</span><span style=3D"color:#660" cl=
ass=3D"m_6373505818596202319styled-by-prettify">)</span><span style=3D"colo=
r:#000" class=3D"m_6373505818596202319styled-by-prettify"> noexcept </span>=
<span style=3D"color:#660" class=3D"m_6373505818596202319styled-by-prettify=
">-&gt;</span><span style=3D"color:#000" class=3D"m_6373505818596202319styl=
ed-by-prettify"> </span><span style=3D"color:#008" class=3D"m_6373505818596=
202319styled-by-prettify">bool</span><span style=3D"color:#000" class=3D"m_=
6373505818596202319styled-by-prettify"> </span><span style=3D"color:#660" c=
lass=3D"m_6373505818596202319styled-by-prettify">{</span><span style=3D"col=
or:#008" class=3D"m_6373505818596202319styled-by-prettify">return</span><sp=
an style=3D"color:#000" class=3D"m_6373505818596202319styled-by-prettify"> =
i</span><span style=3D"color:#660" class=3D"m_6373505818596202319styled-by-=
prettify">;}</span><span style=3D"color:#000" class=3D"m_637350581859620231=
9styled-by-prettify"><br></span></div></code></div>?</div><div>Sorry if the=
 question has popped up before.<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">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/9b1c3d8e-39ef-4a68-a49e-ef8ad13e5e74%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/9b1c3d8e-39ef-=
4a68-a49e-ef8ad13e5e74%40isocpp.org</a>.<br>
</blockquote></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/CAJ2mQS2cdqQDhhVjwcaQgXVw%2BbmAq3JM4J=
g-aZU3JhnsNqnXeg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAJ2mQS2cdqQDhh=
VjwcaQgXVw%2BbmAq3JM4Jg-aZU3JhnsNqnXeg%40mail.gmail.com</a>.<br />

--00000000000017b37b057597f50f--

.


Author: Matthew Woehlke <mwoehlke.floss@gmail.com>
Date: Tue, 11 Sep 2018 10:39:55 -0400
Raw View
On 2018-09-11 08:53, Sarfaraz Nawaz wrote:
> Anyway, it seems it'd be good if the core language allows passing `type` as
> argument to a function, as the compiler should be able to create a callable
> entity out of this so that the following could be allowed:
>
>  std::any_of(begin(x), end(x), bool);
>
> and from the third argument, the compiler should create a function that
> takes zero or more arguments (templatized) and returns bool

That seems... overly involved for a language feature of somewhat
questionable value (*as* a language feature).

Wouldn't it be much simpler to have:

  std::any_of(begin(x), end(x), std::cast<bool>);

....? And can't we already implement that?

--
Matthew

--
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/6ba4f0a3-17fc-13b8-f65e-f08abe8f351d%40gmail.com.

.


Author: Sarfaraz Nawaz <nawazzz@gmail.com>
Date: Tue, 11 Sep 2018 08:23:53 -0700 (PDT)
Raw View
------=_Part_1502_739879060.1536679433459
Content-Type: multipart/alternative;
 boundary="----=_Part_1503_1680522759.1536679433460"

------=_Part_1503_1680522759.1536679433460
Content-Type: text/plain; charset="UTF-8"


On Tuesday, 11 September 2018 20:09:58 UTC+5:30, Matthew Woehlke wrote:
>
> On 2018-09-11 08:53, Sarfaraz Nawaz wrote:
> > Anyway, it seems it'd be good if the core language allows passing `type`
> as
> > argument to a function, as the compiler should be able to create a
> callable
> > entity out of this so that the following could be allowed:
> >
> >  std::any_of(begin(x), end(x), bool);
> >
> > and from the third argument, the compiler should create a function that
> > takes zero or more arguments (templatized) and returns bool
>
> That seems... overly involved for a language feature of somewhat
> questionable value (*as* a language feature).
>
> Wouldn't it be much simpler to have:
>
>   std::any_of(begin(x), end(x), std::cast<bool>);
>
> ...? And can't we already implement that?
>

Hmm... the idea of *std::cast<>*  looks good. Seems it's quite easily
implementable as well:

    template<typename T>
    constexpr auto cast = [](auto && ... args) {
        return T(args ... );  // ignored std::forward for brevity
    };


Demo : http://coliru.stacked-crooked.com/a/9cb2e86b89e53188

--
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/47068c1a-f6ab-449e-83b3-94c525693f96%40isocpp.org.

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

<div dir=3D"ltr"><br>On Tuesday, 11 September 2018 20:09:58 UTC+5:30, Matth=
ew Woehlke  wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;marg=
in-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 2018-09-1=
1 08:53, Sarfaraz Nawaz wrote:
<br>&gt; Anyway, it seems it&#39;d be good if the core language allows pass=
ing `type` as
<br>&gt; argument to a function, as the compiler should be able to create a=
 callable
<br>&gt; entity out of this so that the following could be allowed:
<br>&gt;=20
<br>&gt; =C2=A0std::any_of(begin(x), end(x), bool);
<br>&gt;=20
<br>&gt; and from the third argument, the compiler should create a function=
 that
<br>&gt; takes zero or more arguments (templatized) and returns bool
<br>
<br>That seems... overly involved for a language feature of somewhat
<br>questionable value (*as* a language feature).
<br>
<br>Wouldn&#39;t it be much simpler to have:
<br>
<br>=C2=A0 std::any_of(begin(x), end(x), std::cast&lt;bool&gt;);
<br>
<br>...? And can&#39;t we already implement that?
<br></blockquote><div><br></div><div>Hmm... the idea of <b>std::cast&lt;&gt=
;</b>=C2=A0 looks good. Seems it&#39;s quite easily implementable as well:<=
/div><div><div>=C2=A0 =C2=A0=C2=A0</div><div></div></div><div class=3D"pret=
typrint" style=3D"background-color: rgb(250, 250, 250); border-color: rgb(1=
87, 187, 187); border-style: solid; border-width: 1px; word-wrap: break-wor=
d;"><code class=3D"prettyprint"><div class=3D"subprettyprint"><span style=
=3D"color: #000;" class=3D"styled-by-prettify">=C2=A0 =C2=A0 </span><span s=
tyle=3D"color: #008;" class=3D"styled-by-prettify">template</span><span sty=
le=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"=
color: #008;" class=3D"styled-by-prettify">typename</span><span style=3D"co=
lor: #000;" class=3D"styled-by-prettify"> T</span><span style=3D"color: #66=
0;" class=3D"styled-by-prettify">&gt;</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 </span><span style=3D"color: #=
008;" class=3D"styled-by-prettify">constexpr</span><span style=3D"color: #0=
00;" class=3D"styled-by-prettify"> </span><span style=3D"color: #008;" clas=
s=3D"styled-by-prettify">auto</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> cast </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">[=
](</span><span style=3D"color: #008;" class=3D"styled-by-prettify">auto</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span =
style=3D"color: #660;" class=3D"styled-by-prettify">&amp;&amp;</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"> args</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"style=
d-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"><br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 </span><span style=3D"color: #008;" c=
lass=3D"styled-by-prettify">return</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> T</span><span style=3D"color: #660;" class=3D"styl=
ed-by-prettify">(</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">args </span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">...</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">);</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> =C2=A0</span><span st=
yle=3D"color: #800;" class=3D"styled-by-prettify">// ignored</span><span st=
yle=3D"color: #800;" class=3D"styled-by-prettify"> std::forward for brevity=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0=
 =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><br></=
span></div></code></div><div><br></div><div>Demo : http://coliru.stacked-cr=
ooked.com/a/9cb2e86b89e53188<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/47068c1a-f6ab-449e-83b3-94c525693f96%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/47068c1a-f6ab-449e-83b3-94c525693f96=
%40isocpp.org</a>.<br />

------=_Part_1503_1680522759.1536679433460--

------=_Part_1502_739879060.1536679433459--

.


Author: mutant.sheepdog@gmail.com
Date: Tue, 11 Sep 2018 23:40:29 -0700 (PDT)
Raw View
------=_Part_1985_870385420.1536734430084
Content-Type: multipart/alternative;
 boundary="----=_Part_1986_379564280.1536734430085"

------=_Part_1986_379564280.1536734430085
Content-Type: text/plain; charset="UTF-8"

If the type is already convertible to bool then std::any_of(std::begin(x),
std::end(x), std::identity); might work?

A cast operator for std::any_of(begin(x), end(x), std::cast<bool>) would
probably be nicer though.

Hopefully we get some form of abbreviated lambdas though as that might be
best:
std::any_of(begin(x), end(x), ($it) => it);

--
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/abac1d80-3c86-4d67-b078-8ebe28a9f0eb%40isocpp.org.

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

<div dir=3D"ltr"><div>If the type is already convertible to bool then std::=
any_of(std::begin(x), std::end(x), std::identity); might work?</div><div><b=
r></div>A cast operator for std::any_of(begin(x), end(x), std::cast&lt;bool=
&gt;) would probably be nicer though.<br><br>Hopefully we get some form of =
abbreviated lambdas though as that might be best:<br>std::any_of(begin(x), =
end(x), ($it) =3D&gt; it);<br></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/abac1d80-3c86-4d67-b078-8ebe28a9f0eb%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/abac1d80-3c86-4d67-b078-8ebe28a9f0eb=
%40isocpp.org</a>.<br />

------=_Part_1986_379564280.1536734430085--

------=_Part_1985_870385420.1536734430084--

.