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.
Following is the declaration for std::basic_stringbuf::overflow.
int_type overflow (int_type c = traits_type::eof());
cCharacter to be put back.
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.
Basic guarantee − if an exception is thrown, the object is in a valid state.
It modifies the basic_stringbuf object.