Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::basic_spanbuf<CharT,Traits>::setbuf

      From cppreference.com
      <cpp‎ |io‎ |basic spanbuf
       
       
       
      std::basic_spanbuf
      Public member functions
      Protected member functions
      basic_spanbuf::setbuf
      (C++23)
      Non-member functions
       
      protected:
      std::basic_streambuf<CharT, Traits>* setbuf( CharT*s,std::streamsize n) override;
      (since C++23)

      Makes thebasic_spanbuf perform I/O on the buffer[ss+ n). Equivalently callsthis->span(std::span<CharT>(s, n)) and then returnsthis.

      Set bits in open mode
      (affecting pointers to get area)
      Return value after setting
      eback()gptr()egptr()
      std::ios_base::insss+ n
      Set bits in open mode
      (affecting pointers to put area)
      Return value after setting
      pbase()pptr()epptr()
      std::ios_base::out&&!std::ios_base::atesss+ n
      std::ios_base::out&&std::ios_base::atess+ ns+ n

      This function is protected virtual, it may only be called throughpubsetbuf() or from member functions of a user-defined class derived fromstd::basic_spanbuf.

      Contents

      [edit]Parameters

      s - pointer to the firstCharT in the user-provided buffer
      n - the number ofCharT elements in the user-provided buffer

      [edit]Return value

      this

      [edit]Notes

      The deprecated stream bufferstd::strstreambuf or the boost.IOStreams deviceboost::basic_array can also implement I/O buffering over a user-providedchar array.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      invokessetbuf()
      (public member function ofstd::basic_streambuf<CharT,Traits>)[edit]
      [virtual]
      attempts to replace the controlled character sequence with an array
      (virtual protected member function ofstd::basic_stringbuf<CharT,Traits,Allocator>)[edit]
      [virtual]
      attempts to replace the controlled character sequence with an array
      (virtual protected member function ofstd::strstreambuf)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_spanbuf/setbuf&oldid=158805"

      [8]ページ先頭

      ©2009-2025 Movatter.jp