lemon-graph: fix C++17 build

This commit is contained in:
Bouke van der Bijl 2024-02-13 12:01:18 +01:00
parent 91414c639f
commit c5f2f03426
2 changed files with 20 additions and 0 deletions

View file

@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
# error: no viable conversion from ...
doCheck = !stdenv.isDarwin;
patches = [
# error: ISO C++17 does not allow 'register' storage class specifier
./remove-register.patch
];
meta = with lib; {
homepage = "https://lemon.cs.elte.hu/trac/lemon";
description = "Efficient library for combinatorial optimization tasks on graphs and networks";

View file

@ -0,0 +1,15 @@
diff --git a/lemon/random.h b/lemon/random.h
index 8de74ede8a..f9861f3916 100644
--- a/lemon/random.h
+++ b/lemon/random.h
@@ -249,8 +249,8 @@ namespace lemon {
current = state + length;
- register Word *curr = state + length - 1;
- register long num;
+ Word *curr = state + length - 1;
+ long num;
num = length - shift;
while (num--) {