# std::atomic_ref<T>::load

> C++ Atlas: `cppatlas.com/w/cpp/atomic/atomic_ref/load` | Source: https://en.cppreference.com/w/cpp/atomic/atomic_ref/load | Domain: atomic | Standards: C++26

Atomically loads and returns the current value of the referenced object. Memory is affected according to the value of order.

## Official Specification Summary (cppreference)

```cpp
value_type load( std::memory_order order =
                     std::memory_order_seq_cst ) const noexcept; // (constexpr since C++26)
```

Atomically loads and returns the current value of the referenced object. Memory is affected according to the value of `order`.

If `order` is not `std::memory_order_relaxed`, `std::memory_order_consume`, `std::memory_order_acquire` or `std::memory_order_seq_cst`, the behavior is undefined.

### Parameters

- `order` - memory order constraints to enforce

### Return value

The current value of the referenced object.

### See also

- [`operator value_type`](https://en.cppreference.com/w/cpp/atomic/atomic_ref/operator_T): loads a value from the referenced object (public member function)

---
Attribution: content from https://en.cppreference.com/w/cpp/atomic/atomic_ref/load (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.