The number of elements between a raw pointer and this pointer into the same array, as a - get().
Declared in <cptr/ptr.hpp>
template<class U>
requires (!std::is_void_v<T> &&
std::is_same_v<std::remove_cv_t<U>, std::remove_cv_t<T>>)
constexpr
std::ptrdiff_t
operator-(
U* a,
basic_ptr b) noexcept;
This function is a hidden friend of basic_ptr, declared only inside that class: it can be found only through argument-dependent lookup.
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |