Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
275 stars 76 forks source link

gist/standalone-example fails to build: error: no matching function for call to 'branch' #103

Closed yurivict closed 3 years ago

yurivict commented 3 years ago

Describe the bug

clang-10 fails to compile it:

mygist.cpp:47:5: error: no matching function for call to 'branch'
    branch(*this, x, INT_VAR_NONE, INT_VAL_MIN);
    ^~~~~~
../../../gecode/int.hh:5071:3: note: candidate function not viable: no known conversion from 'Gecode::IntVarBranch ()' to 'Gecode::IntVarBranch' for 3rd argument
  branch(Home home, const IntVarArgs& x,
  ^
../../../gecode/int.hh:5081:3: note: candidate function not viable: no known conversion from 'Gecode::IntVarBranch ()' to 'TieBreak<Gecode::IntVarBranch>' for 3rd argument
  branch(Home home, const IntVarArgs& x,
  ^

gecode-6.2.0 clang-10 FreeBSD 12.2

zayenz commented 3 years ago

Thanks for reporting, the file seems to have been neglected for a long time. Will add a fix later.

If you want to fix it locally, the line should read

branch(*this, x, INT_VAR_NONE(), INT_VAL_MIN());
zayenz commented 3 years ago

Fixed in release/6.3.0 (85e2d67).