| protected: virtual int_type pbackfail( int_type c = EOF ); |
(deprecated in C++98) (removed in C++26) |
|
This protected virtual function is called by the public functions basic_streambuf::sungetc and basic_streambuf::sputbackc (which, in turn, are called by basic_istream::unget and basic_istream::putback).
pbackfail() is called with no arguments or with EOF as the argument)strstreambuf has no external character source to re-read).basic_streambuf::gptr(), e.g. by calling gbump(-1).pbackfail() is called with the character that needs to be put back), in which case(char)c, then simply decrements basic_streambuf::gptr().const array), fails.basic_streambuf::gptr() and writes c to the location pointed to gptr() after adjustment.Parameters
| c | - | the character to put back, or Traits::eof() to indicate that backing up of the get area is requested
|
Return value
c on success except if c was EOF, in which case unspecified value other than EOF is returned.
EOF on failure.
Example
Reason: no example
See also
| [virtual] |
puts a character back into the input sequence, possibly modifying the input sequence (virtual protected member function of std::basic_streambuf<CharT,Traits>) |
| moves the next pointer in the input sequence back by one (public member function of std::basic_streambuf<CharT,Traits>) | |
| puts one character back in the input sequence (public member function of std::basic_streambuf<CharT,Traits>) | |
| unextracts a character (public member function of std::basic_istream<CharT,Traits>) | |
| puts a character into input stream (public member function of std::basic_istream<CharT,Traits>) |
Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.