[bug#78419] daemon: Add const qualifier to comparison call operator.
Commit Message
* nix/libstore/build.cc (CompareGoalPtrs::operator()): Add const qualifier.
Change-Id: Ieccea071db53715ef808fe59c69429fe228b5f77
---
Hello,
I had to add this patch to build guix on Fedora 42 and got a template error without it.
It corresponds to this commit in nix from 2017:
https://github.com/NixOS/nix/commit/00e0c416ffccf6edb63fe7f4b01422915ff12f86
nix/libstore/build.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
base-commit: 5f5d84beccc180f1b51474c0e47eb6e0d0c9175f
@@ -94,7 +94,7 @@ typedef std::shared_ptr<Goal> GoalPtr;
typedef std::weak_ptr<Goal> WeakGoalPtr;
struct CompareGoalPtrs {
- bool operator() (const GoalPtr & a, const GoalPtr & b);
+ bool operator() (const GoalPtr & a, const GoalPtr & b) const;
};
/* Set of goals. */
@@ -192,7 +192,7 @@ protected:
};
-bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) {
+bool CompareGoalPtrs::operator() (const GoalPtr & a, const GoalPtr & b) const{
string s1 = a->key();
string s2 = b->key();
return s1 < s2;