std::atomic::atomic

1
atomic() = default;
(1) (since C++11)
1
constexpr atomic( T desired );
(2) (since C++11)
1
atomic( const atomic& ) = delete;
(3) (since C++11)

Constructs new atomic variable.

1) The default constructor is trivial: no initialization takes place other than zero initialization of static and thread-local objects. std::atomic_init may be used to complete initialization.
2) Initializes the underlying value with desired. The initialization is not atomic.
3) Atomic variables are not CopyConstructible.

Parameters

desired - value to initialize with

Exceptions

noexcept specification:
noexcept
doc_CPP
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.