cmoon::meta::value_list<Values...>::none_of





template<class F>
[[nodiscard]] static constexpr bool none_of(F&& func) noexcept(/* see below */);


(1)

Checks every value against the given predicate.

Parameters

func - The predicate

Return value

true if std::invoke(func, Values) is false for every value in Values..., false otherwise.

Exceptions

1) noexcept specification:



noexcept(std::conjunction_v<std::is_nothrow_invocable<F, decltype(Values)>...>)


Example



import <concepts>;

import cmoon.meta;

struct 
{
    template<std::integral T>
    constexpr bool operator()(T t) const noexcept
    {
        return t % 2 == 0;
    }
} is_even {};

int main()
{
    using vl = cmoon::meta::value_list<3, 5, 7>;

    static_assert(vl::none_of(is_even));
}