static pointer
pointer_to( element_type& r );
pointer_traits<Ptr>
specialization) (2)
static pointer
pointer_to( element_type& r ) noexcept;
pointer_traits<T*>
specialization)
static constexpr pointer
pointer_to( element_type& r ) noexcept;
pointer_traits<T*>
specialization)
Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.
1)The version of this function in the non-specialized
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.
[edit] Parameters r - reference to an object of type element_type&, except if element_type is void, in which case the type ofr
is unspecified [edit] Return value
A dereferenceable pointer to r, of the type pointer_traits<>::pointer.
[edit] Exceptions1) Unspecified (typically same as Ptr::pointer_to).
[edit] NotesThe Boost.Intrusive library version of this function returns pointer(std::addressof(r)) if Ptr::pointer_to does not exist.
[edit] See also obtains actual address of an object, even if the&
operator is overloaded
std::allocator<T>
) [edit]
[static] (C++20)(optional)
obtains a raw pointer from a fancy pointer (inverse ofpointer_to
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4