[#bsl-stop_callback-06-2constructor-05] = xref:bsl.adoc[bsl]::xref:bsl/stop_callback-06.adoc[stop_callback]::stop_callback :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<bslstl_stoptoken.h>` Same as the preceding overload. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ARG> explicit xref:bsl/stop_callback-06/2constructor-02.adoc[stop_callback]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<stop_token>] token, t_ARG& arg, xref:bsl/stop_callback-06/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:bsl/stop_callback-06/2constructor-02.adoc[_» more..._]# Same as the preceding overload. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ARG> explicit xref:bsl/stop_callback-06/2constructor-09.adoc[stop_callback]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<stop_token>] token, t_ARG&& arg, xref:bsl/stop_callback-06/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:bsl/stop_callback-06/2constructor-09.adoc[_» more..._]# Same as the preceding overload. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ARG> explicit xref:bsl/stop_callback-06/2constructor-0d.adoc[stop_callback]( xref:bsl/stop_token.adoc[stop_token] const& token, t_ARG& arg, xref:bsl/stop_callback-06/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:bsl/stop_callback-06/2constructor-0d.adoc[_» more..._]# Create a `stop_callback` registering a callable built from `arg`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ARG> explicit xref:bsl/stop_callback-06/2constructor-04.adoc[stop_callback]( xref:bsl/stop_token.adoc[stop_token] const& token, t_ARG&& arg, xref:bsl/stop_callback-06/allocator_type.adoc[allocator_type] const& alloc = allocator_type()); ---- [.small]#xref:bsl/stop_callback-06/2constructor-04.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *token* | stop token whose stop state the callback may register with | *arg* | argument forwarded to construct the stored callable | *alloc* | allocator used when `t_CALLBACK` is allocator‐aware |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#