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

@ -196,11 +196,10 @@ run_scm(const Mu::Store& store, const Mu::Options& opts)
[](auto _data, auto _argc, auto _argv) {
mu_mod = scm_c_define_module ("mu", init_module_mu, &mu_data);
std::vector<char*> args;
std::transform(scm_args.begin(),
scm_args.end(), std::back_inserter(args),
[&](const std::string& strarg){
/* ahem...*/
return const_cast<char*>(strarg.c_str());
std::ranges::transform(scm_args, std::back_inserter(args),
[](const std::string& strarg){
/* ahem...*/
return const_cast<char*>(strarg.c_str());
});
scm_shell(args.size(), args.data());