Annex D (normative) Compatibility features [depr]

D.24 Deprecated atomic operations [depr.atomics]


D.24.1 General [depr.atomics.general]

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

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

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

D.24.5 memory_order​::​consume [depr.atomics.order]


D.24.1 General [depr.atomics.general]

The header <atomic> 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; template<class T> constexpr T kill_dependency(T y) noexcept; // freestanding inline constexpr memory_order memory_order_consume = memory_order::consume; // freestanding #define ATOMIC_VAR_INIT(value) see below }

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

If an atomic ([atomics.types.generic]) 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; value_type operator++(int) volatile noexcept; value_type operator--(int) volatile noexcept; value_type operator++() volatile noexcept; value_type operator--() volatile noexcept; void wait(T old, memory_order order = memory_order::seq_cst) const volatile noexcept; void notify_one() volatile noexcept; void notify_all() volatile noexcept;

D.24.3 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.4 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 with static storage duration of a type that is initialization-compatible with value.
[Note 1: 
This operation possibly needs to initialize locks.
— end note]
Concurrent access to the variable being initialized, even via an atomic operation, constitutes a data race.
[Example 1: atomic<int> v = ATOMIC_VAR_INIT(5); — end example]

D.24.5 memory_order​::​consume [depr.atomics.order]

The memory_order enumeration contains an additional enumerator: consume = 1
The memory_order​::​consume enumerator is allowed wherever memory_order​::​acquire is allowed, and it has the same meaning.
template<class T> constexpr T kill_dependency(T y) noexcept;
Returns: y.
1[depr.istream.extractors]Deprecated signed char and unsigned char extraction
The header <istream> has the following additions:
template<class traits> basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, unsigned char& c); template<class traits> basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char& c);
Effects: Behaves like a formatted input member (as described in ([istream.formatted.reqmts])) of in.
A character is extracted from in, if one is available, and stored in c.
Otherwise, ios_base​::​failbit is set in the input function's local error state before setstate is called.
Returns: in.
template<class traits, size_t N> basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, unsigned char (&s)[N]); template<class traits, size_t N> basic_istream<char, traits>& operator>>(basic_istream<char, traits>& in, signed char (&s)[N]);
Effects: Behaves like a formatted input member (as described in ([istream.formatted.reqmts])) of in.
After a sentry object is constructed, operator>> extracts characters and stores them into s.
If width() is greater than zero, n is min(size_t(width()), N).
Otherwise n is N.
n is the maximum number of characters stored.
Characters are extracted and stored until any of the following occurs:
  • n - 1 characters are stored;
  • end of file occurs on the input sequence;
  • letting ct be use_facet<ctype<charT>>(in.getloc()), ct.is(ct.space, s) is true.
operator>> then stores a null byte (charT()) in the next position, which may be the first position if no characters were extracted.
operator>> then calls width(0).
If the function extracted no characters, ios_bit​::​failbit is set in the input function's local error state before setstate is called.
Returns: in.
1[depr.ostream.inserters]Deprecated signed char and unsigned char insertion
The header <ostream> has the following additions:
template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& out, signed char c); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& out, unsigned char c);
Effects: Equivalent to: return out << static_cast<char>(c);
template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& out, const signed char* s); template<class traits> basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>& out, const unsigned char* s);
Effects: Equivalent to: return out << reinterpret_cast<const char*>(s);