estdlib icon indicating copy to clipboard operation
estdlib copied to clipboard

Formalize nodata/eol notion

Open malachib opened this issue 1 year ago • 0 comments

iostream and streambufs both need awareness of a would-be block state.

iostream presents a challenge in that it follows a blocking pattern for its insertion and extraction operators. Even so, an awareness of why the streambuf kicked back and indicating via the (existing) nodatabit status is helpful.

streambuf presents a challenge because only eof status is available. Specifically, it depends on char_traits and it's nice to not have to use our custom char traits. However, by virtue of not doing so, returning a new eol status becomes hard.

Finally, this notion must apply to both input and output directions

streambuf::sync(bool* eol) is a compelling idea

malachib avatar Feb 11 '24 05:02 malachib