KeySelector Filter¶
-
template<typename T, auto KeyFunc>
struct KeySelector¶ Filter that compares values by a key extracted via function.
This filter extracts a key from values using a compile-time function and propagates only when the keys differ, enabling custom comparison logic.
- Since
v0.1.0
// Example: Compare structs by ID field only struct Data { int id; float value; }; auto get_id = [](const Data& d) { return d.id; }; Signal<Data, 10, KeySelector<Data, get_id>> item({0, 0.0});Warning
KeyFuncmust be callable with argument of typeT.Return type of
KeyFuncmust supportoperator!=.
See Also¶
Utility Filters - Utility Filters Overview