# std::stop_callback_for_t

> C++ Atlas: `cppatlas.com/w/cpp/thread/stop_callback_for_t` | Source: https://en.cppreference.com/w/cpp/thread/stop_callback_for_t | Domain: Concurrency support | Standards: C++26

The alias template stop_callback_for_t is used to obtain the stop callback type of the type T.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <stop_token>

template< class T, class CallbackFn >
using stop_callback_for_t = T::template callback_type<CallbackFn>; // (since C++26)
```

The alias template `stop_callback_for_t` is used to obtain the stop callback type of the type `T`.

### Notes

The corresponding `stop_callback_for_t` for standard stop token types and any valid `CallbackFn` are:

- specialization of `std::stop_callback` for `std::stop_token`,
- specialization of `std::inplace_stop_callback` for `std::inplace_stop_token`, and
- unspecified type without stoppable callback registration and deregistration for `std::never_stop_token`.

---
Attribution: content from https://en.cppreference.com/w/cpp/thread/stop_callback_for_t (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.