Documentation Home >> Headers >> <atomic> Header >> std::atomic >> specializations >> std::atomic<T*> >> std::atomic<T*> Conversion Constructor

Construct an instance of std::atomic<T*> with the supplied integral value.

constexpr atomic<T*>(T* i);


Constructs a new std::atomic<T*> object with a value of i.


Since this is a constexpr constructor, an instance with static storage duration is constructed as part of the static initialization phase, which avoids race conditions and order-of-initialization problems.



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>

See Also