|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
pointer_traits::pointer_to (C++11) | ||||
(C++20)(optional) |
Defined in header <memory> | ||
static pointer pointer_to( element_type& r); | (1) | (since C++11) (member of pointer_traits<Ptr> specialization) |
| (2) | ||
static pointer pointer_to( element_type& r)noexcept; | (since C++11) (until C++20) (member of pointer_traits<T*> specialization) | |
staticconstexpr pointer pointer_to( element_type& r)noexcept; | (since C++20) (member of pointer_traits<T*> specialization) | |
Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.
pointer_to, instantiation of this function is a compile-time error.Contents |
| r | - | reference to an object of typeelement_type&, except if element_type isvoid, in which case the type ofr is unspecified |
A dereferenceable pointer tor, of the typepointer_traits<>::pointer.
TheBoost.Intrusive library version of this function returnspointer(std::addressof(r)) ifPtr::pointer_to does not exist.
(C++11) | obtains actual address of an object, even if the& operator is overloaded(function template)[edit] |
(until C++20) | obtains the address of an object, even ifoperator& is overloaded (public member function of std::allocator<T>)[edit] |
[static](C++20)(optional) | obtains a raw pointer from a fancy pointer (inverse ofpointer_to)(public static member function)[edit] |
(C++20) | obtains a raw pointer from a pointer-like type (function template)[edit] |