GNU extensions

Carlo Wood carlo@alinoe.com
Wed Jun 20 16:49:00 GMT 2001


On Wed, Jun 20, 2001 at 01:30:44PM -0700, Scott Johnston wrote:
> The fdbuf/ofdstream example submitted by Carlo Wood is useful, but has
> problems.  Specifically any call to ostream::put disables subsequent
> output on the stream for some reason (i.e. fdbuf::overflow is never
> invoked again).  The workaround is to exclusively use the "<<" operator.

I am aware of that - I never intended this class to be used 'by users' ;).
Its a kludge, used internally by my library, exclusively in debug code,
for one specific task: writing debug output to a pipe(2), indeed by only
using operator<< in the few (fixed) lines where it is used.

If it is added to some FAQ as "general file descriptor class", then please
don't add my name to it -- I got a reputation to keep up of "only writing
robust, bug free code" ;).

The given uflow method is not conforming to the standard either if I remember
correctly... I did remove code from it that I had written at first because I
realized it would never be used anyway in my case.

-- 
Carlo Wood <carlo@alinoe.com>



More information about the Libstdc++ mailing list