boost::openmethod::weak_virtual_ptr::operator=

Assign from a shared_virtual_ptr to a derived class

Synopsis

Declared in <boost/openmethod/interop/std_weak_ptr.hpp>

template<class Other>
requires std::is_assignable_v<
            std::weak_ptr<Class>&, const std::shared_ptr<Other>&>
weak_virtual_ptr&
operator=(virtual_ptr<std::shared_ptr<Other>, Registry> const& other);

Description

Copy the v‐table pointer from other. Assign the std::weak_ptr from the std::shared_ptr held by other.

Other is not required to be a polymorphic class: the v‐table pointer is already known.

Requirements

  • std::weak_ptr<Class> must be assignable from const std::shared_ptr<Other>&.

Parameters

Name

Description

other

A shared_virtual_ptr to an object of a class derived from Class.

Created with MrDocs