cptr::operator-

Subtraction operator

Synopsis

Declared in <cptr/ptr.hpp>

constexpr
basic_ptr
operator-(
    basic_ptr p,
    std::ptrdiff_t n) noexcept
requires (!std::is_void_v<T>);

NOTE

This function is a hidden friend of basic_ptr, declared only inside that class: it can be found only through argument-dependent lookup.

Return Value

A nullable pointer to a T inside Cage, stored in 4 bytes. Use it as ptr<T> or strict_ptr<T>, declared below.

Parameters

NameDescription
pThe left operand
nThe right operand