std::atomic_ref<T>::atomic_ref
explicit atomic_ref( T& obj ); | (1) | (since C++20) |
atomic_ref( const atomic_ref& ref ) noexcept; | (2) | (since C++11) |
Constructs a new atomic_ref
object.
1) Constructs an
atomic_ref
object referencing the object obj
. The behavior is undefined if obj
is not aligned to required_alignment
.
2) Constructs an
atomic_ref
object referencing the object referenced by ref
.Parameters
obj | - | object to reference |
ref | - | another atomic_ref object to copy from |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/atomic/atomic_ref/atomic_ref