[#bsl-basic_stringbuf-pbackfail-07] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::pbackfail :relfileprefix: ../../ :mrdocs: `pbackfail` overloads == Synopses Declared in `<bslstl_stringbuf.h>` Tries to back up the input sequence. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual int_type xref:bsl/basic_stringbuf/pbackfail-0d.adoc[pbackfail](int_type __c = traits_type::eof()); ---- [.small]#xref:bsl/basic_stringbuf/pbackfail-0d.adoc[_» more..._]# Put back the specified `character` into the input sequence so that the next character read from the input sequence will be `character`. If `character` is either `traits_type::eof()` or is the same as the previously read character from the input sequence, then adjust the current input position, `gptr`, back one position. If `character` is neither `traits_type::eof()` nor the character previously read from the input sequence, but this string buffer was opened for writing (`ios_base::out`), then adjust the input sequence back one position and write `character` to that position. Return the character that was put back on success and `traits_type::eof()` if either the input position is currently at the beginning of the sequence or if the previous character in the input sequence is not `character` and this buffer was not opened for writing. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual xref:bsl/basic_stringbuf/int_type.adoc[basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>::int_type] xref:bsl/basic_stringbuf/pbackfail-05.adoc[pbackfail](xref:bsl/basic_stringbuf/int_type.adoc[int_type] character = traits_type::eof()); ---- [.small]#xref:bsl/basic_stringbuf/pbackfail-05.adoc[_» more..._]# == Return Value eof() on failure, _some other value_ on success == Parameters [cols="1,4"] |=== | Name| Description | *__c* | The character to be inserted back into the sequence. |=== == Postconditions * The constraints of `gptr(),` `eback(),` and `pptr()` are the same as for `underflow().` [.small]#Created with https://www.mrdocs.com[MrDocs]#