[#bsl-basic_syncbuf-sync]
= xref:bsl.adoc[bsl]::xref:bsl/basic_syncbuf.adoc[basic&lowbar;syncbuf]::sync
:relfileprefix: ../../
:mrdocs:

Request the wrapped streambuf flush on the next `emit` call, then call `emit` if the &quot;emit&hyphen;on&hyphen;sync&quot; flag is `true`&period; Return 0 on success and &hyphen;1 if the `emit` call has failed&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;syncbuf&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
sync() override;
----


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