This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Version number misery
- To: Carlo Wood <carlo at alinoe dot com>
- Subject: Re: Version number misery
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Thu, 17 May 2001 23:12:43 -0700 (PDT)
- cc: libstdc++ at gcc dot gnu dot org
> Thanks to all for replying... but I need an ostream that writes
> to a pipe :/. The standard simply doesn't provide a way to link
> an open fd (returned by the pipe(2)) to an ofstream.
Listen to Gaby. It would be better to do this sensibly. I think Dietmar
might have written something like this up, but probably for FILEs: you
might want to email him, or search the web, or his homepage. It might
also be on boost.
Does sound useful though.
>From man:
pipe creates a pair of file descriptors, pointing to a
pipe inode, and places them in the array pointed to by
filedes. filedes[0] is for reading, filedes[1] is for
writing.
so filedes[0] could be linked to istream
filedes[1] to ostream
...
filebuf(fdopen(filedes[0]..), ios_base::in)
...
etc.
Could be interesting, I'd be interested in hearing what you come up with.
-benjamin