[PATCH] Implement DRs 60 and 63

Pétur Runólfsson peturr02@ru.is
Tue Sep 23 09:05:00 GMT 2003


This patch implements DR 63 (TC) and those parts of DR 60 (TC) that refer
to ostream manipulators and unformatted output functions.

I'm assuming that "does not behave as an [un]formatted output function"
in DR 60 means:

* Don't construct sentry objects
* Don't catch exceptions

Tested on i686-pc-linux-gnu.

Petur

2003-09-23  Petur Runolfsson  <peturr02@ru.is>

	* include/bits/ostream.tcc
	(basic_ostream::operator<<(basic_ostream& (*)(basic_ostream&)),
	basic_ostream::operator<<(basic_ios& (*)(basic_ios&)),
	basic_ostream::operator<<(ios_base& (*)(ios_base&))):
	Implement the resolution of DR 60 (TC): These are not formatted
	output functions so don't construct sentry objects and don't
	catch exceptions.
	(basic_ostream::put, basic_ostream::write): Implement the
	resolution of DR 63 (TC) by catching exceptions and setting
	badbit.
	(basic_ostream::flush): Implement the resolution of DR 60 (TC):
	This is not an unformatted output function so don't construct
	a sentry object.
	* testsuite/testsuite_io.h (sync_streambuf): Define.
	* testsuite/27_io/basic_ostream/flush/char/2.cc: New test.
	* testsuite/27_io/basic_ostream/inserters_other/char/5.cc: New test.
	* testsuite/27_io/basic_ostream/put/char/1.cc: New test.
	* testsuite/27_io/basic_ostream/write/char/1.cc: New test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dr60.diff
Type: application/octet-stream
Size: 17517 bytes
Desc: dr60.diff
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030923/ecfc0cce/attachment.obj>


More information about the Libstdc++ mailing list