[#bsl-flush_emit]
= xref:bsl.adoc[bsl]::flush&lowbar;emit
:relfileprefix: ../
:mrdocs:

Flush `stream` and emit from a backing `basic&lowbar;syncbuf` if present&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR,
    class TRAITS&gt;
basic&lowbar;ostream&lt;CHAR, TRAITS&gt;&
flush&lowbar;emit(basic&lowbar;ostream&lt;CHAR, TRAITS&gt;& stream);
----

== Description

Flush the specified `stream` as if by calling `stream&period;flush()`&period; Then, if `stream&period;rdbuf()` actually points to a `basic&lowbar;syncbuf&lt;CHAR,TRAITS,ALLOCATOR&gt;` `buf`, call `buf&period;emit()`&period; Return `stream`&period;

== Return Value

a reference to `stream`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| output stream that may wrap a `basic&lowbar;syncbuf`
|===


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