std::pointer_traits<Ptr>::to_address
From cppreference.com
< cpp | memory | pointer traits
C++
Memory management library
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::pointer_traits
| Member functions | ||||
(C++11) | ||||
pointer_traits::to_address (C++20)(optional) |
| Defined in header <memory>
|
||
| static element_type* to_address( pointer p ) noexcept; |
(since C++20) (optional member of program-defined specialization) |
|
Constructs a raw pointer that references the same object as its pointer-like ("fancy pointer") argument.
This function, if defined, is the inverse of pointer_to, and exists as the customization point to be called by std::to_address.
[edit] Parameters
| p | - | fancy pointer/pointer-like object |
[edit] Return value
A raw pointer of the type element_type* that references the same memory location as the argument p.
[edit] See also
| [static] |
obtains a dereferenceable pointer to its argument (public static member function) [edit] |
| (C++20) |
obtains a raw pointer from a pointer-like type (function template) [edit] |