Is there a way to create a fstream object with a file descriptor as argument?
One can create in standard C++ a fstream object like this:
Code: Select all
istream infile( "foo.bar" );Code: Select all
istream infile( fds );BTW, fds is a file descriptor associated with a pipe (so I'm trying to read from a pipe, and that's why I don't have the name of the file).
However, I have seen that there are some implementations which allow it (see this, overload 3 in ifstream constructor). I know, this is AIX, but is it not possible to have it with gcc?
This is what I have:
Code: Select all
$ g++ -v
Leyendo especificaciones de /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/specs
Configurado con: /var/tmp/portage/gcc-3.4.5-r1/work/gcc-3.4.5/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.5 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.5/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Modelo de hilos: posix
gcc versión 3.4.5 (Gentoo Hardened 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9)TIA and Regards



