Topic: Why does basic_ostream not have pcount??
Author: Stephen Howe <sjhoweATdialDOTpipexDOTcom@giganews.com>
Date: Sat, 10 Jul 2010 01:25:53 CST Raw View
Hi
Why does in forthcoming C++0x, basic_ostream not have pcount() member function?
It gives the count of how many unformatted bytes were written out -
which could be less that what was asked for if disk is full,
say.
This would be symmetic to to basic_istream having gcount and is
roughly equivalent to C's stdio function fread()/fwrite()'s
return values.
I find it distinctly odd that
basic_istream has gcount()
and
strstreambuf has pcount()
strstream has pcount()
ostrstream has pcount()
but
basic_ostream has no equivalent pcount()
strstreambuf has no equivalent gcount()
strstream has no equivalent gcount()
istrstream has no equivalent gcount()
All very unsymmetrical
Thanks
Stephen Howe
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]