27.6.3.4.2 Buffer management and positioning
pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in | ios_base::out);
- Effects: Alters the stream positions within one or more of the controlled sequences in a way that is defined separately for each class derived from
basic_streambuf
in this Clause (27.8.2.4, 27.9.1.5).- Default behavior: Returns
pos_type(off_type(-1))
.
So far, so good. The basic_streambuf
derivation I'm using can alter its position separately for ios_base::in
and/or ios_base::out
. But, what do I need to return when both are specified?
If you specify ios_base::in
or ios_base::out
, we would return new stream position of the specific sequence.
seekoff
alters the stream positions within one or more of the controlled sequences in a way that is defined separately for each derived class? – Roadsidestreambuf
, but stay flexible in position handling. – Hauteurbasic_streambuf::seekoff
? – Roadside