Namespaces
Variants
Views
Actions

std::basic_streambuf::overflow

From cppreference.com
 
 
 
 
int_type overflow( int_type ch = traits::eof() );

Ensures that there space at the put area for at least one character by saving some initial subsequence of characters starting at pbase() to the output sequence and updating the pointers to the output area (if needed). If ch is not traits::eof() (i.e. traits::eq_int_type(c, traits::eof()) != true), it is either put to the output area or directly saved to the output sequence.

The function may update pptr, epptr and pback pointers to define the location to write more data. On failure, the function ensures that either pptr() == nullptr or pptr() == epptr.

The base class version of the function does nothing. The derived classes may override this function to allow updates to the get area in the case of exhaustion.

Contents

[edit] Parameters

(none)

[edit] Return value

Returns unspecified value not equal to traits::eof() on success, traits::eof() on failure.

The base class version of the function returns traits::eof().

[edit] Note

The sputc() and sputn() call this function in case of an overflow (pptr() == nullptr or pptr() >= epptr()).

[edit] Example

[edit] See also

[virtual]
reads characters from the associated input sequence to the get area and advances the next pointer
(virtual protected member function) [edit]
[virtual]
reads characters from the associated input sequence to the get area
(virtual protected member function) [edit]
[virtual]
writes characters to the associated file from the put area
(virtual protected member function of std::basic_filebuf) [edit]
[virtual]
appends a character to the output sequence
(virtual protected member function of std::basic_stringbuf) [edit]
[virtual]
appends a character to the output sequence, may reallocate or initially allocate the buffer if dynamic and not frozen
(virtual protected member function of std::strstreambuf) [edit]