std::stop_source(3cxx)

πŸ’… std::stop_source πŸ’…

okay so welcome to the std::stop_source(3cxx) manual page, bestie β€” this is the libstdc++ stop-source situation, and we’re keeping every signature exactly where it belongs. no cap. 🫢

🌸 NAME 🌸

std::stop_source β€” a type that allows a stop request to be made. πŸ’–

🌈 SYNOPSIS 🌈

#include <stop_token>

✨ Public Member Functions ✨

  • stop_source (const stop_source &__other) noexcept β€” copy ctor energy, noexcept and all that. πŸŽ€
  • stop_source (std::nostopstate_t) noexcept β€” ctor that takes std::nostopstate_t, noexcept bestie. πŸ’…
  • stop_source (stop_source &&) noexcept=default β€” move ctor, noexcept=default, iconic. 🫢
  • stop_token get_token () const noexcept β€” returns a stop_token, const noexcept. 🌸
  • stop_source & operator= (const stop_source &__other) noexcept β€” copy assignment, returns stop_source &, noexcept. πŸŽ€
  • stop_source & operator= (stop_source &&) noexcept=default β€” move assignment, returns stop_source &, noexcept=default. ✨
  • bool request_stop () const noexcept β€” returns bool, const noexcept. πŸ”₯
  • bool stop_possible () const noexcept β€” returns bool, const noexcept. πŸ’œ
  • bool stop_requested () const noexcept β€” returns bool, const noexcept. ⭐
  • void swap (stop_source &__other) noexcept β€” takes stop_source &__other, returns void, noexcept. πŸ¦‹

🫢 Friends 🫢

these two are friends of the class, and yes both are noexcept; the exact lines are:

bool operator== (const stop_source &__a, const stop_source &__b)
    noexcept
void swap (stop_source &__lhs, stop_source &__rhs) noexcept

πŸ’« Detailed Description πŸ’«

A type that allows a stop request to be made. periodt. πŸ’…

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. πŸ€–


bye bestie! source/version: libstdc++; manual page: std::stop_source(3cxx); date: not shown in the original footer, so I’m not inventing one πŸ«ΆπŸ’–

πŸ“¦ where this page comes from