mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +01:00
Implement realisation operations on dummy store
This commit is contained in:
parent
6995d325ef
commit
266fbebe66
5 changed files with 62 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue