Compartir a través de


basic_stringbuf::overflow

A protected virtual function that can be called when a new character is inserted into a full buffer.

virtual int_type overflow(
   int_type _Meta = traits_type::eof( )
);

Parameters

  • _Meta
    The character to insert into the buffer, or traits_type::eof.

Return Value

If the function cannot succeed, it returns traits_type::eof. Otherwise, it returns traits_type::not_eof(_Meta).

Remarks

If _Meta does not compare equal to traits_type::eof, the protected virtual member function tries to insert the element traits_type::to_char_type(_Meta) into the output buffer. It can do so in various ways:

  • If a write position is available, it can store the element into the write position and increment the next pointer for the output buffer.

  • It can make a write position available by allocating new or additional storage for the output buffer. Extending the output buffer this way also extends any associated input buffer.

Requirements

Header: <sstream>

Namespace: std

See Also

Concepts

basic_stringbuf Class

basic_stringbuf Members

iostream Programming

iostreams Conventions