STD::STOP_CALLBACK(3cxx)
π NAME π
Bestie, this is the std::stop_callback< _Callback > page from the (3cxx) manual. β¨ It's literally a wrapper for callbacks to be run when a stop request is made. That's the whole assignment: callback wrapper, stop request, iconic. π
π¦ SYNOPSIS π¦
First things first, include this:
#include <stop_token>
π Public Types π
using callback_type = _Callbackβ the public type name is exactlycallback_type, and it's aliasing_Callback. Slay.
π Public Member Functions π
Here's the full roster, no skips, no cap:
stop_callback (const stop_callback &)=delete
template<typename _Cb , enable_if_t< is_constructible_v< _Callback, _Cb >, int > = 0> stop_callback (const stop_token &__token, _Cb &&__cb) noexcept(is_nothrow_constructible_v< _Callback, _Cb >)
stop_callback (stop_callback &&)=delete
template<typename _Cb , enable_if_t< is_constructible_v< _Callback, _Cb >, int > = 0> stop_callback (stop_token &&__token, _Cb &&__cb) noexcept(is_nothrow_constructible_v< _Callback, _Cb >)
stop_callback & operator= (const stop_callback &)=delete
stop_callback & operator= (stop_callback &&)=delete
The copy constructor and move constructor are both =delete, and the copy assignment and move assignment are also =delete. So yeah, this wrapper is not here for copying or moving, periodt. The constructor templates are constrained by enable_if_t< is_constructible_v< _Callback, _Cb >, int > = 0> and carry noexcept(is_nothrow_constructible_v< _Callback, _Cb >), exactly as shown. π₯
πΈ Detailed Description πΈ
The deep lore is:
template<typename _Callback>class std::stop_callback< _Callback >"A wrapper for callbacks to be run when a stop request is made.
Yes, the quote is attached right there in the source text β I'm not fixing it, I'm just reporting it, iykyk π. The meaning is still clear: this is the templated std::stop_callback< _Callback > class, and it's a wrapper for callbacks to be run when a stop request is made.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. No human author to @, just the auto-gen machine doing its thing. π€π
Mwah π β cute sign-off: source/version libstdc, page footer tag std::stop_callback< _Callback >(3cxx), and the date slot isn't spelled out in this footer, so I'm not inventing one, bestie. π«Ά
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms