This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ library for egcs
- To: jbuck at synopsys dot com
- Subject: Re: C++ library for egcs
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Mon, 13 Apr 1998 21:23:04 +0200
- CC: egcs at cygnus dot com
- References: <199804101839.LAA29958@atrus.synopsys.com>
> Only for a pedantic meaning of "correct", that is that yes, it is a
> conforming program, but no, it doesn't do what the user wanted it to
> do when s/he wrote it, and the program won't link.
I was aiming at the pedantic aspect only. Later I found that it isn't
really the template that makes the usage you describe incompatible -
the namespace std alone would have done it. I.e.
class ostream;
namespace std{
class ostream;
}
using std::ostream;
is already illegal.
> But maybe you are on to something -- it occured to me that we might be
> able to use this fact to do a compatibility hack, if we munge the linker
> to remap foo(ostream&) into foo(basic_ostream<char>&) or add a
> compatibility library that has stub functions to do this.
A compatibility library might actually work. <iostream.h> would then
read
class ostream: public std::ostream{};
The only question is what ::cout would be.
Martin