std::atomic...ed_alignment(3)

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

std::atomic...ed_alignment(3) πŸ’…βœ¨

okay so this page is from the C++ Standard Libary, bestie β€” manual name folded in, exactly like the header wanted β€” and the actual full name of the thing is std::atomic_ref::required_alignment. 🫢

🌸 NAME 🌸

  • std::atomic_ref::required_alignment β€” the required alignment situation for std::atomic_ref, and also literally the name again because the original page says it twice: std::atomic_ref::required_alignment. periodt. πŸ’–

πŸ” Synopsis πŸ”

static constexpr std::size_t required_alignment =
(since C++20)
/*implementation-defined*/;

The value of required_alignment is the alignment an object needs so it can be referenced by an atomic reference, and it is at least alignof(T). no cap. ✨

πŸ“ Notes πŸ“

Hardware could require that an object referenced by an atomic_ref<T> have stricter alignment than other T objects. Also, whether operations on an atomic_ref are lock-free can depend on the alignment of the referenced object. iykyk. πŸ’…


cute little sign-off: this page comes from cppreference.com, with the date/version 2024.06.10, and the footer title is std::atomic...ed_alignment(3). luv u, bye bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from