Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |io‎ |basic streambuf
       
       
       
      std::basic_streambuf
       
      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

      [edit]Parameters

      (none)

      [edit]Return value

      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".

      [edit]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".

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

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

      [edit]See also

      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 ofstd::basic_filebuf<CharT,Traits>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_streambuf/showmanyc&oldid=143548"

      [8]ページ先頭

      ©2009-2025 Movatter.jp