[Bug libstdc++/60711] basic_ostringstream,basic_ostream,u16string,char16_t do not work together

jmichae3 at yahoo dot com gcc-bugzilla@gcc.gnu.org
Tue Apr 1 01:35:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60711

--- Comment #10 from Jim Michaels <jmichae3 at yahoo dot com> ---
learned about std::streambuf.
when I went to use it (apparently a requirement in some cases and the only
thing that works for std::ostream now), the whole streambuf heirarchy is
protected except for std::filebuf, which is useless for just a plain old
ostream.

so, it seems, std::ostream is protected so I can't use it. stdstringbuf is
protected, making it useless.

at least put some examples in the standard c++ library documentation so mortals
know how to use this seemingly impossible new class heirarchy so I can do what
would seem to be simple things.

in the template defs, I see 
extern ostream cout;

but if I try do
std::ostream o; 
I get protected errors. this used to work. tried it with streambuf, streambuf
and stringbuf is protected now so I can't use them.

is 4.9.0 just buggy because it's hasn't been released yet?

I think the "this is not a bug" messages are bogus. streams are throrouhly
broken in x86_64-4.9.0-snapshot-20140219-rev207854-win32-sjlj-rt_v4 due to
overmuch protection.

f:\x86_64-4.9.0-snapshot-20140219-rev207854-win32-sjlj-rt_v4\mingw64\x86_64-w64-mingw32\include\c++\streambuf:463:7:
error: 'std::basic_streambuf<_CharT, _Traits>::basic_streambuf() [with _CharT =
char; _Traits = std::char_traits<char>]' is protected
grep.cpp:21:16: error: within this context

I am just saying something smells like a compiler bug here.



More information about the Gcc-bugs mailing list