std::pointer_traits< _Ptr > Struct Template Reference
Utilities » Memory » Pointer Abstractions

`#include <memory>`

## Public Types

using | difference_type
using | element_type
using | pointer
template<typename _Up>
using | rebind

## Static Public Member Functions

static pointer | pointer_to (element_type &__r)

## Detailed Description

template<typename _Ptr>
struct std::pointer_traits< _Ptr >

Uniform interface to all pointer-like types.

Since
  C++11

Definition at line 184 of file ptr_traits.h.

## Member Typedef Documentation

## difference_type

template<typename _Ptr, typename _Elt>

using std::__ptr_traits_impl< _Ptr, _Elt >::difference_type

inherited

The type used to represent the difference between two pointers.

Definition at line 163 of file ptr_traits.h.

## element_type

template<typename _Ptr, typename _Elt>

using std::__ptr_traits_impl< _Ptr, _Elt >::element_type

inherited

The type pointed to.

Definition at line 160 of file ptr_traits.h.

## pointer

template<typename _Ptr, typename _Elt>

using std::__ptr_traits_impl< _Ptr, _Elt >::pointer

inherited

The pointer type.

Definition at line 157 of file ptr_traits.h.

## rebind

template<typename _Ptr, typename _Elt>
template<typename _Up>

using std::__ptr_traits_impl< _Ptr, _Elt >::rebind

inherited

A pointer to a different type.

Definition at line 167 of file ptr_traits.h.

## Member Function Documentation

## pointer_to()

template<typename _Ptr, typename _Elt, bool = is_void<_Elt>::value>

pointer std::__ptr_traits_ptr_to< _Ptr, _Elt, bool >::pointer_to | ( | element_type & | __r | ) |

inline static inherited

Obtain a pointer to an object.

Parameters

  __r | A reference to an object of type element_type

Returns
  pointer::pointer_to(__r)

Precondition
  pointer::pointer_to(__r) is a valid expression.

Definition at line 114 of file ptr_traits.h.

The documentation for this struct was generated from the following file:

- ptr_traits.h