This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
std::cin, std::cerr, std::clog behaviour
- From: "Gary Hughes" <geh at itga dot com dot au>
- To: <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 24 Oct 2003 10:12:08 +1000
- Subject: std::cin, std::cerr, std::clog behaviour
- Organization: ITG Australia Ltd
- Reply-to: <geh at itga dot com dot au>
Hi,
I have recently upgraded from gcc 2.9.3 to gcc 3.3 and have noticed a
difference in the behaviour of these streams I was not expecting.
Under 2.95.3 writing a string such as "blah blah" to any of these streams
would result in a single call to write(). Under 3.3 this behaviour is the
same for std::cout, but std::cerr and std::clog call write() for each
character in the string.
What is the reason for this? Is it dictated by the standard or is it an
implementation issue? I assume it has something to do with buffering but it
seems very inefficient to me.
Thanks.
Gary.