4#ifndef TETL_MEMORY_TO_ADDRESS_HPP
5#define TETL_MEMORY_TO_ADDRESS_HPP
7#include <etl/_memory/pointer_traits.hpp>
8#include <etl/_type_traits/is_function.hpp>
18template <
typename Ptr>
21 if constexpr (
requires {
pointer_traits<Ptr>::to_address(ptr); }) {
24 return to_address(ptr.operator->());
34 requires(
not is_function_v<T>)
Definition adjacent_find.hpp:9
constexpr auto to_address(T *ptr) noexcept -> T *
Obtain the address represented by p without forming a reference to the object pointed to by p.
Definition to_address.hpp:35
constexpr auto to_address(Ptr const &ptr) noexcept
Obtain the address represented by p without forming a reference to the object pointed to by p.
Definition to_address.hpp:19
The pointer_traits class template provides the standardized way to access certain properties of point...
Definition pointer_traits.hpp:18