kumi
v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
◆
any_of()
[1/2]
template<product_type T>
constexpr auto kumi::any_of
(
T &&
ts
)
inline
constexpr
noexcept
Computes the reduction of a tuple over the
||
operator.
Parameters
ts
Value to process.
Returns
The evaluation of
get<0>(ts) || ... || get<N-1>(ts)
where
N
is the size of
ts
.
Example:
#include <kumi/kumi.hpp>
#include <iostream>
int
main()
{
auto
t =
kumi::tuple
{1,2.,3.f};
std::cout << std::boolalpha <<
kumi::all_of
( t, [](
auto
e) {
return
e < 5; }) <<
"\n"
;
auto
u =
kumi::tuple
{
true
,
false
,
true
,
false
};
std::cout << std::boolalpha <<
kumi::all_of
(u) <<
"\n"
;
}
kumi::all_of
constexpr auto all_of(T &&ts, Pred p) noexcept
Checks if unary predicate p returns true for all elements in the value t.
Definition
predicates.hpp:22
kumi::tuple
Fixed-size collection of heterogeneous values.
Definition
tuple.hpp:37
kumi