Annex D (normative) Compatibility features [depr]

D.24 Deprecated atomic operations [depr.atomics]

The header <atomic> ([atomics.syn]) has the following additions.
namespace std {
  template<class T>
    void atomic_init(volatile atomic<T>*, typename atomic<T>::value_type) noexcept;
  template<class T>
    void atomic_init(atomic<T>*, typename atomic<T>::value_type) noexcept;

  #define ATOMIC_VAR_INIT(value) see below

  #define ATOMIC_FLAG_INIT see below
}

D.24.1 Volatile access [depr.atomics.volatile]

If an atomic specialization has one of the following overloads, then that overload participates in overload resolution even if atomic<T>​::​is_­always_­lock_­free is false:
void store(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
T operator=(T desired) volatile noexcept;
T load(memory_order order = memory_order::seq_cst) const volatile noexcept;
operator T() const volatile noexcept;
T exchange(T desired, memory_order order = memory_order::seq_cst) volatile noexcept;
bool compare_exchange_weak(T& expected, T desired,
                           memory_order success, memory_order failure) volatile noexcept;
bool compare_exchange_strong(T& expected, T desired,
                             memory_order success, memory_order failure) volatile noexcept;
bool compare_exchange_weak(T& expected, T desired,
                           memory_order order = memory_order::seq_cst) volatile noexcept;
bool compare_exchange_strong(T& expected, T desired,
                             memory_order order = memory_order::seq_cst) volatile noexcept;
T fetch_key(T operand, memory_order order = memory_order::seq_cst) volatile noexcept;
T operator op=(T operand) volatile noexcept;
T* fetch_key(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept;

D.24.2 Non-member functions [depr.atomics.nonmembers]

template<class T> void atomic_init(volatile atomic<T>* object, typename atomic<T>::value_type desired) noexcept; template<class T> void atomic_init(atomic<T>* object, typename atomic<T>::value_type desired) noexcept;
Effects: Equivalent to: atomic_­store_­explicit(object, desired, memory_­order​::​relaxed);

D.24.3 Operations on atomic types [depr.atomics.types.operations]

#define ATOMIC_VAR_INIT(value) see below
The macro expands to a token sequence suitable for constant initialization of an atomic variable of static storage duration of a type that is initialization-compatible with value.
Note
:
This operation may need to initialize locks.
— end note
 ]
Concurrent access to the variable being initialized, even via an atomic operation, constitutes a data race.
Example
:
atomic<int> v = ATOMIC_VAR_INIT(5);
— end example
 ]

D.24.4 Flag type and operations [depr.atomics.flag]

#define ATOMIC_FLAG_INIT see below
Remarks: The macro ATOMIC_­FLAG_­INIT is defined in such a way that it can be used to initialize an object of type atomic_­flag to the clear state.
The macro can be used in the form:
atomic_flag guard = ATOMIC_FLAG_INIT;
It is unspecified whether the macro can be used in other initialization contexts.
For a complete static-duration object, that initialization shall be static.