[ODE] 0.6 Release

Rodrigo Hernandez kwizatz at aeongames.com
Sun May 14 17:44:48 MST 2006


Of the top of my head it occurs to me that you could do

using namespace std;

and then remove the std:: prefixes, that way VC6 would use ::min and 
::max instead of std::min and std::max.

I preffer the std:: prefix because that way you know exactly which 
version of the function you're calling,
but I guess we can sacrifice that.

Also, you could check for VC6 on a preprocessor directive and define MIN 
and MAX:

#if (check for MSC Version here)
#define MIN(A,B) ((A>B) ? B:A)
#define MAX(A,B) ((A>B) ? A:B)
#else
#define MIN(A,B) std::min(A,B)
#define MAX(A,B) std::max(A,B)
#endif

and replace all std:: instances with either MIN or MAX

Jason Perkins wrote:

>I just got an email stating that convex.cpp does not build on VC6. I
>tried it myself, and it is complaining that 'min' and 'max' are not in
>the 'std' namespace. A quick google shows that VC6 indeed does have an
>issue with these functions. Does anyone have a workaround for this? I
>would be willing to apply and test.
>
>Thanks!
>
>Jason
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>
>  
>



More information about the ODE mailing list