| Defined in header |
static pointer pointer_to( element_type& r );
|(1)|| (since C++11) |
static pointer pointer_to( element_type& r ) noexcept;
| (since C++11) |
static constexpr pointer pointer_to( element_type& r ) noexcept;
| (since C++20) |
Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.
std::pointer_traitstemplate simply calls
Ptr::pointer_to(r), and if Ptr does not provide a static member function
pointer_to, instantiation of this function is a compile-time error.
std::pointer_traitsfor pointer types returns
|r||-|| reference to an object of type
A dereferenceable pointer to
r, of the type pointer_traits<>::pointer.
| obtains actual address of an object, even if the & operator is overloaded
(deprecated in C++17)(removed in C++20)
| obtains the address of an object, even if
(public member function of
| obtains a raw pointer from a fancy pointer (inverse of pointer_to)
(public static member function)
| obtains a raw pointer from a pointer-like type
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.