About endl...

Jean-Marc Valin valj01@gel.usherb.ca
Mon Nov 27 17:52:00 GMT 2000


> A simple workaround maybe to invoke output as
> 
>   output(endl<char>);
> 
> since 'endl<char>' is a function, and has a type.

With that, I get a "parse error before `>'", but I don't want to use this
workaround anyway, since it would not be portable (it would break other
libstdc++ implementations, like v2).

> The real way to go would be to make your wrapper a streambuf instead.
> The iostream interface is not designed to be inherited from nor to be
> wrapped.

Would wrapping a streambuf be more portable than the previous (simple)
workaround? 

> For more details, look at various postings about iostreams by Dietmar
> Kuehl, and the book "Standard C++ IOStreams and Locales" by Angelika
> Langer and Klaus Kreft, ISBN 0-201-18395-1.

Thanks for the reference... any online doc that you're aware of?

	Jean-Marc

-- 
Jean-Marc Valin
Universite de Sherbrooke - Genie Electrique
valj01@gel.usherb.ca


More information about the Libstdc++ mailing list