Counts the number of elements of t not equivalent to false.
#include <kumi/tuple.hpp>
#include <iostream>
#include <type_traits>
int main()
{
auto t =
kumi::tuple{1, 0, 2.,
nullptr, 3.f,
false,
'z'};
std::cout << std::boolalpha <<
kumi::count(t ) <<
"\n";
std::cout << std::boolalpha <<
kumi::count(7.89) <<
"\n";
}
KUMI_TRIVIAL_NODISCARD constexpr std::size_t count(T const &ts) noexcept
Counts the number of elements of t not equivalent to false.
Definition: predicates.hpp:154
Fixed-size collection of heterogeneous values.
Definition: tuple.hpp:35