This is the mail archive of the gcc-bugs@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]

STL pair problem in RH6's 1.1.2


The stl pair tries to initialize the pair using constructors of
it's templated variables, but egcs thinks it's typecasting and gives a
typecast error.

the error is like: ANSI forbits casting to an array type


the code in stl_pair looks something like: 

template<class T1, class T2> struct pair{
T1 first;
T2 second;

pair(): first(T1()), second(T2()) {}
              ^^^^          ^^^^


};


version info: this error occured on RH6's ecgs 1.1.2 and RH5.2's 1.0.4?
errors occur on both stdc++ v 2.8.0 and 2.9.0


Preferably, I wouldn't like to alter the headers.
If you could help me with this/patch egcs to process this properly, please
email me at root@lar.dyndns.org


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