1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

Implement realisation operations on dummy store

This commit is contained in:
John Ericson 2025-09-27 16:30:36 -04:00
parent e06968ec25
commit 5592bb717b
5 changed files with 62 additions and 5 deletions

View file

@ -222,3 +222,22 @@ public:
};
} // namespace nix
template<>
struct std::hash<nix::Hash>
{
std::size_t operator()(const nix::Hash & hash) const noexcept
{
assert(hash.hashSize > sizeof(size_t));
return *reinterpret_cast<const std::size_t *>(&hash.hash);
}
};
namespace nix {
inline std::size_t hash_value(const Hash & hash)
{
return std::hash<Hash>{}(hash);
}
} // namespace nix