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

Constructors

== Synopses

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

Create a `basic&lowbar;stringstream` by moving from `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringstream/2constructor-034.adoc[basic&lowbar;stringstream](xref:bsl/basic_stringstream.adoc[basic&lowbar;stringstream]&& original);
----

[.small]#xref:bsl/basic_stringstream/2constructor-034.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` by moving from `initialString`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/basic_stringstream/2constructor-074.adoc[basic&lowbar;stringstream](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString);
----

[.small]#xref:bsl/basic_stringstream/2constructor-074.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/basic_stringstream/2constructor-08.adoc[basic&lowbar;stringstream](xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:bsl/basic_stringstream/2constructor-08.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` from a string&hyphen;view&hyphen;like sequence&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
explicit
xref:bsl/basic_stringstream/2constructor-04f.adoc[basic&lowbar;stringstream](STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& initialString);
----

[.small]#xref:bsl/basic_stringstream/2constructor-04f.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` with the specified open mode&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/basic_stringstream/2constructor-05.adoc[basic&lowbar;stringstream](
    ios&lowbar;base::openmode modeBitMask,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:bsl/basic_stringstream/2constructor-05.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` by moving from `initialString`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringstream/2constructor-043.adoc[basic&lowbar;stringstream](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString,
    ios&lowbar;base::openmode modeBitMask);
----

[.small]#xref:bsl/basic_stringstream/2constructor-043.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` by moving from `initialString`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringstream/2constructor-078.adoc[basic&lowbar;stringstream](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:bsl/basic_stringstream/2constructor-078.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` from the specified initial string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/basic_stringstream/2constructor-0c.adoc[basic&lowbar;stringstream](
    xref:bsl/basic_stringstream.adoc[StringType] const& initialString,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:bsl/basic_stringstream/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` from a string&hyphen;view&hyphen;like sequence and mode&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE&gt;
xref:bsl/basic_stringstream/2constructor-032.adoc[basic&lowbar;stringstream](
    STRING&lowbar;VIEW&lowbar;LIKE&lowbar;TYPE const& initialString,
    ios&lowbar;base::openmode modeBitMask);
----

[.small]#xref:bsl/basic_stringstream/2constructor-032.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` from a string with a different allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class SALLOC&gt;
explicit
xref:bsl/basic_stringstream/2constructor-0a.adoc[basic&lowbar;stringstream](
    xref:bsl/basic_string-0faf.adoc[bsl::basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, SALLOC&gt;] const& initialString,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type())
requires !bsl&colon;&colon;is&lowbar;same&lt;ALLOCATOR, SALLOC&gt;&colon;&colon;value;
----

[.small]#xref:bsl/basic_stringstream/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` by moving from `initialString`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringstream/2constructor-0b.adoc[basic&lowbar;stringstream](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;StringType&gt;] initialString,
    ios&lowbar;base::openmode modeBitMask,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator);
----

[.small]#xref:bsl/basic_stringstream/2constructor-0b.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` from a string and open mode&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_stringstream/2constructor-031.adoc[basic&lowbar;stringstream](
    xref:bsl/basic_stringstream.adoc[StringType] const& initialString,
    ios&lowbar;base::openmode modeBitMask,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

[.small]#xref:bsl/basic_stringstream/2constructor-031.adoc[_» more&period;&period;&period;_]#

Create a `basic&lowbar;stringstream` from a string, mode, and allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class SALLOC&gt;
xref:bsl/basic_stringstream/2constructor-09.adoc[basic&lowbar;stringstream](
    xref:bsl/basic_string-0faf.adoc[bsl::basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, SALLOC&gt;] const& initialString,
    ios&lowbar;base::openmode modeBitMask,
    xref:bsl/basic_stringstream/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type())
requires !bsl&colon;&colon;is&lowbar;same&lt;ALLOCATOR, SALLOC&gt;&colon;&colon;value;
----

[.small]#xref:bsl/basic_stringstream/2constructor-09.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| object from which to move&hyphen;construct
| *initialString*
| initial character sequence (moved from)
| *allocator*
| allocator used to supply memory
| *modeBitMask*
| open mode for the stream buffer
|===


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