Skip to content

Commit

Permalink
Use auto pack expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSchneid3r committed Jan 7, 2025
1 parent b8d0931 commit 19151d4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions include/albert/matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,18 @@ class ALBERT_EXPORT Matcher final
const QString &string() const;

///
/// Returns a Match for `string`.
/// Returns a \ref Match for `string`.
///
Match match(const QString &string) const;

///
/// Returns a Match for the given strings.
/// Returns the max \ref Match for the given strings.
///
template<typename... Args>
Match match(QString first, Args... args) const {
return std::max(match(first), match(args...));
}
Match match(QString first, auto... args) const
{ return std::max(match(first), match(args...)); }

///
/// Returns the max match for `strings`.
/// Returns the max \ref Match in the range of `strings`.
///
Match match(std::ranges::range auto &&strings) const
requires std::same_as<std::ranges::range_value_t<decltype(strings)>, QString>
Expand Down

0 comments on commit 19151d4

Please sign in to comment.