This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Error in stl_bvector.h and vector.tcc
- From: "Gabriel Dos Reis" <gdr at acm dot org>
- To: Sabba dot Hillel at verizon dot net
- Cc: pcarlini at suse dot de, gdr at acm dot org, gcc at gcc dot gnu dot org
- Date: Thu, 10 Jun 2004 08:57:57 +0200 (CEST)
- Subject: Re: Error in stl_bvector.h and vector.tcc
- References: <20040609171435.MFZC29216.out009.verizon.net@outgoing.verizon.net>
- Reply-to: gdr at acm dot org
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.