InSet Filter

template<typename T, T... Values>
struct InSet

Filter that accepts values in a compile-time set.

This filter checks if the new value matches any of the specified compile-time values, implementing set membership validation.

Since

v0.1.0

// Example: Accept only values 1, 3, 5, 7
Signal<int, 10, InSet<int, 1, 3, 5, 7>> odd(0);

Warning

  • At least one value must be provided.

  • Type T must support operator==.

Template Parameters:
typename T

Value type.

T... Values

Variadic values to accept.

Public Functions

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

See Also