std::stop_s...e::get_token(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

std::stop_source::get_token - std::stop_source::get_token

okay so this page is from the C++ Standard Libary manual, and the whole vibe is std::stop_s...e::get_token(3). Yes bestie, the name is literally the same thing twice β€” that’s not a typo, that’s just how this page rolls πŸ’…


✨ Synopsis ✨

the signature is giving const noexcept and [[nodiscard]], and it’s been around since C++20:

[[nodiscard]] std::stop_token get_token() const noexcept;  (since C++20)

Returns a stop_token object associated with the stop_source's stop-state, if the stop_source has stop-state; otherwise returns a default-constructed (empty) stop_token.


🫢 Parameters 🫢

(none) β€” literally nothing to pass in, bestie. zero. empty hands. πŸ™ˆ


πŸ‘‘ Return value πŸ‘‘

A stop_token object, which will be empty if this->stop_possible() == false.


😭 Example 😭

This section is incomplete.

Reason: no example

not me opening the example section and finding… nothing πŸ’€ it’s giving incomplete, but at least it’s honest.


πŸŽ€ Category πŸŽ€

  • Todo no example

and that’s the whole page, bestie. source/version is http://cppreference.com, date is 2024.06.10, and the page is literally std::stop_s...e::get_token(3) β€” mwah, bye πŸ’‹βœ¨

πŸ“¦ where this page comes from