std::experi...ic_weak_ptr(3)
β¨ NAME β¨
std::experimental::atomic_weak_ptr β like, literally std::experimental::atomic_weak_ptr, that's the whole name bestie π
πΈ SYNOPSIS πΈ
okay so first things first, this lives in header <experimental/atomic> β yes, the experimental one, she's a guest star π§
template< class T > (concurrency TS)
class atomic_weak_ptr;
The class template atomic_weak_ptr gives you thread-safe atomic pointer operations over a std::weak_ptr. That's it, that's the vibe π¦
π MEMBER FUNCTIONS π
constructorβ constructs anatomic_weak_ptrobject π«Ά (public member function)operator=β stores a value into anatomic_weak_ptrobject π (public member function)is_lock_freeβ checks if theatomic_weak_ptrobject is lock-free π (public member function)storeβ atomically replaces the value of the atomic object with a non-atomic argument π₯ (public member function)loadβ atomically obtains the value of the atomic object β (public member function)operator weak_ptr<T>β loads a value from an atomic object π (public member function)exchangeβ atomically replaces the value of the atomic object and obtains the value held previously, like a little swap-and-grab situation π (public member function)compare_exchange_weakβ atomically compares the value of the atomic object with a non-atomic argument and performs atomic exchange if equal or atomic load if not π (public member function)compare_exchange_strongβ same deal as above: atomically compares the value of the atomic object with a non-atomic argument and performs atomic exchange if equal or atomic load if not β she's the strong one, no cap π (public member function)
ngl, thecompare_exchange_weakandcompare_exchange_strongdescriptions got fused together in the original list β they're two separate member functions but they share that exact description, so that's how we're serving it π
and that's the whole page, bestie β this one's from the C++ Standard Library docs over at http://cppreference.com, dated 2024.06.10. go be lock-free and iconic πβ¨π
π¦ 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