Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |io‎ |basic spanbuf
       
       
       
      std::basic_spanbuf
      Public member functions
      basic_spanbuf::span
      (C++23)
      Protected member functions
      Non-member functions
       
      std::span<CharT> span()constnoexcept;
      (1)(since C++23)
      void span(std::span<CharT> s)noexcept;
      (2)(since C++23)
      1) Gets aspan referencing the written area ifstd::ios_base::out is set in the open mode, or aspan referencing the underlying buffer otherwise.
      2) Makes thebasic_spanbuf perform I/O on the buffer referenced bys. Sets pointers to get area, put area, or both.
      Set bits in open mode
      (affecting pointers to get area)
      Return value after setting
      eback()gptr()egptr()
      std::ios_base::ins.data()s.data()s.data()+ s.size()
      Set bits in open mode
      (affecting pointers to put area)
      Return value after setting
      pbase()pptr()epptr()
      std::ios_base::out&&!std::ios_base::ates.data()s.data()s.data()+ s.size()
      std::ios_base::out&&std::ios_base::ates.data()s.data()+ s.size()s.data()+ s.size()

      Contents

      [edit]Parameters

      s - astd::span that references the user-provided buffer

      [edit]Return value

      1)std::span<CharT>(pbase(), pptr()) ifstd::ios_base::out is set in the open mode, or astd::span<CharT> that references the whole underlying buffer otherwise.
      2) (none)

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      replaces or obtains a copy of the associated character string
      (public member function ofstd::basic_stringbuf<CharT,Traits,Allocator>)[edit]
      (C++20)
      obtains a view over the underlying character sequence
      (public member function ofstd::basic_stringbuf<CharT,Traits,Allocator>)[edit]
      marks the buffer frozen and returns the beginning pointer of the input sequence
      (public member function ofstd::strstreambuf)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_spanbuf/span&oldid=130776"

      [8]ページ先頭

      ©2009-2025 Movatter.jp