[Bonmin] Bonmin compilation errors

David Wilkinson xyz-coin at effisols.com
Fri Sep 4 16:56:46 EDT 2020


I have recently been trying to compile Bonmin for Visual C++ 2017 and 
2019, and the compiler is picking up some errors that I did not see with 
Visual C++ 2015 or earlier.

Our code base is using Bonmin 1.8.6, but the same problems remain in 
Bonmin 1.8.8.

In BonQuadRow.cpp, lines 92 and 93 there is:

g_.empty();
a_grad_idx_.empty();

Surely these should be

g_.clear();
a_grad_idx_.clear();

And, perhaps not an error, but in line 266 of BonQuadRow.cpp there is:

e = std::make_pair(Q_.jCol_[i] + offset, Q_.iRow_[i] + offset);

where offset is a bool. This can be fixed with an explicit cast, or by 
something like

int ioffset = offset ? 1 : 0;
e = std::make_pair(Q_.jCol_[i] + ioffset, Q_.iRow_[i] + ioffset);

Thanks,

David Wilkinson


More information about the Bonmin mailing list