[#bsl-basic_stringstream]
= xref:bsl.adoc[bsl]::basic&lowbar;stringstream
:relfileprefix: ../
:mrdocs:

This class implements a standard stream providing operations using `bsl&colon;&colon;basic&lowbar;string` for modifying or accessing the sequence of characters read from, or written to, the stream&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR&lowbar;TYPE,
    class CHAR&lowbar;TRAITS = char&lowbar;traits&lt;CHAR&lowbar;TYPE&gt;,
    class ALLOCATOR = xref:bsl/allocator-0df.adoc[allocator&lt;CHAR&lowbar;TYPE&gt;]&gt;
class basic&lowbar;stringstream
    : public std::basic&lowbar;iostream&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS&gt;
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `std::basic&lowbar;iostream&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS&gt;`
| Template class basic&lowbar;iostream
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:bsl/basic_stringstream/__istream_type.adoc[`&lowbar;&lowbar;istream&lowbar;type`] 
| 
| xref:bsl/basic_stringstream/__ostream_type.adoc[`&lowbar;&lowbar;ostream&lowbar;type`] 
| 
| xref:bsl/basic_stringstream/allocator_type.adoc[`allocator&lowbar;type`] 
| This `typedef` is an alias to the (template parameter) `ALLOCATOR`&period;
| xref:bsl/basic_stringstream/char_type.adoc[`char&lowbar;type`] 
| Alias for the character type of this stream&period;
| xref:bsl/basic_stringstream/int_type.adoc[`int&lowbar;type`] 
| This `typedef` is an alias to `traits&lowbar;type&colon;&colon;int&lowbar;type`&period;
| xref:bsl/basic_stringstream/off_type.adoc[`off&lowbar;type`] 
| This `typedef` is an alias to `traits&lowbar;type&colon;&colon;off&lowbar;type`&period;
| xref:bsl/basic_stringstream/pos_type.adoc[`pos&lowbar;type`] 
| This `typedef` is an alias to `traits&lowbar;type&colon;&colon;pos&lowbar;type`&period;
| xref:bsl/basic_stringstream/traits_type.adoc[`traits&lowbar;type`] 
| This `typedef` is an alias to the (template parameter) `CHAR&lowbar;TRAITS`&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:bsl/basic_stringstream/2constructor-00.adoc[`basic&lowbar;stringstream`]         [.small]#[constructor]#
| Constructors
| xref:bsl/basic_stringstream/operator_assign-04.adoc[`operator&equals;`] 
| Assign to this object the value of the specified `rhs`, and return a reference providing modifiable access to this object&period; The contents of `rhs` are move&hyphen;assigned to this object&period; `rhs` is left in a valid but unspecified state&period;
| xref:bsl/basic_stringstream/rdbuf.adoc[`rdbuf`] 
| Return an address providing modifiable access to the `basic&lowbar;stringbuf` object that is internally used by this stream object to buffer unformatted characters&period;
| 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&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if `&ast;this` and `other` allocators compare equal&period; The behavior is undefined unless either `&ast;this` and `other` allocators compare equal or `propagate&lowbar;on&lowbar;container&lowbar;swap` is `true`&period; Note that this function is only available for C&plus;&plus;11 (and later) language standards because it requires that `swap` be provided on the (platform supplied) base class for this type&period;
| xref:bsl/basic_stringstream/view.adoc[`view`] 
| Return a view of the internally buffered sequence of characters maintained by this stream object&period;
|===


== Protected Member Functions

[cols="1"]
|===
| Name
| xref:bsl/basic_stringstream/operator_assign-06.adoc[`operator&equals;`] 
| 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&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if `a` and `b` allocators compare equal&period; Note that this function is only available for C&plus;&plus;11 (and later) language standards&period;
|===


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