[#bsl-stop_callback-06-2constructor-05]
= xref:bsl.adoc[bsl]::xref:bsl/stop_callback-06.adoc[stop&lowbar;callback]::stop&lowbar;callback
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;ARG&gt;
explicit
xref:bsl/stop_callback-06/2constructor-02.adoc[stop&lowbar;callback](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;stop&lowbar;token&gt;] token,
    t&lowbar;ARG& arg,
    xref:bsl/stop_callback-06/allocator_type.adoc[allocator&lowbar;type] const& alloc = allocator&lowbar;type());
----

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

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;ARG&gt;
explicit
xref:bsl/stop_callback-06/2constructor-09.adoc[stop&lowbar;callback](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;stop&lowbar;token&gt;] token,
    t&lowbar;ARG&& arg,
    xref:bsl/stop_callback-06/allocator_type.adoc[allocator&lowbar;type] const& alloc = allocator&lowbar;type());
----

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

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;ARG&gt;
explicit
xref:bsl/stop_callback-06/2constructor-0d.adoc[stop&lowbar;callback](
    xref:bsl/stop_token.adoc[stop&lowbar;token] const& token,
    t&lowbar;ARG& arg,
    xref:bsl/stop_callback-06/allocator_type.adoc[allocator&lowbar;type] const& alloc = allocator&lowbar;type());
----

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

Create a `stop&lowbar;callback` that stores a callable constructed from `arg` and registers it with the stop state of `token`, if any&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;ARG&gt;
explicit
xref:bsl/stop_callback-06/2constructor-04.adoc[stop&lowbar;callback](
    xref:bsl/stop_token.adoc[stop&lowbar;token] const& token,
    t&lowbar;ARG&& arg,
    xref:bsl/stop_callback-06/allocator_type.adoc[allocator&lowbar;type] const& alloc = allocator&lowbar;type());
----

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


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