std::basic_streambuf<CharT,Traits>::showmanyc

Estimates the number of characters available for input in the associated character sequence. underflow() is guaranteed not to return Traits::eof() or throw an exception until at least that many characters are extracted.

# Declarations

protected:
virtual std::streamsize showmanyc();

# Return value

The number of characters that are certainly available in the associated character sequence, or -1 if showmanyc can determine, without blocking, that no characters are available. If showmanyc returns -1, underflow() and uflow() will definitely return Traits::eof or throw.

# Notes

The name of this function stands for “stream: how many characters?”, so it is pronounced “S how many C”, rather than “show many C”.

# Example

This section is incompleteReason: no example

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 159C++98underflow() is guaranteed not to fail untilat least showmanyc() characters are suppliedextended the guarantee to allow at leastshowmanyc() characters to be extracted

# See also