KUMI v5.0.0
Gorgeous Garnet
Loading...
Searching...
No Matches
kumi::none_of

Callable object checking if a unary predicate p does not return true for any element in t. More...

Variables

constexpr none_of_t kumi::none_of {}

Detailed Description

Callable object checking if a unary predicate p does not return true for any element in t.

Variable Documentation

◆ none_of

none_of_t kumi::none_of {}
inlineconstexprnoexcept

On a record type, the function operates on the underlying elements of the fields.

Header file

#include <kumi/kumi.hpp>

Call Signature

namespace kumi
{
template<concepts::product_type T, typename Pred>
constexpr auto none_of(T && t, Pred p) noexcept;
template<concepts::product_type T, typename Pred>
constexpr auto none_of(T && t) noexcept;
}
constexpr none_of_t none_of
Definition predicates.hpp:289
Main KUMI namespace.
Definition algorithm.hpp:11

Parameters

  • t: Product Type to process
  • p: Unary predicate

Return value

  • The evaluation of !any_of(t,p).

Examples

  • Tuple
    #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";
    }
    Fixed-size collection of heterogeneous values.
    Definition tuple.hpp:35
  • Record
    #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 with distinct labels.
    Definition record.hpp:36