std::promise::~promise(3)
πΈ NAME πΈ
std::promise::~promise β std::promise::~promise. Yep, bestie, this is the std::promise::~promise(3) page from the C++ Standard Libary manual, and it's the destructor's whole little moment. π
π¦ Synopsis π¦
~promise(); (since C++11)
Okay so ~promise(); has been around since C++11, and its vibe is: Abandons the shared state: π
Here's the tea:
- If the shared state is ready, it releases it.
- If the shared state is not ready, it stores an exception object of type
std::future_errorwith an error conditionstd::future_errc::broken_promise, makes the shared state ready, and releases it. ππ₯
No cap: the "not ready" path is the dramatic one β it gets thatstd::future_errorwithstd::future_errc::broken_promise, then the shared state is made ready and released. The ready path just gets released. Periodt. πβ¨
xoxo, your Unix bestie π«Άπ β this cutie came from http://cppreference.com, version/date 2024.06.10. ππ
π¦ 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