| 123456789101112131415161718 |
- #pragma once
- namespace matcher {
- template <typename Pred>
- struct predicate_t {
- Pred predicate;
- };
-
- template <typename T, typename Pred>
- bool operator==(T const & t, predicate_t<Pred> const & of) {
- return of.predicate(t);
- }
-
- template <typename Pred>
- predicate_t<Pred> matches(Pred && args) {
- return {args};
- }
- }
|