std::experi...c_shared_ptr(3)

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

πŸŽ€ NAME πŸŽ€

okay so this is the std::experi...c_shared_ptr(3) page from the C++ Standard Libary manual β€” yes, β€œLibary” with one r, that’s literally how it’s spelled in the source, no cap 😭 β€” and it’s all about:

std::experimental::atomic_shared_ptr::atomic_shared_ptr β€” which is also std::experimental::atomic_shared_ptr::atomic_shared_ptr, bestie. The constructor. The main character. ✨

πŸ’… Synopsis πŸ’…

constexpr atomic_shared_ptr() noexcept;                        (1)
constexpr atomic_shared_ptr( shared_ptr<T> desired ) noexcept; (2)
atomic_shared_ptr( const atomic_shared_ptr& ) = delete;        (3)

Constructs a new atomic_shared_ptr object. Periodt. 🫢

Here’s the breakdown, because we love a numbered list:

  1. The default constructor initializes the object to an empty state. Cute, clean, empty. πŸŽ€
  2. Initializes the underlying shared_ptr<T> with desired. The initialization is not atomic β€” so don’t get it twisted, bestie. πŸ™ˆ
  3. Atomic variables are not CopyConstructible. That’s the rule. πŸ’€

🌸 Parameters 🌸

  • desired β€” value to initialize with πŸ’–

πŸ¦‹ Exceptions πŸ¦‹

Nothing is listed here in the original, bestie. The whole section is just the heading β€” no exception details were given. πŸ’…

made with love from http://cppreference.com Β· 2024.06.10 Β· bye bestie, go construct something iconic πŸ§šπŸ’œ

πŸ“¦ where this page comes from