cptr::nonnull_ptr::nonnull_ptr

Derived to base, or to a cv-qualified or void pointee. Copies the offset (and is constexpr) unless the base sits at a non-zero offset.

Synopsis

Declared in <cptr/ptr.hpp>

template<class U>
requires (std::is_convertible_v<U*, T*> && !std::is_same_v<U, T>)
constexpr
nonnull_ptr(nonnull_ptr<U, Cage> const& other) noexcept;

Parameters

NameDescription
otherThe object to copy construct from