kumi v3.1.0
Exquisite Epidote
 
Loading...
Searching...
No Matches

◆ none_of() [2/2]

template<typename Pred , typename Tuple >
KUMI_TRIVIAL_NODISCARD constexpr bool kumi::none_of ( Tuple const &  ts,
Pred  p 
)
constexprnoexcept

Checks if unary predicate p returns true for no elements in the value t.

Parameters
tsValue to process.
pUnary predicate.
Returns
The evaluation of !any_of(ts,p).

Example:

#include <kumi/tuple.hpp>
#include <iostream>
int main()
{
auto t = kumi::tuple{1,2.,3.f};
std::cout << std::boolalpha << kumi::none_of( t, [](auto e) { return e > 10.; }) << "\n";
std::cout << std::boolalpha << kumi::none_of( 8, [](auto e) { return e > 10.; }) << "\n";
auto u = kumi::tuple{0,0.,0.f};
std::cout << std::boolalpha << kumi::none_of( u ) << "\n";
}
KUMI_TRIVIAL_NODISCARD constexpr bool none_of(Tuple const &ts, Pred p) noexcept
Checks if unary predicate p returns true for no elements in the value t.
Definition: predicates.hpp:104
Fixed-size collection of heterogeneous values.
Definition: tuple.hpp:35