Skip to content

Commit

Permalink
New view: filter_by_currency
Browse files Browse the repository at this point in the history
  • Loading branch information
wichtounet committed Aug 26, 2023
1 parent d9c96f2 commit 01549ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/views.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ inline auto filter_by_type(std::string_view type) {
return std::views::filter([type] (const auto & element) { return element.type == type; });
}

inline auto filter_by_currency(std::string_view currency) {
return std::views::filter([currency] (const auto & element) { return element.currency == currency; });
}

inline auto filter_by_name(std::string_view name) {
return std::views::filter([name] (const auto & account) { return account.name == name; });
}
Expand Down

0 comments on commit 01549ba

Please sign in to comment.