IsEven Filter

template<typename T>
struct IsEven

Filter that only accepts even integer values.

This filter propagates changes only when the new value is an even number, determined by checking if the value modulo 2 equals zero.

Since

v0.1.0

// Example: Only propagate even counts
Signal<int, 10, IsEven<int>> counter(0);

Warning

Only accepts integral types (int, long, etc.).

Template Parameters:
typename T

Integral type.

Public Functions

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

See Also