[#bsl-stop_source-2constructor-053]
= xref:bsl.adoc[bsl]::xref:bsl/stop_source.adoc[stop&lowbar;source]::stop&lowbar;source
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create a `stop&lowbar;source` object that refers to a distinct stop state, using the currently installed default allocator to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/stop_source/2constructor-0a.adoc[stop&lowbar;source]();
----

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

Create a `stop&lowbar;source` object that refers to the same stop state (or lack thereof) as the specified &apos;original&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/stop_source/2constructor-0f.adoc[stop&lowbar;source](xref:bsl/stop_source.adoc[stop&lowbar;source] const& original) noexcept;
----

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

Create a `stop&lowbar;source` object that does not refer to a stop state and, therefore, cannot be used to request a stop&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/stop_source/2constructor-054.adoc[stop&lowbar;source](xref:bsl/nostopstate_t.adoc[nostopstate&lowbar;t]) noexcept;
----

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

Create a `stop&lowbar;source` object that refers to the stop state (or lack thereof) referred to by the specified `original`, and reset `original` to not refer to a stop state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/stop_source/2constructor-02.adoc[stop&lowbar;source](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;stop&lowbar;source&gt;] original) noexcept;
----

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

Create a `stop&lowbar;source` object that refers to a distinct stop state, using the specified `allocator` to supply memory&period; Note, however, that `stop&lowbar;source` is not allocator&hyphen;aware&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/stop_source/2constructor-0b.adoc[stop&lowbar;source](xref:bsl/allocator-0df.adoc[bsl::allocator&lt;char&gt;] allocator);
----

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


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