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

◆ none_of() [2/2]

template<typename Pred, concepts::product_type Tuple>
bool kumi::none_of ( Tuple && ts,
Pred p )
inlinenodiscardconstexprnoexcept

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).

Examples:

#include <kumi/kumi.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";
auto u = kumi::tuple{0,0.,0.f};
std::cout << std::boolalpha << kumi::none_of( u ) << "\n";
}
constexpr bool none_of(Tuple &&ts, Pred p) noexcept
Checks if unary predicate p returns true for no elements in the value t.
Definition predicates.hpp:95
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:29
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
auto t = kumi::record{"a"_id = 1,"b"_id = 2.,"c"_id = 3.f};
std::cout << std::boolalpha << kumi::none_of( t, [](auto e) { return e > 10.; }) << "\n";
auto u = kumi::record{"a"_id = 0,"b"_id = 0.,"c"_id = 0.f};
std::cout << std::boolalpha << kumi::none_of( u ) << "\n";
}
Fixed-size collection of heterogeneous fields necessarily named, names are unique.
Definition record.hpp:29