Skip to content

Conversation

@elbeno
Copy link
Contributor

@elbeno elbeno commented Nov 14, 2025

Problem:

  • Custom predicates on fields can be difficult to apply.
  • Match machinery is not SFINAE-friendly.
  • Message callbacks require a user-supplied matcher which is often just always.

Solution:

  • Allow with_predicate on fields which receives the field value, rather than needing to receive the message and extract the field.
  • Apply SFINAE-friendly return types to and, or and not match combinators.
  • Allow msg::callback to be constructed without an extra matcher, just using the message's built-in matcher.

Problem:
- Custom predicates on fields can be difficult to apply.
- Match machinery is not SFINAE-friendly.
- Message callbacks require a user-supplied matcher which is often just `always`.

Solution:
- Allow `with_predicate` on fields which receives the field value, rather than
  needing to receive the message and extract the field.
- Apply SFINAE-friendly return types to `and`, `or` and `not` match combinators.
- Allow `msg::callback` to be constructed without an extra matcher, just using
  the message's built-in matcher.
@bdeane-intel bdeane-intel merged commit 3654f04 into intel:main Nov 17, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants