protected virtual member function
<streambuf> <iostream>
Get number of characters available
Virtual function (to be read s-how-many-c) called by other member functions to get an estimate on the number of characters available in the associated input sequence.
It is called by public member function streambuf::in_avail when there are no read positions available at the get pointer (gptr).
The return value provides information on the possible behavior of the protected member functions underflow and uflow:
return value | description | expected behavior for underflow and uflow |
>0 | characters known to be available | Successive calls will succeed in retrieving characters until at least as many characters as the value returned have been extracted. |
0 | no information | Further calls may either retrieve more characters or return traits_type::eof(). |
-1 | sequence unavailable | Further calls will fail (either throwing or returning "immediately"). |
Its default behavior in streambuf is to always return zero. filebuf overrides this member function (see filebuf::showmanyc).
Return Value
Returns zero.
streamsize is a signed integral type.
Data races
Introduces no data races, but overriden versions in derived classes may.
Exception safety
No-throw guarantee: this default definition never throws exceptions.