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

Constructors

== Synopses

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

Create a `basic&lowbar;istringstream` object having the same value as the specified `original` object by moving the contents of `original` to the newly&hyphen;created object&period; `original` is left in a valid but unspecified state&period;


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

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

Create a `basic&lowbar;istringstream` object&period; Use the specified `initialString` indicating the initial sequence of characters from which input will be streamed&period; Optionally specify a `modeBitMask` indicating whether the underlying stream&hyphen;buffer may also be written to (`rdbuf` is created using `modeBitMask &verbar; ios&lowbar;base&colon;&colon;in`)&period; If `modeBitMask` is not supplied, `rdbuf` will be created using `ios&lowbar;base&colon;&colon;in`&period; Optionally specify the `allocator` used to supply memory&period; If `allocator` is not supplied, the allocator in `initialString` is used&period; `initialString` is left in a valid but unspecified state&period;


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

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

Create a `basic&lowbar;istringstream` object&period; Optionally specify a `modeBitMask` indicating whether the underlying stream&hyphen;buffer may also be written to (`rdbuf` is created using `modeBitMask &verbar; ios&lowbar;base&colon;&colon;in`)&period; If `modeBitMask` is not supplied, `rdbuf` will be created using `ios&lowbar;base&colon;&colon;in`&period; Optionally specify an `initialString` indicating the sequence of characters from which input will be streamed&period; If `initialString` is not supplied, there will not be data to stream (until a subsequent call to the `str` manipulator)&period; Optionally specify the `allocator` used to supply memory&period; If `allocator` is not supplied, a default&hyphen;constructed object of the (template parameter) `ALLOCATOR` type is used&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory&period; If `initialString` is passed by `MovableRef`, it is left in a valid but unspecified state&period;


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

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

Create a `basic&lowbar;istringstream` object&period; Use the specified `initialString` (of a type convertible to `basic&lowbar;string&lowbar;view&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS&gt;` but not to `const CHAR&lowbar;TYPE &ast;`) indicating the sequence of characters from which input will be streamed&period; `rdbuf` is created using `ios&lowbar;base&colon;&colon;in`&period; Optionally specify the `allocator` used to supply memory&period; If `allocator` is not supplied, a default&hyphen;constructed object of the (template parameter) `ALLOCATOR` type is used&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory&period;


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

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

Same as the constructor taking `const allocator&lowbar;type&amp;`&period;


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

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

Same as the constructor taking `MovableRef&lt;StringType&gt;`&period;


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

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

Same as the constructor taking `MovableRef&lt;StringType&gt;`&period;


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

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

Same as the constructor taking `const allocator&lowbar;type&amp;`&period;


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

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

Create a `basic&lowbar;istringstream` object&period; Use the specified `initialString` (of a type convertible to `basic&lowbar;string&lowbar;view&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS&gt;` but not to `const CHAR&lowbar;TYPE &ast;`) indicating the sequence of characters from which input will be streamed&period; Use the specified `modeBitMask` to indicate whether this buffer may be read from, written to, or both&period; `rdbuf` is created using `modeBitMask &verbar; ios&lowbar;base&colon;&colon;in`&period; Optionally specify the `allocator` used to supply memory&period; If `allocator` is not supplied, a default&hyphen;constructed object of the (template parameter) `ALLOCATOR` type is used&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory&period;


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

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

Create a `basic&lowbar;istringstream` object&period; Use the specified `initialString` indicating the sequence of characters from which input will be streamed&period; `rdbuf` is created using `ios&lowbar;base&colon;&colon;in`&period; Optionally specify the `allocator` used to supply memory&period; If `allocator` is not supplied, a default&hyphen;constructed object of the (template parameter) `ALLOCATOR` type is used&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class SALLOC&gt;
xref:bsl/basic_istringstream/2constructor-095.adoc[basic&lowbar;istringstream](
    xref:bsl/basic_string-0faf.adoc[bsl::basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, SALLOC&gt;] const& initialString,
    xref:bsl/basic_istringstream/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_istringstream/2constructor-095.adoc[_» more&period;&period;&period;_]#

Same as the constructor taking `MovableRef&lt;StringType&gt;` and `ios&lowbar;base&colon;&colon;openmode`&period;


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

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

Same as the constructor taking `const StringType&amp;` and `const allocator&lowbar;type&amp;`&period;


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

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

Create a `basic&lowbar;istringstream` object&period; Use the specified `initialString` indicating the sequence of characters from which input will be streamed&period; Use the specified `modeBitMask` to indicate whether this buffer may be read from, written to, or both&period; Optionally specify the `allocator` used to supply memory&period; If `allocator` is not supplied, a default&hyphen;constructed object of the (template parameter) `ALLOCATOR` type is used&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` (the default), then `allocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` argument is of type `bsl&colon;&colon;allocator` and `allocator` is not supplied, the currently installed default allocator will be used to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class SALLOC&gt;
xref:bsl/basic_istringstream/2constructor-032598.adoc[basic&lowbar;istringstream](
    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_istringstream/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_istringstream/2constructor-032598.adoc[_» more&period;&period;&period;_]#


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