Hey people, I'm running into some problems with the MSVC 2005 Beta compiler. This code:
Gives me an error:Code:float nearest = std::numeric_limits<float>::max();
"not enough actual parameters for macro 'max'"
Using the "go to definition" feature, it zooms me over to windefs.h, in which apparently MS did this:
Code:#define max(a,b) (((a)>(b))?(a):(b))
Convenient for them, doubtless, but now I can't use std::numeric_limits<float>::max() (or for any other type).
So what I'd like to know is, is this standard behavior? Doesn't seem like it to me, but as I don't have a copy of the standard, I can't be sure. And, regardless, does anyone know of a neat/simple workaround I can do? i.e. Will undefining the macro after including <windows.h> have any horrible side effects?
Stupid WYSIWYG editor. For some reason, it keeps sticking that "Convenient for them" line into the code block.