cptr::basic_ptr::operator=

Compresses p, which must be null or point into the cage. Not for strict_ptr, which needs an explicit s = strict_ptr<T>(p). A literal 0 or NULL lands here too, and stays constant-evaluable.

Synopsis

Declared in <cptr/ptr.hpp>

constexpr
basic_ptr&
operator=(T* p) noexcept
requires (!Strict);

Return Value

Reference to the current object

Parameters

NameDescription
pThe object to assign from