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 basic_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 basic_streambuf is to always return zero. basic_filebuf overrides this member function (see basic_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.