[#bsl-basic_ostringstream] = xref:bsl.adoc[bsl]::basic_ostringstream :relfileprefix: ../ :mrdocs: Standard output stream that provides a `bsl::basic_string` of written characters. == Synopsis Declared in `<bslstl_ostringstream.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class CHAR_TYPE, class CHAR_TRAITS = char_traits<CHAR_TYPE>, class ALLOCATOR = xref:bsl/allocator-0df.adoc[allocator<CHAR_TYPE>]> class basic_ostringstream : public std::basic_ostream<CHAR_TYPE, CHAR_TRAITS> ---- == Description This class implements a standard output stream that provides an accessor for obtaining a `bsl::basic_string` containing the sequence of characters that have been written to the stream. == Base Classes [cols="1,4"] |=== | Name| Description | `std::basic_ostream<CHAR_TYPE, CHAR_TRAITS>` | Template class basic_ostream. |=== == Types [cols="1,4"] |=== | Name| Description | xref:bsl/basic_ostringstream/sentry.adoc[`sentry`] | Prefixed output operations sentry type for this stream. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/basic_ostringstream/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias to the (template parameter) `ALLOCATOR`. | xref:bsl/basic_ostringstream/char_type.adoc[`char_type`] | This `typedef` is an alias to the (template parameter) `CHAR_TYPE`. | xref:bsl/basic_ostringstream/int_type.adoc[`int_type`] | This `typedef` is an alias to `traits_type::int_type`. | xref:bsl/basic_ostringstream/off_type.adoc[`off_type`] | This `typedef` is an alias to `traits_type::off_type`. | xref:bsl/basic_ostringstream/pos_type.adoc[`pos_type`] | This `typedef` is an alias to `traits_type::pos_type`. | xref:bsl/basic_ostringstream/traits_type.adoc[`traits_type`] | This `typedef` is an alias to the (template parameter) `CHAR_TRAITS`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/basic_ostringstream/2constructor-0f.adoc[`basic_ostringstream`] [.small]#[constructor]# | Constructors | xref:bsl/basic_ostringstream/operator_assign-0e5.adoc[`operator=`] | Assignment operators | xref:bsl/basic_ostringstream/__put_num.adoc[`__put_num`] | Format and insert a numeric value into the stream. | xref:bsl/basic_ostringstream/__put_num_integer_promote.adoc[`__put_num_integer_promote`] | Format and insert an integer‐promoted numeric value. | xref:bsl/basic_ostringstream/flush.adoc[`flush`] | Flush the stream buffer. | xref:bsl/basic_ostringstream/get_allocator.adoc[`get_allocator`] | Return the allocator used by the underlying buffer to supply memory. | xref:bsl/basic_ostringstream/put.adoc[`put`] | Insert a single character into the stream. | xref:bsl/basic_ostringstream/rdbuf.adoc[`rdbuf`] | Return an address providing modifiable access to the `basic_stringbuf` object that is internally used by this string stream to buffer unformatted characters. | xref:bsl/basic_ostringstream/seekp-05.adoc[`seekp`] | `seekp` overloads | xref:bsl/basic_ostringstream/str-04.adoc[`str`] | `str` overloads | xref:bsl/basic_ostringstream/swap-04.adoc[`swap`] | `swap` overloads | xref:bsl/basic_ostringstream/tellp.adoc[`tellp`] | Return the current put position in the output sequence. | xref:bsl/basic_ostringstream/view.adoc[`view`] | Return a view of the internally buffered sequence of characters maintained by this stream object. | xref:bsl/basic_ostringstream/write.adoc[`write`] | Write a block of characters to the stream. | xref:bsl/basic_ostringstream/operator_lshift-085.adoc[`operator<<`] | Left shift operators |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/swap-06e.adoc[`swap`] | Efficiently exchange the values of the specified `a` and `b` objects. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#