Title
Underspecified semantics for setbuf()
Status
tc1
Section
[streambuf.virt.buffer]
Submitter
Dietmar Kühl

Created on 1999-07-20.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [streambuf.virt.buffer], paragraph 3, Default behavior, to: "Default behavior: Does nothing. Returns this."

Date: 1999-07-20.00:00:00

The default behavior of setbuf() is described only for the situation that gptr() != 0 && gptr() != egptr(): namely to do nothing. What has to be done in other situations  is not described although there is actually only one reasonable approach, namely to do nothing, too.

Since changing the buffer would almost certainly mess up most buffer management of derived classes unless these classes do it themselves, the default behavior of setbuf() should always be to do nothing.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1711
1999-07-20 00:00:00admincreate