Boost logo

Boost Users :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2005-01-19 14:09:22

At Wednesday 2005-01-19 11:12, you wrote:
>Scott Moore wrote:
>>I just switched from boost 1.31 to 1.32 and now any code that uses
>>std::min() or std::max() gives me this error with Visual Studio 2003:
>>ReportResults.cpp(791) : error C2589: '(' : illegal token on right side of
>>ReportResults.cpp(791) : error C2059: syntax error : '::'
>>I even tried something simple like this:
>>int i = std::min(1, 2);
>>And that fails as well.
>This is due to the min and max macros defined in <windows.h> (or one of
>the headers it includes).
>>If I switch back to boost 1.31, no problems. I'm sure there must be a
>>simple solution. Any help would be appreciated!
>The Boost config header win32.hpp used to disable these but no longer
>does. You can disable the macros yourself by defining NOMINMAX before
>including Windows headers.

remind me of the logic behind requiring the user to now #define NOMINMAX

>Boost-users mailing list

Victor A. Wagner Jr.
The five most dangerous words in the English language:
               "There oughta be a law"

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at