GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::pointer_traits::pointer_to(3) C++ Standard Libary std::pointer_traits::pointer_to(3)

std::pointer_traits::pointer_to - std::pointer_traits::pointer_to


Defined in header
<memory>
static pointer (since C++11)
pointer_to( (1) (member of pointer_traits<Ptr>
element_type& r ); specialization)
static pointer (since C++11)
pointer_to( (until C++20)
element_type& r ) (member of
noexcept; pointer_traits<T*>
(2) specialization)
static constexpr (since C++20)
pointer (member of
pointer_to( pointer_traits<T*>
element_type& r ) specialization)
noexcept;


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_traits template
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.
2) The version of this function in the specialization of std::pointer_traits for
pointer types returns std::addressof(r)


r - reference to an object of type element_type&, except if element_type is void, in
which case the type of r is unspecified


A dereferenceable pointer to r, of the type pointer_traits<>::pointer.


1) Unspecified (typically same as Ptr::pointer_to)


The Boost.Intrusive library version of this function returns
pointer(std::addressof(r)) if Ptr::pointer_to does not exist.


addressof obtains actual address of an object, even if the &
(C++11) operator is overloaded
(function template)
address obtains the address of an object, even if operator& is
(until C++20) overloaded
(public member function of std::allocator<T>)
to_address obtains a raw pointer from a fancy pointer (inverse of
[static] (C++20)(optional) pointer_to)
(public static member function)
to_address obtains a raw pointer from a pointer-like type
(C++20) (function template)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.