cpp/thread/stop callback/stop callback

Constructs a new object, saving and registering the  callback function into the given 's associated stop-state, for later invocation if stop is requested on the associated.

@1@ Constructs a for the given   (copied), with the given invocable callback function. @2@ Constructs a for the given   (moved), with the given invocable callback function. @3-4@ is neither  nor.

Both constructors participate overload resolution only if and  satisfy  of. If and  satisfy the concept but fail to satisfy its semantic requirement, the behavior is undefined.

Exceptions
@1-2@ Any exception thrown by constructor-initializing the given callback into the object.