Title
cerr::tie() and wcerr::tie() are overspecified
Status
cd1
Section
[iostream.objects]
Submitter
Bill Plauger

Created on 2004-01-30.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

[ Sydney: straw poll (3-1): we should require, not just permit, cout and cerr to be tied on startup. Pre-Redmond: Bill will provide wording. ]

Date: 2010-10-21.18:28:33

Proposed resolution:

Add to the description of cerr:

After the object cerr is initialized, cerr.tie() returns &cout. Its state is otherwise the same as required for basic_ios<char>::init (lib.basic.ios.cons).

Add to the description of wcerr:

After the object wcerr is initialized, wcerr.tie() returns &wcout. Its state is otherwise the same as required for basic_ios<wchar_t>::init (lib.basic.ios.cons).

Date: 2004-01-30.00:00:00

Both cerr::tie() and wcerr::tie() are obliged to be null at program startup. This is overspecification and overkill. It is both traditional and useful to tie cerr to cout, to ensure that standard output is drained whenever an error message is written. This behavior should at least be permitted if not required. Same for wcerr::tie().

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2698
2010-10-21 18:28:33adminsetmessages: + msg2697
2004-01-30 00:00:00admincreate