migrate to std::ranges

Move the various seq_ functions, as well as std::(stable_)sort,
std::accumulate, std::transform, std::find, std::find_if to their C++20
std::ranges counterparts.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-24 21:28:58 +03:00
committed by Seth Ladygo
parent 1b42ad6099
commit 4489d513be
29 changed files with 71 additions and 131 deletions

View File

@ -49,7 +49,7 @@ Mu::mu_cmd_move(Mu::Store& store, const Options& opts)
"Must have at least one of destination and flags");
else if (!dest.empty()) {
const auto mdirs{store.maildirs()};
if (!seq_some(mdirs, [&](auto &&d){ return d == dest;}))
if (!std::ranges::any_of(mdirs, [&](auto &&d){ return d == dest;}))
return Err(Error{Error::Code::InvalidArgument,
"No maildir '{}' in store", dest}
.add_hint("Try 'mu mkdir'"));