Namespaces
Variants
Views
Actions

std::basic_streambuf::overflow

From cppreference.com
< cpp‎ | io‎ | basic streambuf
Revision as of 08:40, 10 May 2013 by P12 (Talk | contribs)

 
 
 
 
int_type overflow( int_type ch = traits::eof() );

Ensures that there is space at the put area for at least one character by saving some initial subsequence of characters starting at Template:rlpf 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 put area in the case of exhaustion.

Contents

Parameters

(none)

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().

Note

The Template:rlpf and Template:rlpf call this function in case of an overflow (pptr() == nullptr or pptr() >= epptr()).

Example

See also

Template:cpp/io/basic streambuf/dcl list uflowTemplate:cpp/io/basic streambuf/dcl list underflowTemplate:cpp/io/basic filebuf/dcl list overflowTemplate:cpp/io/basic stringbuf/dcl list overflowTemplate:cpp/io/strstreambuf/dcl list overflow