Question on library issue #581, using a sentry in flush()
  Home FAQ Contact Sign in
comp.lang.c++.moderated only
 
Advanced search
POPULAR GROUPS

more...

 Up
Question on library issue #581, using a sentry in flush()         

Group: comp.lang.c++.moderated · Group Profile
Author: Bo Persson
Date: May 2, 2008 02:50

This would have gone to comp.std.c++, had it been active.

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?

Bo Persson

--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
4 Comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
US-NY: Flushing-Teller - Part Time - 20hrs - Queens, NY (North Flushing)...aol.neighborhood.ny.newyork ·
US-NY: Flushing-Teller (Part time) Queens, NY (Downtown Flushing) 30 Hoursalt.bestjobsusa.jobs.offered ·