LessThan Filter

template<typename T, T Threshold>
struct LessThan

Filter that only accepts values less than a specified threshold.

This filter compares the new value against a compile-time threshold, propagating only when the new value is below it.

Since

v0.1.0

// Example: Only propagate values less than 50
Signal<int, 10, LessThan<int, 50>> humidity(100);

Warning

Only accepts arithmetic types (integral and floating-point).

Template Parameters:
typename T

Arithmetic type.

T Threshold

The threshold value.

Public Functions

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

See Also