mu-threads: improve sorting, duplicate handling

And add some more tests.
This commit is contained in:
Dirk-Jan C. Binnema
2021-01-27 22:28:58 +02:00
parent 1b3fd722ef
commit e5a52e45fd
2 changed files with 205 additions and 134 deletions

View File

@ -109,10 +109,18 @@ struct QueryMatch {
return date_key < rhs.date_key;
}
bool has_flag (Flags flag) const;
};
MU_ENABLE_BITOPS(QueryMatch::Flags);
inline bool
QueryMatch::has_flag(QueryMatch::Flags flag) const
{
return any_of(flags & flag);
}
inline std::ostream&
operator<<(std::ostream& os, QueryMatch::Flags mflags)
{