std::basic_...f::showmanyc(3)
β¨ std::basic_...f::showmanyc(3) β¨
okay so this page comes from the C++ Standard Libary manual (yes, that's the manual name as written π), and it's all about std::basic_streambuf::showmanyc. No cap, it's a virtual protected function, and it's lowkey iconic for anyone doing stream buffer stuff.
πΈ NAME πΈ
std::basic_streambuf::showmanyc β std::basic_streambuf::showmanyc
π Synopsis π
protected:
virtual std::streamsize showmanyc();
So bestie, this 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. Periodt.
π Parameters π
- (none) β literally no parameters, bestie.
π Return value π
- The number of characters that are certainly available in the associated character sequence.
- Or
-1ifshowmanyccan determine, without blocking, that no characters are available. - If
showmanycreturns-1,underflow()anduflow()will definitely returnTraits::eofor throw.
The base class version returns 0, which has the meaning of "unsure if there are characters available in the associated sequence".
π§ 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". iykyk π«Ά
π Example π
This section is incomplete.
Reason: no example.
π οΈ Defect reports π οΈ
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR
LWG 159β applied toC++98.- Behavior as published:
underflow()is guaranteed not to fail until at leastshowmanyc()characters are supplied. - Correct behavior: extended the guarantee to allow at least
showmanyc()characters to be extracted.
- Behavior as published:
π See also π
in_availβ obtains the number of characters immediately available in the get area (public member function).showmanycβ optionally provides the number of characters available for input from the file[virtual](virtual protected member function ofstd::basic_filebuf<CharT,Traits>).
π Category π
- Todo no example
that's the whole page, bestie β¨ source: http://cppreference.com, version/date: 2024.06.10, page: std::basic_...f::showmanyc(3). slay π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms