This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error in stl_bvector.h and vector.tcc


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.


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