|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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)constnoexcept; | (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)constnoexcept; | (since C++11) (deprecated in C++17) (removed in C++20) | |
Returns the actual address ofx even in presence of overloadedoperator&.
| x | - | the object to acquire address of |
The actual address ofx.
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 overloadedoperator&) | returns the actual address ofx |