coin-or / Couenne

Convex Over and Under Envelopes for Nonlinear Estimation
Eclipse Public License 1.0
72 stars 8 forks source link

Build error with g++ 12.2.0 #65

Closed joerg-mank closed 1 year ago

joerg-mank commented 2 years ago

When I try to compile Couenne (from this repository or with the help of conibrew) I get this error: ... CouenneMatrix.cpp:28:19: required from here /usr/include/c++/12.2.0/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const 770 | is_invocable_v<const _Compare&, const _Key&, const _Key&>, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/12.2.0/bits/stl_tree.h:770:15: note: 'std::is_invocable_v<const Couenne::CouenneSparseVector::compare_scalars&, Couenne::CouenneScalar* const&, Couenne::CouenneScalar* const&>' evaluates to false

I get the same error from building from scratch or with the help of coinbrew on my linux system. I am using g++ (GCC) 12.2.0 Any help would be appreciated.

svigerske commented 1 year ago

I cannot reproduce with current master, probably because I fixed this in fdfe17562c59518b4db478ca51c18ab5e01a59a5 over two years ago.

coinbrew builds the latest release (which is from Jan 2020) by default, so you may have to patch this up manually on your side in between coinbrew fetch and coinbrew build.