std::promise::swap(3)
π std::promise::swap(3) π
hey bestie, weβre in the C++ Standard Libary manual and this page is about std::promise::swap. The title is std::promise::swap(3), and honestly itβs a tiny but iconic little member. π
πΈ NAME πΈ
std::promise::swap β std::promise::swap (the name is doing the most, but periodt).
β¨ Synopsis β¨
void swap( promise& other ) noexcept; (since C++11)
It exchanges the shared states of two promise objects. No cap. π¦
π Parameters π
otherβ the promise to swap with. Thatβs it, thatβs the parameter bestie.
π Return value π
- (none) β literally none. Itβs
void, so no return value to catch. π«Ά
π₯ Example π₯
This section is incomplete. Reason: no example.
not me staring at an incomplete example section π. Thatβs the whole tea: no example provided.
π See also π
std::swap(std::promise)β specializes thestd::swapalgorithm. Itβs a function template, and itβs C++11 coded. β¨
π§ Category π§
- Todo no example
xoxo, this page came from http://cppreference.com, source/version 2024.06.10, and itβs std::promise::swap(3). bye bestie, go swap those shared states ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms