And Filter

template<typename ...Filters>
struct And

Logical AND - all filters must accept.

This filter combinator propagates only when ALL provided filters accept, implementing logical conjunction of multiple filter conditions.

Since

v0.1.0

// Example: Accept positive values within range
Signal<int, 10, And<IsPositive<int>, WithinRange<int, 0, 100>>> value(0);

Note

Preserves all filter states.

Warning

  • All filters must have valid operator() for comparison.

  • At least one filter must be provided.

Template Parameters:
typename ...Filters

Variadic filter types.

Public Functions

inline bool operator()(const auto &old_value, const auto &new_value) const

Public Members

mutable std::tuple<Filters...> filters

See Also