Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

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

      From cppreference.com
      <cpp‎ |io‎ |basic spanbuf
       
       
       
      std::basic_spanbuf
      Public member functions
      Protected member functions
      basic_spanbuf::seekpos
      (C++23)
      Non-member functions
       
      protected:

      pos_type seekpos( pos_type sp,std::ios_base::openmode which=

                           std::ios_base::in|std::ios_base::out) override;
      (since C++23)

      Repositions the next pointer to the get and/or put area, if possible, to the position indicated bysp.

      Equivalent toreturn seekoff(off_type(sp),std::ios_base::beg, which);.

      Contents

      [edit]Parameters

      sp - stream position, such as one obtained byseekoff() orseekpos()
      which - defines whether the input sequences, the output sequence, or both are affected. It can be one or a combination of the following constants:
      Constant Explanation
      in affect the input sequence
      out affect the output sequence

      [edit]Return value

      sp on success orpos_type(off_type(-1)) on failure.

      [edit]Notes

      seekpos() is called bystd::basic_streambuf::pubseekpos(), which is called by the single-argument versions ofstd::basic_istream::seekg() andstd::basic_ostream::seekp().

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      invokesseekpos()
      (public member function ofstd::basic_streambuf<CharT,Traits>)[edit]
      [virtual]
      repositions the next pointer in the input sequence, output sequence, or both using absolute addressing
      (virtual protected member function ofstd::basic_stringbuf<CharT,Traits,Allocator>)[edit]
      [virtual]
      repositions the next pointer in the input sequence, output sequence, or both using absolute addressing
      (virtual protected member function ofstd::strstreambuf)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/basic_spanbuf/seekpos&oldid=130778"

      [8]ページ先頭

      ©2009-2025 Movatter.jp