diff options
-rw-r--r-- | src/buildtool/common/artifact_digest.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildtool/common/artifact_digest.hpp b/src/buildtool/common/artifact_digest.hpp index ec3c65da..2ad94c27 100644 --- a/src/buildtool/common/artifact_digest.hpp +++ b/src/buildtool/common/artifact_digest.hpp @@ -90,6 +90,12 @@ class ArtifactDigest { } } + [[nodiscard]] auto operator<(ArtifactDigest const& other) const -> bool { + return (hash_ < other.hash_) or + ((hash_ == other.hash_) and (static_cast<int>(is_tree_) < + static_cast<int>(other.is_tree_))); + } + private: std::size_t size_{}; std::string hash_{}; |