20 #ifndef GRPPI_COMMON_FILTER_PATTERN_H 21 #define GRPPI_COMMON_FILTER_PATTERN_H 23 #include <type_traits> 32 template <
typename Predicate>
49 return predicate_(std::forward<I>(item));
static constexpr bool is_filter
Definition: filter_pattern.h:67
Definition: callable_traits.h:26
filter_t(Predicate &&p) noexcept
Constructs a filter with a predicate.
Definition: filter_pattern.h:40
typename std::enable_if_t< is_filter< T >, int > requires_filter
Definition: filter_pattern.h:70
bool operator()(I &&item) const
Invokes the predicate of the filter over a data item.
Definition: filter_pattern.h:48
Representation of filter pattern. Represents a filter that can be used as a stage on a pipeline...
Definition: filter_pattern.h:33
Definition: filter_pattern.h:59