This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3593: Overloading streambuf for ostream doesn't appear to work
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: libstdc++/3593: Overloading streambuf for ostream doesn't appear to work
- From: Stephen M. Webb <stephen at bregmasoft dot com>
- Date: Mon, 9 Jul 2001 13:29:52 -0400
- Organization: CRYPTOCard Corporation
- Reply-To: stephen at bregmasoft dot com
The sample program in this bug report made assumptions about the
representational value of underlying constants. The streambuf::overflow()
member function must return traits_type::eof() to failure, and the arbitrary
value returned in the example just happens to map to traits_type::eof().
When the return value of the streambuf::overflow() member function is changed
from "return 0;" to "return traits_type::not_eof(c);", the sample program works
as expected.
This is not a bug in the application code and not in the library. The PR
should be closed.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3599&database=gcc
-------
Stephen M. Webb