1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 20:16:03 +01:00

replace more std::unordered_* types by faster boost hash maps

This commit is contained in:
Philipp Otterbein 2025-09-06 14:21:48 +02:00 committed by Jörg Thalheim
parent 4f8c50fb77
commit 9f2b6a1b94
17 changed files with 75 additions and 71 deletions

View file

@ -4571,11 +4571,13 @@ struct RegexCache
std::regex regex;
/* No std::regex constructor overload from std::string_view, but can be constructed
from a pointer + size or an iterator range. */
cache.try_emplace_and_cvisit(re,
/*s=*/re.data(), /*count=*/re.size(), std::regex::extended,
cache.try_emplace_and_cvisit(
re,
/*s=*/re.data(),
/*count=*/re.size(),
std::regex::extended,
[&regex](const auto & kv) { regex = kv.second; },
[&regex](const auto & kv) { regex = kv.second; }
);
[&regex](const auto & kv) { regex = kv.second; });
return regex;
}
};