mrzv / dionysus

Library for computing persistent homology
http://mrzv.org/software/dionysus2
Other
144 stars 31 forks source link

clang-18 fails to compile dionysus: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'Index' (aka 'unsigned int') in initializer list #63

Closed yurivict closed 2 months ago

yurivict commented 2 months ago
/wrkdirs/usr/ports/math/py-dionysus/work/dionysus-2.0.10/bindings/python/boundary.cpp:71:75: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'Index' (aka 'unsigned int') in initializer list [-Wc++11-narrowing-const-reference]
   71 |             m.column(n - 1 - x.index()).emplace_back(Entry { x.element(), n - 1 - i });
      |                                                                           ^~~~~~~~~
1 error generated.

log

Version: 2.0.10 FreeBSD 14.0

mrzv commented 2 months ago

@yurivict Thanks. This should be fixed now.