16 #ifndef GRPPI_COMMON_FILTER_PATTERN_H
17 #define GRPPI_COMMON_FILTER_PATTERN_H
19 #include <type_traits>
28 template <
typename Predicate>
45 return predicate_(std::forward<I>(item));
Representation of filter pattern. Represents a filter that can be used as a stage on a pipeline.
Definition: filter_pattern.h:29
bool operator()(I &&item) const
Invokes the predicate of the filter over a data item.
Definition: filter_pattern.h:44
filter_t(Predicate &&p) noexcept
Constructs a filter with a predicate.
Definition: filter_pattern.h:36
Definition: callable_traits.h:21
typename std::enable_if_t< is_filter< T >, int > requires_filter
Definition: filter_pattern.h:66
static constexpr bool is_filter
Definition: filter_pattern.h:63
Definition: filter_pattern.h:55