Java atomic.AtomicReference
Java
java.util.concurrent.atomic.AtomicReference<V>
was new in Java 1.5
C++ - use stdatomic for C++ atomic_ref<T>
std::atomic_ref<T>
was new in C++20, allowing atomic ops on properly-aligned plain objects. Such as alignas(std::atomic_ref<long>::required_alignment) long foo;