std::pointer_traits(3cxx)

std::pointer_traits3cxx

Uniform interface to all pointer-like types.

Usage

#include <memory>

Inherits std::__ptr_traits_impl< _Ptr, _Elt >.

Public Types

using difference_type = __detected_or_t< ptrdiff_t, __diff_t, _Ptr >
The type used to represent the difference between two pointers. using element_type = _Elt
The type pointed to. using pointer = _Ptr
The pointer type. template<typename _Up > using rebind = typename __detected_or_t< __replace_first_arg< _Ptr, _Up >, __rebind, _Ptr, _Up >::type
A pointer to a different type.

Static Public Member Functions

static pointer pointer_to (element_type &__r)
Obtain a pointer to an object.

Detailed Description

template<typename _Ptr>

struct std::pointer_traits< _Ptr >"Uniform interface to all pointer-like types.

Since

C++11

Member Typedef Documentation

template<typename _Ptr , typename _Elt > using std::__ptr_traits_impl< _Ptr, _Elt >::difference_type = __detected_or_t<ptrdiff_t, __diff_t, _Ptr> [inherited]

The type used to represent the difference between two pointers.

template<typename _Ptr , typename _Elt > using std::__ptr_traits_impl< _Ptr, _Elt >::element_type = _Elt [inherited]

The type pointed to.

template<typename _Ptr , typename _Elt > using std::__ptr_traits_impl< _Ptr, _Elt >::pointer = _Ptr [inherited]

The pointer type.

template<typename _Ptr , typename _Elt > template<typename _Up > using std::__ptr_traits_impl< _Ptr, _Elt >::rebind = typename __detected_or_t<__replace_first_arg<_Ptr, _Up>, __rebind, _Ptr, _Up>::type [inherited]

A pointer to a different type.

Member Function Documentation

template<typename _Ptr , typename _Elt , bool = is_void<_Elt>::value> static 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.

Releases

7 releases since Debian 7 (Wheezy); the text changed 6 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Generated automatically by Doxygen for libstdc++ from the source code.

From libstdc++-12-doc 12.4.0-5 in Debian 13 (Trixie). Also shipped by libstdc++-13-doc, libstdc++-14-doc. Parsed by carta from the page's man source.