std::latch::latch(3)
π NAME π
Okay so bestie, welcome to the std::latch::latch(3) page from the C++ Standard Libary manual. The NAME line is std::latch::latch - std::latch::latch, and thatβs the whole name vibe. π
π§΅ Synopsis π§΅
Both of these are since C++20, periodt:
constexpr explicit latch( std::ptrdiff_t expected ); (1) (since C++20)
latch( const latch& ) = delete; (2) (since C++20)
- Builds a latch and initializes its internal counter. The behavior is undefined if
expectedis negative or greater thanmax()β not βundefinedβ like cute mysterious, undefined like do-not-do-it, fr fr. π - The copy constructor is deleted.
latchis neither copyable nor movable. So no duplicating, no yeeting it around by copy/move. π
πΈ Parameters πΈ
expectedβ the initial value of the internal counter. Thatβs the starting number, bestie. β¨
π«Ά Exceptions π«Ά
Throws nothing. Literally nothing. Clean, quiet, lowkey iconic. π
π Friendly reminder:expectedbeing negative or greater thanmax()is undefined behavior, so please donβt test the universe like that. π
Cute sign-off: source is http://cppreference.com π», version/date is 2024.06.10 π
. Mwah, slay, 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