std::stop_token(3cxx)
π NAME π
std::stop_token β okay bestie, weβre in the 3cxx manual and this one is all about allowing testing whether a stop request has been made on a stop_source. No cap, thatβs the whole name vibe β¨
β¨ SYNOPSIS β¨
#include <stop_token>
πΈ Public Member Functions πΈ
stop_token (const stop_token &) noexcept=defaultβ the copy constructor, defaulted andnoexcept. Iconic, low-drama πstop_token (stop_token &&) noexcept=defaultβ the move constructor, also defaulted andnoexcept. We love a clean handoff π«Άstop_token & operator= (const stop_token &) noexcept=defaultβ copy assignment, defaulted andnoexcept.stop_token & operator= (stop_token &&) noexcept=defaultβ move assignment, defaulted andnoexcept.bool stop_possible () const noexceptβ abool-returning member,const noexcept, taking no arguments. Thatβs the signature, bestie.bool stop_requested () const noexceptβ anotherbool-returning member,const noexcept, no arguments.void swap (stop_token &__rhs) noexceptβ memberswap, takesstop_token &__rhs, returnsvoid, and itβsnoexcept.
π«Ά Friends π«Ά
bool operator== (const stop_token &__a, const stop_token &__b)β friend equality operator, returnsbool, and takes twoconst stop_token¶ms named__aand__b.template<typename _Callback > class stop_callbackβ friend template class, with_Callbackas the template parameter.class stop_sourceβ friend class. Hi bestie πvoid swap (stop_token &__lhs, stop_token &__rhs) noexceptβ free friendswap, takesstop_token &__lhsandstop_token &__rhs, returnsvoid, and itβsnoexcept.
π¦ Detailed Description π¦
Allow testing whether a stop request has been made on a stop_source. Thatβs the whole detailed description, and it ate π
β¨
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
Cute sign-off time: the footer says libstdc++ for the source/version, and thereβs no date listed, so Iβm not inventing one bestie. Bye! ππ¦π
π¦ 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