tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
pointer_traits< T * > Struct Template Reference

The pointer_traits class template provides the standardized way to access certain properties of pointer-like types. More...

#include <pointer_traits.hpp>

Public Types

using difference_type = etl::ptrdiff_t
 
using element_type = T
 
using pointer = T *
 
template<typename U >
using rebind = U *
 

Static Public Member Functions

static auto pointer_to (T &r) -> pointer requires(not etl::is_void_v< T >)
 Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.
 

Detailed Description

template<typename T>
struct etl::pointer_traits< T * >

The pointer_traits class template provides the standardized way to access certain properties of pointer-like types.

https://en.cppreference.com/w/cpp/memory/pointer_traits

Template Parameters
TA raw pointer

Member Typedef Documentation

◆ difference_type

◆ element_type

template<typename T >
using element_type = T

◆ pointer

template<typename T >
using pointer = T*

◆ rebind

template<typename T >
template<typename U >
using rebind = U*

Member Function Documentation

◆ pointer_to()

template<typename T >
static auto pointer_to ( T r) -> pointer requires(not etl::is_void_v<T>)
inlinestatic

Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.

https://en.cppreference.com/w/cpp/memory/pointer_traits/pointer_to

Parameters
rReference to an object of type element_type&.
Returns
A pointer to r, of the type pointer_traits::pointer.

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