cptr::basic_ptr::basic_ptr

Explicit casts that static_cast allows, such as base to derived or void* to T*.

Synopsis

Declared in <cptr/ptr.hpp>

template<class U>
requires (!std::is_convertible_v<U*, T*> &&
             requires(U* u) { static_cast<T*>(u); })
explicit
basic_ptr(U* p) noexcept;

Parameters

NameDescription
pThe object to construct from