std::atomic_ref::load(3)

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

🌸 NAME 🌸

< pink>okay so bestie, this page is std::atomic_ref::load(3) from the C++ Standard Libary manual β€” and the name is literally std::atomic_ref::load - std::atomic_ref::load. iconic. periodt. πŸ’…


✨ Synopsis ✨

T load( std::memory_order order = std::memory_order_seq_cst ) const
(since C++20)
noexcept;

< purple>okay so the vibe is: this thing atomically loads and returns the current value of the referenced object. Memory is affected according to the value of order.

order must be one of std::memory_order_relaxed, std::memory_order_consume, std::memory_order_acquire or std::memory_order_seq_cst. Otherwise the behavior is undefined β€” not a cute mystery, fr fr, don’t do it. πŸ’€


πŸ’– Parameters πŸ’–

  • order β€” memory order constraints to enforce 🫢

πŸŽ€ Return value πŸŽ€

The current value of the referenced object. That’s it. That’s the tea. ✨


πŸ¦‹ See also πŸ¦‹

  • operator T β€” loads a value from the referenced object (public member function) πŸ‘‘

made with πŸ’– by the C++ Standard Libary girlies Β· source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::atomic_ref::load(3) πŸŽ€

πŸ“¦ where this page comes from