pointer_traits

public static member function
<memory>

std::pointer_traits::pointer_to

static pointer pointer_to ( element_type& ref );
Return pointer to
Returns a pointer or pointer-like object to ref.

For the unspecialized template of pointer_traits (which operates on pointer-like classes), the function returns the same as pointer::pointer_to(ref) (where pointer is an alias of pointer_traits' template parameter).

In the specialized version of pointer_traits for pointers (T*), the function returns std::addressof(ref).

Parameters

ref
A reference to an object.
element_type is a member type, defined as an alias of the type pointed by the pointer type.
Note: if element_type is void, the type of this parameter is unspecified.

Return value

A pointer to ref.
pointer is a member type, defined as an alias of the pointer type for which pointer_traits is instantiated.

See also