[Patch] Fix libstdc++/9320
Benjamin Kosnik
bkoz@redhat.com
Tue Feb 11 03:57:00 GMT 2003
>After a little reflection, this one too seems pretty obvious:
>the size parameter passed to the __gnu_cxx::stdio_filebuf
>constructors has nothing to do with the template parameter
>dependent type int_type: it's just the size of the buffer.
Right.
Hmmm. Yes, on mainline after 3.1, this was changed as well in
std_streambuf.h and other places, but size_t was used. You should
probably be consistent with the type used to indicate size in
std::streambuf, so size_t instead of streamsize.
Also, there is a generic traits class in testsuite_hooks precisely for
this reason. See:
using __gnu_cxx_test::pod_char;
It looks like the generic type-based compilation test for
classes didn't get done for this class, it's too bad.
See:
27_io/streambuf.cc
Other than these minor, minor issues, this looks ok.
-benjamin
More information about the Libstdc++
mailing list