MinSize Filter

template<typename T, size_t MinElements>
struct MinSize

Filter that accepts collections with minimum size.

This filter validates collection size and propagates only when the collection contains at least the specified minimum number of elements.

Since

v0.1.0

// Example: Accept vectors with at least 3 elements
Signal<std::vector<int>, 10, MinSize<std::vector<int>, 3>> data({});

Warning

  • Only supports std::vector types.

  • MinElements must be greater than 0.

Template Parameters:
typename T

Collection type (std::vector).

size_t MinElements

Minimum number of elements required.

Public Functions

inline bool operator()(const T &old_value, const T &new_value) const
template<typename U>
struct is_std_vector : public std::false_type

See Also