[#BloombergLP-bdlsb-OverflowMemOutStreamBuf-seekpos]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::xref:BloombergLP/bdlsb/OverflowMemOutStreamBuf.adoc[OverflowMemOutStreamBuf]::seekpos
:relfileprefix: ../../../
:mrdocs:

Set the put position to the specified absolute position and return it&period;

== Synopsis

Declared in `&lt;bdlsb&lowbar;overflowmemoutstreambuf&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
OverflowMemOutStreamBuf::pos&lowbar;type
seekpos(
    pos&lowbar;type position,
    std::ios&lowbar;base::openmode which = bsl&colon;&colon;ios&lowbar;base&colon;&colon;in &verbar; bsl&colon;&colon;ios&lowbar;base&colon;&colon;out) override;
----

== Description

Set the position indicator to the specified `position` and return the resulting absolute position on success or pos&lowbar;type(&hyphen;1) on failure&period; Optionally specify `which` area of the stream buffer&period; The `seekpos` operation will fail if `which` does not include the flag `bsl&colon;&colon;ios&lowbar;base&colon;&colon;out` or if `position` is negative&period;

== Return Value

resulting absolute position, or `pos&lowbar;type(&hyphen;1)` on failure

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| absolute position to seek to
| *which*
| area of the stream buffer to seek (must include `out`)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
