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]

Re: C++ library for egcs


> 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


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