std::allocator::address(3)
π std::allocator::address(3) π
okay so bestie, this little icon is std::allocator::address, straight out of the C++ Standard Libary (yes, the header spells it like that, iconic). Itβs giving βI just wanna know the real addressβ energy, and honestly? Same. π
β¨
β¨ NAME β¨
std::allocator::address β std::allocator::address. Thatβs it, thatβs the name, we been knew. π«Ά
π Synopsis π
the synopsis is lowkey serving chaotic line breaks in the source, but I kept every token exactly as it appears:
pointer address( reference x ) (until C++11)
const;
pointer address( reference x ) (since C++11)
const noexcept; (deprecated in C++17)
(removed in C++20)
const_pointer address( (1)
(until C++11)
const_reference x ) const;
const_pointer address( (2)
(since C++11)
const_reference x ) const
(deprecated in
noexcept;
C++17)
(removed
in C++20)
It returns the actual address of x even in presence of overloaded operator&. no cap, thatβs the whole vibe. πΈ
heads up: the page marks this deprecated in C++17 and removed in C++20 β so if you see it out in the wild, itβs giving legacy era. ππ
πΈ Parameters πΈ
xβ the object to acquire address of.
π Return value π
The actual address of x. periodt. β¨
π©Ή Defect reports π©Ή
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR
LWG 634(N2436) β applied to C++98.- Behavior as published: the return value is
&x(which is affected by overloadedoperator&). - Correct behavior: returns the actual address of
x.
- Behavior as published: the return value is
okay bye bestie π«Ά this page came from http://cppreference.com, dated 2024.06.10, and itβs the std::allocator::address(3) page. mwah πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms