Compresses p, which must be null or point into the cage. Implicit for ptr, explicit for strict_ptr. A template on U only so that a literal 0 picks the constructor above instead of being ambiguous; it takes any U* that converts implicitly to T*.
Declared in <cptr/ptr.hpp>
template<class U>
requires std::is_convertible_v<U*, T*>
explicit(Strict)
basic_ptr(U* p) noexcept;
| Name | Description |
|---|---|
| p | The object to construct from |