[#bsl-basic_osyncstream-2constructor-04]
= xref:bsl.adoc[bsl]::xref:bsl/basic_osyncstream.adoc[basic&lowbar;osyncstream]::basic&lowbar;osyncstream
:relfileprefix: ../../
:mrdocs:

Create a `basic&lowbar;osyncstream` that forwards output to `wrapped`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
basic&lowbar;osyncstream(
    xref:bsl/basic_osyncstream/streambuf_type.adoc[streambuf&lowbar;type]* wrapped,
    ALLOCATOR const& allocator = ALLOCATOR());
----

== Description

Create a `basic&lowbar;osyncstream` object that will forward stream output to the specified `wrapped` buffer&period; Optionally specify an `allocator` used to supply memory&period; If `allocator` is not supplied, a default&hyphen;constructed object of the (template parameter) `ALLOCATOR` type is used&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *wrapped*
| stream buffer that receives synchronized output
| *allocator*
| allocator used to supply memory
|===


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