GNU bug report logs -
#78419
[PATCH] daemon: Add const qualifier to comparison call operator.
Previous Next
Reported by: Dariqq <dariqq <at> posteo.net>
Date: Wed, 14 May 2025 07:42:02 UTC
Severity: normal
Tags: patch
Done: Dariqq <dariqq <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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(-)
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index a1f39d9a8bf..f80f69f2bb6 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -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;
base-commit: 5f5d84beccc180f1b51474c0e47eb6e0d0c9175f
--
2.49.0
This bug report was last modified 46 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.