I'm seeing strange errors when my C++ code has min() or max() calls. I'm using Visual C++ compilers.
Check if your code is including the windows.h header file and either your code or other third-party headers have their own min()/max() definitions. If yes, then prepend your windows.h inclusion with a definition of NOMINMAX like this:
#define NOMINMAX
#include <windows.h>
Maybe you could post some code showing how you're using these and some info about the difference between what you expected would happen versus what actually happened?
I deleted my original response when I saw you post your answer. Good one! :-)
I also wanted to see some example code (I was suspecting a logic error, since the question seemed vague). But now that I see the solution, I understand the reason for posing the question the way you did. It's one of those issues...the kind you go nuts trying to solve until you finally hit the answer, then you bang your head on your desk for ten minutes.
I haven't used it in years but from memory boost assigns min and max too, possibly?
Honestly, when it comes to min/max, I find it best to just define my own:
#define min(a,b) (a < b ? a : b)
#define max(a,b) (a >= b ? a : b)