C++ streambuf - overflow



Description

It is used to put character and writes c to the current position of the put pointer (pptr), and advances that pointer one position forward.

Declaration

Following is the declaration for std::basic_stringbuf::overflow.

int_type overflow (int_type c = traits_type::eof());

Parameters

cCharacter to be put back.

Return Value

It returns a value other than the end-of-file value (traits_type::eof()) is returned: If character c was successfully written on success or the end-of-file value on failure.

Exceptions

Basic guarantee − if an exception is thrown, the object is in a valid state.

Data races

It modifies the basic_stringbuf object.

streambuf.htm
Advertisements