Utility extension point to get the address of either a pointer (which is already an address) or an iterator type (which must be a contiguous iterator).


This does not actually check if the iterator is contiguous. It just checks if the input type is either a pointer or something which can be operator->(), which implies it must yield an in-language pointer type eventually.

template<typename _Type, typename = void>
class is_operator_arrowable : public std::integral_constant<bool, ::std::is_pointer_v<_Type>>

Whether or not the given type can have the operator arrow used on it.

Template Parameters

_Type – The type to check.

template<typename _Type>
constexpr bool ztd::is_operator_arrowable_v = is_operator_arrowable<_Type>::value

An alias of the inner value for ztd::is_operator_arrowable.

template<typename _Type, typename = void>
class is_to_addressable : public std::integral_constant<bool, (::std::is_pointer_v<_Type> && !::std::is_function_v<::std::remove_reference_t<::std::remove_pointer_t<_Type>>>) || is_operator_arrowable_v<::std::remove_reference_t<_Type>>>

Whether or not the given type is can have to_address (std::pointer_traits<Type>::to_address) called on it.

template<typename _Type>
constexpr bool ztd::is_to_addressable_v = is_to_addressable<_Type>::value

A _v alias for ztd::is_to_addressable.


doxygenvariable: Cannot find variable “ztd::to_address” in doxygen xml output for project “ztd.idk” from directory: /home/docs/checkouts/