diff options
Diffstat (limited to 'src/buildtool/build_engine/expression/configuration.hpp')
-rw-r--r-- | src/buildtool/build_engine/expression/configuration.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buildtool/build_engine/expression/configuration.hpp b/src/buildtool/build_engine/expression/configuration.hpp index ec3fde66..dadb71d2 100644 --- a/src/buildtool/build_engine/expression/configuration.hpp +++ b/src/buildtool/build_engine/expression/configuration.hpp @@ -16,6 +16,7 @@ #define INCLUDED_SRC_BUILDTOOL_BUILD_ENGINE_EXPRESSION_CONFIGURATION_HPP #include <algorithm> +#include <compare> #include <cstddef> #include <functional> #include <optional> @@ -92,6 +93,10 @@ class Configuration { return expr_ == other.expr_; } + [[nodiscard]] auto operator<(const Configuration& other) const -> bool { + return expr_->ToHash() < other.expr_->ToHash(); + } + [[nodiscard]] auto hash() const noexcept -> std::size_t { return std::hash<ExpressionPtr>{}(expr_); } |