std::allocator<T>::address
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Memory management library 
 
 
 
 
 
 
 
 
 
 
 
 
Uninitialized memory algorithms  
 
 
 
 
 
 
 
 
 
 
 
 Constrained uninitialized memory algorithms  
 
 
 
 
 
 
 
 
 
 
 
 Memory resources  
 
 
 
 
 
 
 
 
 
 
 Uninitialized storage (until C++20) 
 
 
 
 
 
 Garbage collector support (until C++23) 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
(exposition only*)
(C++11)
(C++23)
(C++11)
(C++17)
(C++11)
(C++11)
(C++20)
(C++20)
(C++17)
(C++11)
(C++17)
(C++20)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++20)
(C++20)
(C++20)
(C++20)
 (C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(C++17)
(until C++20*)
(until C++20*)
(until C++20*)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)
(C++11)
(C++17)
(C++20)
(C++17)
(C++11)
(C++11)
(C++11)
(until C++17*)
(C++11)
(C++17)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++11)
(C++20)
(C++11)
(C++11)
(C++20)
(C++26)
std::allocator 
 
 
 
 
 
 
 Member functions
allocator::address
(until C++20)
(C++23)
(until C++20)
(until C++20)
(until C++20)
 Non-member functions
(until C++20)
 
 (1)
 
pointer address( reference x ) const;
 
 (until C++11) 
pointer address( reference x ) const noexcept;
 
 (since C++11) (deprecated in C++17)
(removed in C++20)
 
 (2)
 
const_pointer address( const_reference x ) const;
 
 (until C++11) 
const_pointer address( const_reference x ) const noexcept;
 
 (since C++11) (deprecated in C++17)
(removed in C++20)
Returns the actual address of x even in presence of overloaded operator&.
[edit] Parameters
 x
 -
 the object to acquire address of
[edit] Return value
The actual address of x.
[edit] 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 |