[#BloombergLP-bdls-FdStreamBuf-pbackfail]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FdStreamBuf.adoc[FdStreamBuf]::pbackfail
:relfileprefix: ../../../
:mrdocs:

If the optionally specified `c` is not given, move the current input position back one character and return the character at that position&period; Otherwise specify a value for `c` other than `traits&lowbar;type&colon;&colon;eof`&period; If `c` is equal to the previous character in the read buffer, the behavior is the same as if `eof()` was passed&period; If `c` is not eof and is not equal to the previous character in the putback buffer push the character `c` is back into the input buffer, if possible&period; Return the backed up character on success and `traits&lowbar;type&colon;&colon;eof()` otherwise&period; If the input buffer is readonly, or `gptr()` is already at the beginning of the input buffer, this object enters `INPUT&lowbar;PUTBACK&lowbar;MODE` and `c` is stuffed back into the putback buffer&period; Note that only `PBACK&lowbar;BUF&lowbar;SIZE` characters can be backed up into the putback buffer, if this limit is exceeded, `traits&lowbar;type&colon;&colon;eof()` will be returned&period; Also note that this method is called by public methods `sputbackc` or `sungetc` in the base class, and only when simply decrementing the current position in the input buffer won&apos;t satisfy the request, either because `c` doesn&apos;t match the previously input character, or because the input position is already at the beginning of the input buffer&period;

== Synopsis

Declared in `&lt;bdls&lowbar;fdstreambuf&period;h&gt;`

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


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