[Project-managers] min/max definition is removed from CoinFinite.hpp [was: CoinFloatEqual now breaks Bonmin trunk]

Laszlo Ladanyi ladanyi at us.ibm.com
Tue Sep 16 23:08:53 EDT 2008


If you don't use CoinUtils then just delete this email...

If you do then you should know that the '#define min' (and max) is removed 
from CoinUtils/trunk. This was done in response to 
https://projects.coin-or.org/CoinUtils/ticket/55

I made the change in CoinUtils after some reflection...

A ticket was filed against CoinUtils because it failes to compile if a lib 
is used that declares min/max. In CoinFinite.hpp we have checked for '#ifndef 
min', and if it was not defined then we have defined it. This fails badly if 
min() is a library function. The right thing to do is not to use min() but use 
CoinMin(), or alternatively, to use std::min(). But it should be specified 
which min to use since it's a very general word and we should not define it.

I have fixed it in Cbc and in everything it depends on.

I could have posted to the PM list, though... Well, better late than never :-)

--Laci

On Tue, 16 Sep 2008, Kipp Martin wrote:

> Hi Stefan:
>
> A warning -- Bonmin trunk is now going to break nightlyBuild for Bonmin and 
> OS.
>
> The new change
>
> max/min to CoinMax/CoinMin
>
>
> in CoinFloatEqual.cpp in CoinUtils breaks Bonmin trunk.  In Bonmin trunk, 
> BonOaDecBase.cpp, BonAmplTMINLP.cpp, and BonOsiTMINLPInterface.cpp need to 
> reflect the above change to work.
>
> I have posted a ticket.
>
>
> https://projects.coin-or.org/Bonmin/ticket/33
>
>
> Cheers,
>
> PS -- SYMPHONY now seems to be working again, Menal made the change, thanks 
> for catching this.
>
>
>
> -- 
> Kipp Martin
> Visiting Professor
> University of Cincinnati
> College of Business
> Dept. of QAOM
> 525 Lindner Hall
> Cincinnati, OH  45221-0130
>
> 513-556-0404
>
> kipp.martin at chicagogsb.edu
> http://homepages.uc.edu/~martinrk/
> https://projects.coin-or.org/OS
> http://www.coin-or.org
>


More information about the Project-managers mailing list