cpp/io/strstreambuf/seekpos

Repositions std and/or std, if possible, to the position indicated by.

If std is set in, attempts to reposition (the next pointer in the get area). If std is set in, attempts to reposition (the next pointer in the put area). If neither bit is set in, the operation fails.

Each next pointer is repositioned as follows:
 * If the next pointer is null, the operation fails.
 * Otherwise, the new offset (of type ) is determined by calling . If  is negative, out of bounds of the buffer, or invalid, the operation fails.
 * Otherwise, the next pointer is assigned as if by or.

Return value
The resultant offset converted to on success or  on failure.