std::experi...rshared_ptr(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

okay so you're looking at std::experi...rshared_ptr(3), and the manual it lives in is the C++ Standard Libary β€” yes bestie, that's the whole vibe. This page is about the conversion operator, and it's lowkey iconic because it hands you a shared_ptr<T> atomically. slay. ✨

✨ NAME ✨

std::experimental::atomic_shared_ptr::operatorshared_ptr β€” okay so that's the name, and yeah, it's also std::experimental::atomic_shared_ptr::operatorshared_ptr. It's giving "operator that converts to shared_ptr," fr fr. πŸ’…

🌸 Synopsis 🌸

operator shared_ptr<T>() const noexcept;

Atomically loads and returns the current value of the atomic_shared_ptr. Equivalent to load(). no cap. 🫢

πŸŽ€ Parameters πŸŽ€

  • (none) β€” literally no parameters, bestie. Not a single one. πŸ’…

πŸ’– Return value πŸ’–

The current value of the atomic_shared_ptr. That's it, that's the tea. ✨

πŸ”₯ Remarks πŸ”₯

All associated use_count increments are guaranteed to be performed as part of the atomic operation. So like, those increments are not off doing their own chaotic little side quest β€” they're part of the atomic operation. periodt. 🫢

πŸ¦‹ See also πŸ¦‹

  • load β€” atomically obtains the value of the atomic object (public member function). iconic sibling behavior, iykyk. πŸ‘‘

source: http://cppreference.com, version/date: 2024.06.10, for std::experi...rshared_ptr(3) β€” bye bestie, go atomically load something cute πŸ’œ

πŸ“¦ where this page comes from