std::basic_spanbuf<CharT,Traits>::seekoff
From cppreference.com
< cpp | io | basic spanbuf
| protected: pos_type seekoff( off_type off, std::ios_base::seekdir dir, |
(since C++23) | |
Repositions the next pointer to get and/or put area, if possible, to the position that corresponds to exactly off characters from beginning, end, or current position of the get and/or put area of the buffer.
Let n be the number of CharT elements in underlying buffer, or 0 when there is no underlying buffer, this function fails if
- the next pointer to the get and/or put area to reposition is null and the computed
newoff(see below) is not zero, which may occur if there is no underlying buffer, or the *this is not opened in the mode required bywhich, or -
diris std::ios_base::cur and both std::ios_base::in and std::ios_base::out are set inwhich, or - the computed
newoffis not representable inoff_type, less than zero, or greater thann.
newoff is computed as below:
- If
diris std::ios_base::beg,newoffisoff. - If
diris std::ios_base::cur,newoffis- pptr() - pbase() + off if std::ios_base::out is set in
which, or - gptr() - eback() + off if std::ios_base::in is set in
which.
- pptr() - pbase() + off if std::ios_base::out is set in
- If
diris