tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
pointer_traits< Ptr > 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 = typename Ptr::difference_type
 
using element_type = typename Ptr::element_type
 
using pointer = Ptr
 

Static Public Member Functions

static auto pointer_to (element_type &r) -> pointer
 Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.
 

Detailed Description

template<typename Ptr>
struct etl::pointer_traits< Ptr >

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

Member Typedef Documentation

◆ difference_type

template<typename Ptr>
using difference_type = typename Ptr::difference_type

◆ element_type

template<typename Ptr>
using element_type = typename Ptr::element_type

◆ pointer

template<typename Ptr>
using pointer = Ptr

Member Function Documentation

◆ pointer_to()

template<typename Ptr>
auto pointer_to ( element_type & r) -> pointer
inlinestaticnodiscard

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: