std::basic_...buf::seekpos(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

okay so bestie, this is the std::basic_spanbuf::seekpos page from the C++ Standard Libary manual β€” the header shortens the title to std::basic_...buf::seekpos(3). The NAME section is literally:

std::basic_spanbuf::seekpos - std::basic_spanbuf::seekpos

it's giving "title so nice they said it twice" πŸ’…


✨ Synopsis ✨

This one is protected:, and it's (since C++23) πŸŽ€

protected:

pos_type seekpos( pos_type sp, std::ios_base::openmode which =
                  std::ios_base::in | std::ios_base::out )
override;

It repositions the next pointer to the get and/or put area, if possible, to the position indicated by sp. πŸ¦‹

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

πŸ’– Parameters πŸ’–

  • sp β€” stream position, such as one obtained by seekoff() or seekpos().
  • which β€” defines whether the input sequences, the output sequence, or both are affected. It can be one or a combination of these constants:
    • in β€” affect the input sequence
    • out β€” affect the output sequence

πŸ” Return value πŸ”

sp on success or pos_type(off_type(-1)) on failure. no cap, that's the whole return vibe 😭

πŸ“ Notes πŸ“

seekpos() is called by std::basic_streambuf::pubseekpos(), which is called by the single-argument versions of std::basic_istream::seekg() and std::basic_ostream::seekp(). 🫢

πŸ§ͺ Example πŸ§ͺ

This section is incomplete. Reason: no example. 😭

that's it, that's the example section β€” it's literally incomplete, bestie.

πŸ‘€ See also πŸ‘€

  • pubseekpos β€” invokes seekpos() (public member function of std::basic_streambuf<CharT,Traits>).
  • seekpos [virtual] β€” repositions the next pointer in the input sequence, output sequence, or both using absolute addressing (virtual protected member function of std::basic_stringbuf<CharT,Traits,Allocator>).
  • seekpos [virtual] β€” repositions the next pointer in the input sequence, output sequence, or both using absolute addressing (virtual protected member function of std::strstreambuf).

🏷️ Category 🏷️

  • Todo no example πŸ’€

okay that's the whole page, bestie. this one's from http://cppreference.com, dated 2024.06.10, with the footer title std::basic_...buf::seekpos(3). mwah πŸ’–

πŸ“¦ where this page comes from