This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++/9320
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 10 Feb 2003 21:56:38 -0600
- Subject: Re: [Patch] Fix libstdc++/9320
- References: <3E455DF0.9050506@unitus.it>
>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