This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/9925] ostrstream (buf, size) << "..." does not work properly
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Dec 2005 00:06:13 -0000
- Subject: [Bug c++/9925] ostrstream (buf, size) << "..." does not work properly
- References: <bug-9925-5583@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from igodard at pacbell dot net 2005-12-01 00:06 -------
Two bugs:
1) diagnostic, about location of deprecated files
2) constructor as non-const lvalue, where using a constructor as left-operand
of
"<<" produces screwey output.
I'm concerned about the second. I can write:
foo& f = foo();
so the constructor is yielding non-const. I can pass the constructor to a
function:
void bar(foo& f){}; bar(foo());
So why can't I pass a constructor to operator<< and get the correct output?
Emitting a diagnostic for this usage makes no sense to me.
Ivan
Ivan
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9925