std::packaged_task::valid(3)
β¨ std::packaged_task::valid β¨
okay so real talk, this page comes straight out of the C++ Standard Libary manual (yes that's the manual name, we don't edit it, we respect it π
) and it's honestly one of the shortest reads ever. it's giving "one question, one answer" energy and i'm kinda obsessed.
πΈ NAME πΈ
std::packaged_task::valid β that's it, that's the whole name. it does exactly what it says on the tin, no cap.
π Synopsis π
bool valid() const noexcept; (since C++11)
so this lil member function checks whether *this has a shared state. that's the entire vibe check right there π¦
it's been hanging out since C++11, and it's written const noexcept β i'm just reading the signature to you exactly as it appears, bestie, not adding my own lore β¨
π Parameters π
(none)
literally zero. nothing. no arguments, no surprises, she takes no notes π
β Return value β
trueβ if*thishas a shared state π₯falseβ otherwise π
that's the whole deal. binary queen π
so yeah, that's the page. iconic, brief, no filler. go check if your packaged_task actually has a shared state before you get weird with it, iykyk π«Ά
this was brought to you by http://cppreference.com, version/date 2024.06.10 β mwah, love u, bye bestie! πππ
π¦ 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