cptr::basic_ptr::basic_ptr

The same explicit casts from another compressed pointer. From void the offset is copied (and this is constexpr); base to derived goes through a raw pointer, except for null.

Synopsis

Declared in <cptr/ptr.hpp>

template<
    class U,
    bool S>
requires (!std::is_convertible_v<U*, T*> &&
             requires(U* u) { static_cast<T*>(u); })
constexpr
explicit
basic_ptr(basic_ptr<U, Cage, S> const& other) noexcept;

Parameters

NameDescription
otherThe object to copy construct from