Win32: Overloaded std::min and std::max
Hi all,
A day ago I stumbled upon a problem using std::min and std::max when having
included any boost header file on Win32 machine.
The following code should not compile, according to the C++ standard:
float f = 47.9999f;
long l = 47L;
std::max(f, l); // This should fail as the arguments aren't of the same
type.
But using boost (and Microsoft Visual C++ .NET 2003), it magically did. I
tracked down the problem and found a 'fix' in
A day ago I stumbled upon a problem using std::min and std::max when having included any boost header file on Win32 machine.
The following code should not compile, according to the C++ standard:
float f = 47.9999f; long l = 47L; std::max(f, l); // This should fail as the arguments aren't of the same type.
But using boost (and Microsoft Visual C++ .NET 2003), it magically did. I tracked down the problem and found a 'fix' in
that looks like this:
This workaround has been changed in Boost-1.32 and should no longer cause this problem. John.
participants (2)
-
boost@dalvander.com
-
John Maddock