[#bsl-basic_ostringstream-2constructor-0d] = xref:bsl.adoc[bsl]::xref:bsl/basic_ostringstream.adoc[basic_ostringstream]::basic_ostringstream :relfileprefix: ../../ :mrdocs: Create a `basic_ostringstream` object. Use the specified `initialString` as the value that will be returned by a call to `str` prior to any streaming operations performed on this object. `rdbuf` is created using `ios_base::out`. Optionally specify the `allocator` used to supply memory. If `allocator` is not supplied, a default‐constructed object of the (template parameter) `ALLOCATOR` type is used. If the `ALLOCATOR` argument is of type `bsl::allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma::Allocator *`. If the `ALLOCATOR` argument is of type `bsl::allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory. == Synopsis Declared in `<bslstl_ostringstream.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class SALLOC> basic_ostringstream( xref:bsl/basic_string-0faf.adoc[bsl::basic_string<CHAR_TYPE, CHAR_TRAITS, SALLOC>] const& initialString, xref:bsl/basic_ostringstream/allocator_type.adoc[allocator_type] const& allocator = allocator_type()) requires !bsl::is_same<ALLOCATOR, SALLOC>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#