Counts the number of elements of t satisfying predicates p.
#include <kumi/tuple.hpp>
#include <iostream>
#include <type_traits>
int main()
{
std::cout << std::boolalpha
<<
kumi::count_if( t, kumi::predicate<std::is_floating_point>() ) <<
"\n";
std::cout << std::boolalpha
<<
kumi::count_if( 2.3, kumi::predicate<std::is_floating_point>() ) <<
"\n";
}
constexpr std::size_t count_if(T const &ts, Pred p) noexcept
Counts the number of elements of t satisfying predicates p.
Definition: predicates.hpp:133
Fixed-size collection of heterogeneous values.
Definition: tuple.hpp:35