diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/storage/target_cache.hpp | 9 | ||||
-rw-r--r-- | src/buildtool/storage/target_cache_key.hpp | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/buildtool/storage/target_cache.hpp b/src/buildtool/storage/target_cache.hpp index cfd8534e..a45d3999 100644 --- a/src/buildtool/storage/target_cache.hpp +++ b/src/buildtool/storage/target_cache.hpp @@ -162,13 +162,4 @@ using ActiveTargetCache = TargetCache<true>; // NOLINTNEXTLINE(misc-header-include-cycle) #include "src/buildtool/storage/target_cache.tpp" -namespace std { -template <> -struct hash<TargetCacheKey> { - [[nodiscard]] auto operator()(TargetCacheKey const& k) const { - return std::hash<Artifact::ObjectInfo>{}(k.Id()); - } -}; -} // namespace std - #endif // INCLUDED_SRC_BUILDTOOL_STORAGE_TARGET_CACHE_HPP diff --git a/src/buildtool/storage/target_cache_key.hpp b/src/buildtool/storage/target_cache_key.hpp index e5d3ee1b..f4dc0586 100644 --- a/src/buildtool/storage/target_cache_key.hpp +++ b/src/buildtool/storage/target_cache_key.hpp @@ -38,4 +38,14 @@ class TargetCacheKey { Artifact::ObjectInfo id_; }; +namespace std { +template <> +struct hash<TargetCacheKey> { + [[nodiscard]] auto operator()(TargetCacheKey const& key) const noexcept + -> std::size_t { + return std::hash<Artifact::ObjectInfo>{}(key.Id()); + } +}; +} // namespace std + #endif // INCLUDED_SRC_BUILDTOOL_STORAGE_TARGET_CACHE_KEY_HPP |