namespace std { template<class T> struct atomic_ref<T*> { private: T** ptr; // exposition only public: using value_type = T*; using difference_type = ptrdiff_t; static constexpr bool is_always_lock_free = implementation-defined; static constexpr size_t required_alignment = implementation-defined; atomic_ref& operator=(const atomic_ref&) = delete; explicit atomic_ref(T*&); atomic_ref(const atomic_ref&) noexcept; T* operator=(T*) const noexcept; operator T*() const noexcept; bool is_lock_free() const noexcept; void store(T*, memory_order = memory_order_seq_cst) const noexcept; T* load(memory_order = memory_order_seq_cst) const noexcept; T* exchange(T*, memory_order = memory_order_seq_cst) const noexcept; bool compare_exchange_weak(T*&, T*, memory_order, memory_order) const noexcept; bool compare_exchange_strong(T*&, T*, memory_order, memory_order) const noexcept; bool compare_exchange_weak(T*&, T*, memory_order = memory_order_seq_cst) const noexcept; bool compare_exchange_strong(T*&, T*, memory_order = memory_order_seq_cst) const noexcept; T* fetch_add(difference_type, memory_order = memory_order_seq_cst) const noexcept; T* fetch_sub(difference_type, memory_order = memory_order_seq_cst) const noexcept; T* operator++(int) const noexcept; T* operator--(int) const noexcept; T* operator++() const noexcept; T* operator--() const noexcept; T* operator+=(difference_type) const noexcept; T* operator-=(difference_type) const noexcept; }; }

```
T* fetch_key(difference_type operand, memory_order order = memory_order_seq_cst) const noexcept;
```

Effects: Atomically replaces the value referenced by *ptr with
the result of the computation applied to the value referenced by *ptr
and the given operand.

Memory is affected according to the value of order.

These operations are atomic read-modify-write operations ([intro.races]).

```
T* operator op=(difference_type operand) const noexcept;
```