Error in stl_bvector.h and vector.tcc

Gabriel Dos Reis gdr@acm.org
Thu Jun 10 06:58:00 GMT 2004


You Wrote Hillel  Markowitz
> The following code causes gcc-3.4.0 to find a compile error in
> stl_bvector.h and vector.tcc
>
> #include <fstream>
>
> #ifdef __cplusplus
> extern "C"
> {
> #ifndef max
> #define max(x,y) ( ((x) > (y)) ? (x) : (y) )
> #endif

You're asking for troubles. min/max are C++ library function
names and you may not #define them if you intend to use the
standard library.  The problem is in the program, not in the library.



More information about the Gcc mailing list