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

◆ none_of() [1/2]

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

Checks no elements of a tuple are true.

Parameters
tsValue to process.
Returns
The evaluation of !any_of(ts).

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