UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
128 stars 16 forks source link

CRAN warning from concaveman.h #235

Closed mpadge closed 4 months ago

mpadge commented 4 months ago

This line:

https://github.com/UrbanAnalyst/dodgr/blob/e56ccf2a6a4f67e5c0df5d3baaaa4b69f4fd8a45/src/concaveman.h#L418

generates a warning on Fedora g++ that:

concaveman.h:418:48: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor] See the install log for details. used C++ compiler: ‘g++-14 (GCC) 14.1.0’

The lines from install log are then:

g++-14 -std=gnu++17 -I"/data/gannet/ripley/R/R-devel/include" -DNDEBUG -I. -I'/data/gannet/ripley/R/test-dev/Rcpp/include' -I'/data/gannet/ripley/R/test-dev/RcppParallel/include' -I'/data/gannet/ripley/R/test-dev/RcppThread/include' -I/usr/local/include    -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Wp,-D_FORTIFY_SOURCE=3 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection   -c concaveman.cpp -o concaveman.o
In file included from concaveman.cpp:1:
concaveman.h:418:48: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
  418 |     template<class... Args> CircularElement<T>(Args&&... args):
      |                                                ^~~~
concaveman.h:418:48: note: remove the '< >'
mpadge commented 4 months ago

That commit changed the offending line to this: https://github.com/UrbanAnalyst/dodgr/blob/ba669c4285eff1909e5d66ac2f6ee5c471ebdc04/src/concaveman.h#L418-L419