Namespaces
Variants
Views
Actions

std::atomic_ref::atomic_ref

From cppreference.com
< cpp‎ | atomic‎ | atomic ref
 
 
 
 
atomic_ref() = delete;
(1) (since C++20)
explicit atomic_ref( T& obj );
(2) (since C++20)
atomic_ref( const atomic_ref& ref ) noexcept;
(3) (since C++11)

Constructs a new atomic_ref object.

1) The default constructor is deleted; atomic_ref is not DefaultConstructible.
2) Constructs an atomic_ref object referencing the object obj. The behavior is undefined if obj is not aligned to required_alignment.
3) Constructs an atomic_ref object referencing the object referenced by ref.

[edit] Parameters

obj - object to reference
ref - another atomic_ref object to copy from