summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildtool/common/artifact.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildtool/common/artifact.hpp b/src/buildtool/common/artifact.hpp
index b41c4300..36f3e3d4 100644
--- a/src/buildtool/common/artifact.hpp
+++ b/src/buildtool/common/artifact.hpp
@@ -48,6 +48,14 @@ class Artifact {
return not(*this == other);
}
+ [[nodiscard]] auto operator<(ObjectInfo const& other) const -> bool {
+ return (digest < other.digest) or
+ ((digest == other.digest) and (type < other.type)) or
+ ((digest == other.digest) and (type == other.type) and
+ (static_cast<int>(failed) <
+ static_cast<int>(other.failed)));
+ }
+
// Create string of the form '[hash:size:type]'
[[nodiscard]] auto ToString(bool size_unknown = false) const noexcept
-> std::string {