# std::allocator<T>::address

> C++ Atlas: `cppatlas.com/w/cpp/memory/allocator/address` | Source: https://en.cppreference.com/w/cpp/memory/allocator/address | Domain: Memory management | Standards: C++11, C++20

Returns the actual address of x even in presence of overloaded operator&.

## Official Specification Summary (cppreference)

```cpp
pointer address( reference x ) const; // (1) (until C++11)
pointer address( reference x ) const noexcept; // (1) (since C++11) (deprecated in C++17) (removed in C++20)
const_pointer address( const_reference x ) const; // (2) (until C++11)
const_pointer address( const_reference x ) const noexcept; // (2) (since C++11) (deprecated in C++17) (removed in C++20)
```

Returns the actual address of `x` even in presence of overloaded `operator&`.

### Parameters

- `x` - the object to acquire address of

### Return value

The actual address of `x`.

### Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

| DR | Applied to | Behavior as published | Correct behavior |
| --- | --- | --- | --- |
| LWG 634 (N2436) | C++98 | the return value is `&x` (which is affected by overloaded `operator&`) | returns the actual address of `x` |

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