Share via


atomic_init 函式

設定 atomic 物件中儲存的值。

template <class Ty>
inline void atomic_init(
   volatile atomic<Ty> *Atom,
   Ty Value
) _NOEXCEPT;
template <class Ty>
inline void atomic_init(
   atomic<Ty> *Atom,
   TyValue
) _NOEXCEPT;

參數

  • Atom
    atomic 物件的指標,該物件儲存指向 Ty 類型的值。

  • Value
    型別 Ty 的值。

備註

atomic_init 不是不可部分完成的作業。 它不是安全執行緒。

需求

**標頭:**atomic

命名空間: std

請參閱

參考

<atomic>

atomic 結構