[#bsl-basic_syncbuf-underflow]
= xref:bsl.adoc[bsl]::xref:bsl/basic_syncbuf.adoc[basic&lowbar;syncbuf]::underflow
:relfileprefix: ../../
:mrdocs:

Fetches more data from the controlled sequence&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int&lowbar;type
underflow();
----

== Description

Informally, this function is called when the input buffer is exhausted (or does not exist, as buffering need not actually be done)&period; If a buffer exists, it is _refilled&period;_ In either case, the next available character is returned, or `traits&colon;&colon;eof()` to indicate a null pending sequence&period;

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

A functioning input streambuf can be created by overriding only this function (no buffer area will be used)&period; For an example, see https&colon;&sol;&sol;gcc&period;gnu&period;org&sol;onlinedocs&sol;libstdc&plus;&plus;&sol;manual&sol;streambufs&period;html

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

====

== Return Value

The first character from the _pending sequence_&period;


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