4#ifndef TETL_MEMORY_POINTER_TRAITS_HPP
5#define TETL_MEMORY_POINTER_TRAITS_HPP
7#include <etl/_cstddef/ptrdiff_t.hpp>
8#include <etl/_memory/addressof.hpp>
9#include <etl/_type_traits/is_void.hpp>
17template <
typename Ptr>
20 using element_type =
typename Ptr::element_type;
21 using difference_type =
typename Ptr::difference_type;
33 return Ptr::pointer_to(r);
46 using element_type = T;
47 using difference_type =
etl::ptrdiff_t;
59 requires(
not etl::is_void_v<T>)
61 return etl::addressof(r);
Definition adjacent_find.hpp:9
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.
Definition pointer_traits.hpp:58
The pointer_traits class template provides the standardized way to access certain properties of point...
Definition pointer_traits.hpp:18
static auto pointer_to(element_type &r) -> pointer
Constructs a dereferenceable pointer or pointer-like object ("fancy pointer") to its argument.
Definition pointer_traits.hpp:31