[#bsl-basic_stringbuf-overflow-09c]
= xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic&lowbar;stringbuf]::overflow
:relfileprefix: ../../
:mrdocs:

Consumes data from the buffer&semi; writes to the controlled sequence&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stringbuf&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int&lowbar;type
overflow(int&lowbar;type &lowbar;&lowbar;c = traits&lowbar;type&colon;&colon;eof());
----

== Description

Informally, this function is called when the output buffer is full (or does not exist, as buffering need not actually be done)&period; If a buffer exists, it is _consumed,_ with _some effect_ on the controlled sequence&period; (Typically, the buffer is written out to the sequence verbatim&period;) In either case, the character _c_ is also written out, if _&lowbar;&lowbar;c_ is not `eof()&period;`

For a formal definition of this function, see a good text such as Langer &amp; Kreft, or &lsqb;27&period;5&period;2&period;4&period;5&rsqb;&sol;3&hyphen;7&period;

A functioning output streambuf can be created by overriding only this function (no buffer area will be used)&period;

[NOTE]
====
Base class version does nothing, returns eof()&period;

====

== Return Value

eof() to indicate failure, something else (usually _&lowbar;&lowbar;c,_ or not&lowbar;eof())

== Parameters

[cols="1,4"]
|===
| Name| Description
| *&lowbar;&lowbar;c*
| An additional character to consume&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
