This is the mail archive of the
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.firstname.lastname@example.org>
>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.
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:
It looks like the generic type-based compilation test for
classes didn't get done for this class, it's too bad.
Other than these minor, minor issues, this looks ok.