Construct an instance of std::atomic<integral-type> with the supplied integral value.
constexpr atomic<integral-type>( integral-type i);
- Effects:
Constructs a new
std::atomic<integral-type>object with a value ofi.- Note:
Since this is a
constexprconstructor, an instance with static storage duration is constructed as part of the static initialization phase, which avoids race conditions and order-of-initialization problems.- Throws:
Nothing.
just::thread Specific
With Microsoft Visual Studio 2008, initialization for local static objects with constructors is always dynamic initialization, and initialization of global objects with constructors is only static initialization if the optimization level is high enough.
#include <atomic>