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:
@ -74,7 +74,9 @@ private:
|
||||
}
|
||||
|
||||
template<Config::Id Id> StringVec make_matchers() const {
|
||||
return seq_remove(config_db_.get<Id>(), is_rx);
|
||||
auto matchers{config_db_.get<Id>()};
|
||||
std::erase_if(matchers, is_rx);
|
||||
return matchers;
|
||||
}
|
||||
template<Config::Id Id> std::vector<Regex> make_rx_matchers() const {
|
||||
std::vector<Regex> rxvec;
|
||||
@ -234,7 +236,7 @@ ContactsCache::add(Contact&& contact)
|
||||
void
|
||||
ContactsCache::add(Contacts&& contacts, bool& personal)
|
||||
{
|
||||
personal = seq_find_if(contacts,[&](auto&& c){
|
||||
personal = std::ranges::find_if(contacts,[&](auto&& c){
|
||||
return is_personal(c.email); }) != contacts.cend();
|
||||
|
||||
for (auto&& contact: contacts) {
|
||||
|
||||
Reference in New Issue
Block a user