31 Input/output library [input.output]

31.8 String-based streams [string.streams]

31.8.2 Class template basic_stringbuf [stringbuf]

31.8.2.5 Overridden virtual functions [stringbuf.virtuals]

Table 126: seekoff positioning [tab:stringbuf.seekoff.pos]
Conditions
Result
ios_base​::​in is set in which
positions the input sequence
ios_base​::​out is set in which
positions the output sequence
both ios_base​::​in and ios_base​::​out are set in which and either
way == ios_base​::​beg or
way == ios_base​::​end
positions both the input and the output sequences
Otherwise
the positioning operation fails.