std::basic_...:pubseekpos,(3)
β¨ NAME β¨
okay so this is the C++ Standard Libary manual's std::basic_...:pubseekpos,(3) page β yes, the header spells it Libary, not me π β and the actual NAME line is:
std::basic_streambuf::pubseekpos,βstd::basic_streambuf::pubseekpos,(commas included, bestie, because that's what the page says).
πΈ Synopsis πΈ
the signature is giving "line wraps went to therapy" but every token is here, no cap:
pos_type pubseekpos( pos_type pos,
std::ios_base::openmode which =
std::ios_base::in | (1)
std::ios_base::out );
protected:
virtual pos_type seekpos( pos_type pos,
(2)
std::ios_base::openmode which =
std::ios_base::in |
std::ios_base::out );
It sets the position indicator of the input and/or output sequence to an absolute position. Lowkey the whole plot:
- Calls
seekpos(pos, which)of the most derived class. - The base class version of this function has no effect. The derived classes may override this function to allow absolute positioning of the position indicator.
π Parameters π
posβ absolute position to set the position indicator towhichβ defines which of the input and/or output sequences to affect. It can be one or a combination of the following constants:inβ affect the input sequenceoutβ affect the output sequence
π Return value π
- The return value of
seekpos(pos, which). - The resulting absolute position as defined by the position indicator. The base class version returns
pos_type(off_type(-1)).
π¦ Example π¦
okay so the Example section is literally telling on itself:
This section is incomplete Reason: no example
π Defect reports π
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
LWG 55- Applied to:
C++98 - Behavior as published: the base class version of
seekposreturned an undefined invalid stream position. - Correct behavior: returns
pos_type(off_type(-1)).
- Applied to:
β See also β
pubseekoffβ invokesseekoff()(public member function)seekpos[virtual]β repositions the file position, using absolute addressing (virtual protected member function ofstd::basic_filebuf<CharT,Traits>)seekpos[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>)seekpos[virtual]β repositions the next pointer in the input sequence, output sequence, or both using absolute addressing (virtual protected member function ofstd::strstreambuf)
π Category π
- Category:
Todo no example
source/version: http://cppreference.com Β· date: 2024.06.10 Β· footer title: std::basic_...:pubseekpos,(3) β bye bestie, go set an absolute position and slay π
β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms