| I/O manipulators | ||||
| Print functions(C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
| Synchronized Output | ||||
(C++20) | ||||
| Types | ||||
| Error category interface | ||||
(C++11) | ||||
(C++11) |
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
protected: virtualstd::streamsize showmanyc(); | ||
Estimates the number of characters available for input in the associated character sequence.underflow() is guaranteed not to returnTraits::eof() or throw an exception until at least that many characters are extracted.
Contents |
(none)
The number of characters that are certainly available in the associated character sequence, or-1 ifshowmanyc can determine, without blocking, that no characters are available. Ifshowmanyc returns-1,underflow() anduflow() will definitely returnTraits::eof or throw.
The base class version returns0, which has the meaning of "unsure if there are characters available in the associated sequence".
The name of this function stands for "stream: how many characters?", so it is pronounced "S how many C", rather than "show many C".
| This section is incomplete Reason: no example |
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 159 | C++98 | underflow() is guaranteed not to fail until at least showmanyc() characters are supplied | extended the guarantee to allow at leastshowmanyc() characters to be extracted |
| obtains the number of characters immediately available in the get area (public member function)[edit] | |
[virtual] | optionally provides the number of characters available for input from the file (virtual protected member function of std::basic_filebuf<CharT,Traits>)[edit] |