Date
2003-09-24.00:00:00
Message id
2621

Content

27.7.1.3 par 8 says:

Notes: The function can make a write position available only if ( mode & ios_base::out) != 0. To make a write position available, the function reallocates (or initially allocates) an array object with a sufficient number of elements to hold the current array object (if any), plus one additional write position. If ( mode & ios_base::in) != 0, the function alters the read end pointer egptr() to point just past the new write position (as does the write end pointer epptr()).

The sentences "plus one additional write position." and especially "(as does the write end pointer epptr())" COULD by interpreted (and is interpreted by at least my library vendor) as:

post-condition: epptr() == pptr()+1

This WOULD force sputc() to call the virtual overflow() each time.

The proposed change also affects Defect Report 169.