gentoo/dev-cpp/tree/files/3.18-const.patch
Holger Hoffstätte 3cd4670949
dev-cpp/tree: fixes for gcc-16 compile/test failures
Also unhardcode g++ to allow building/testing with different compilers.

Closes: https://bugs.gentoo.org/964308
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/45767
Closes: https://github.com/gentoo/gentoo/pull/45767
Signed-off-by: Sam James <sam@gentoo.org>
2026-02-11 23:40:44 +00:00

24 lines
701 B
Diff

https://github.com/kpeeters/tree.hh/commit/0ee8b5a4c3a93814bbf465ffc56c296cf84f1832
From: Kasper Peeters <kasper.peeters@phi-sci.com>
Date: Fri, 17 Nov 2023 11:27:13 +0000
Subject: [PATCH] Fix const-correctness for comparison.
---
src/tree.hh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tree.hh b/src/tree.hh
index d460165..be45f99 100644
--- a/src/tree.hh
+++ b/src/tree.hh
@@ -505,7 +505,7 @@ class tree {
public:
compare_nodes(StrictWeakOrdering comp) : comp_(comp) {}
- bool operator()(const tree_node *a, const tree_node *b)
+ bool operator()(const tree_node *a, const tree_node *b) const
{
return comp_(a->data, b->data);
}