This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

B17, min/max incompatabilities


The following code:
 
  #include <windows.h>
  #include <algobase.h>
 
  int foo() {return 0;}
 
receives a pair of compilation errors within algobase.h complaining
that min and max are being used with the wrong numbers of arguments.
 
The problem is that Defines.h (included from windows.h) #define's min and
max as macros.  But algobase.h defines them as template functions.
 
The net result is that windowing programs cannot use any of the STL
features.
 
Fix: In algobase.h, add lines
  #undef min
  #undef max
 
 
Steve Zeil


-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]