13 #ifndef TINYMPL_VARIADIC_COUNT_IF_HPP
14 #define TINYMPL_VARIADIC_COUNT_IF_HPP
16 #include <type_traits>
33 template<
template<
class ... T>
class F, class ... Args> struct
count_if;
35 template<
template<
class ... T>
class F, class Head, class ... Tail>
37 std::integral_constant < std::size_t,
38 count_if<F, Tail...>::type::value +
39 ( F<Head>::type::value ? 1 : 0 ) >
42 template<
template<
class ... T>
class F> struct
count_if<F> :
43 std::integral_constant<std::size_t, 0>
49 #endif // TINYMPL_VARIADIC_COUNT_IF_HPP
Counts the number of elements which satisfy a given predicate.
Definition: count_if.hpp:33