[#bsl-basic_stringstream] = xref:bsl.adoc[bsl]::basic_stringstream :relfileprefix: ../ :mrdocs: This class implements a standard stream providing operations using `bsl::basic_string` for modifying or accessing the sequence of characters read from, or written to, the stream. == Synopsis Declared in `<bslstl_stringstream.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_stringstream : public std::basic_iostream<CHAR_TYPE, CHAR_TRAITS> ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::basic_iostream<CHAR_TYPE, CHAR_TRAITS>` | Template class basic_iostream |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/basic_stringstream/__istream_type.adoc[`__istream_type`] | | xref:bsl/basic_stringstream/__ostream_type.adoc[`__ostream_type`] | | xref:bsl/basic_stringstream/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias to the (template parameter) `ALLOCATOR`. | xref:bsl/basic_stringstream/char_type.adoc[`char_type`] | Alias for the character type of this stream. | xref:bsl/basic_stringstream/int_type.adoc[`int_type`] | This `typedef` is an alias to `traits_type::int_type`. | xref:bsl/basic_stringstream/off_type.adoc[`off_type`] | This `typedef` is an alias to `traits_type::off_type`. | xref:bsl/basic_stringstream/pos_type.adoc[`pos_type`] | This `typedef` is an alias to `traits_type::pos_type`. | xref:bsl/basic_stringstream/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_stringstream/2constructor-00.adoc[`basic_stringstream`] [.small]#[constructor]# | Constructors | xref:bsl/basic_stringstream/operator_assign-04.adoc[`operator=`] | Assign to this object the value of the specified `rhs`, and return a reference providing modifiable access to this object. The contents of `rhs` are move‐assigned to this object. `rhs` is left in a valid but unspecified state. | xref:bsl/basic_stringstream/rdbuf.adoc[`rdbuf`] | Return an address providing modifiable access to the `basic_stringbuf` object that is internally used by this stream object to buffer unformatted characters. | xref:bsl/basic_stringstream/str-07a.adoc[`str`] | `str` overloads | xref:bsl/basic_stringstream/swap-00.adoc[`swap`] | Efficiently exchange the value of this object with the value of the specified `other` object. This method provides the no‐throw exception‐safety guarantee if `*this` and `other` allocators compare equal. The behavior is undefined unless either `*this` and `other` allocators compare equal or `propagate_on_container_swap` is `true`. Note that this function is only available for C++11 (and later) language standards because it requires that `swap` be provided on the (platform supplied) base class for this type. | xref:bsl/basic_stringstream/view.adoc[`view`] | Return a view of the internally buffered sequence of characters maintained by this stream object. |=== == Protected Member Functions [cols="1"] |=== | Name | xref:bsl/basic_stringstream/operator_assign-06.adoc[`operator=`] | xref:bsl/basic_stringstream/swap-0d.adoc[`swap`] |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/swap-0b1.adoc[`swap`] | Efficiently exchange the values of the specified `a` and `b` objects. This method provides the no‐throw exception‐safety guarantee if `a` and `b` allocators compare equal. Note that this function is only available for C++11 (and later) language standards. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#