atomic() = default; | (1) | (since C++11) |
constexpr atomic( T desired ); | (2) | (since C++11) |
atomic( const atomic& ) = delete; | (3) | (since C++11) |
Constructs new atomic variable.
std::atomic_init
may be used to complete initialization.desired
. The initialization is not atomic.CopyConstructible
.desired | - | value to initialize with |
noexcept
specification: noexcept
The default-initialized std::atomic<T>
does not contain a T
object, and its only valid uses are destruction and initialization by std::atomic_init
, see LWG 2334.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/atomic/atomic/atomic