On 2 Mai, 12:43, "Bo Persson" <b...@[EMAIL PROTECTED]
> wrote:
> The resolution to issue 581
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2578.html#581
>
> requires that basic_ostream::flush creates a sentry object to verify
> the stream state.
>
> However, for streams with the unit_buf flag set, like std::err, the
> destructor of the sentry object will again call flush(). This seems to
> create an infinite recursion for
>
> std::cerr << std::flush;
>
> or even
>
> std::cerr << "Some message" << std::endl;
>
> Have I missed something here?
No, I agree with your analysis. Additionally the proposed
resolution references the wrong section by saying in
[ostream.unformatted]/7:
"Behaves as an unformatted output function (as described in
27.6.2.6.1,
paragraph 1).[..]"
because 27.6.2.6.1/p.1 describes the semantic of *formatted*
output functions.
Greetings from Bremen,
Daniel Krügler
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


|