[Coin-discuss] Macro definitions

Jesper Hansen jesper at carmen.se
Thu Aug 28 05:26:05 EDT 2003


Hi

I have problems with the macro definitions in CoinFinite.hpp. Why not
exchange them with templates like the following:

diff -r1.2 CoinFinite.hpp
46,57c46,52
< template<class T> inline
< const T& max(const T& a, const T& b)
< {
<       return (a<b) ? b : a;
< }
<
< template<class T> inline
< const T& min(const T& a, const T& b)
< {
<       return (a<b) ? a : b;
< }
---
> #  pragma warning(disable:4786)
> #if !defined(min)
> #define min(a,b)  (((a) < (b)) ? (a) : (b))
> #endif
> #if !defined(max)
> #define max(a,b)  (((a) > (b)) ? (a) : (b))
> #endif

'Jesper

--
Jesper Hansen                   mailto:jesper at carmenconsulting.com
Carmen Consulting, Fruebjergvej 3, Box 248, DK-2100 Kbh Ø, Denmark
Telephone: +45 39 17 83 80                 Mobile: +45 61 33 29 69
http://www.carmenconsulting.com






More information about the Coin-discuss mailing list