boost::openmethod::weak_virtual_ptr::operator=

Assign from a std::shared_ptr to a derived class

Synopsis

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

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

Description

Assign the std::weak_ptr from other. Set the v‐table pointer according to the dynamic type of *other.

Requirements

  • Other must be a polymorphic class, according to the rtti policy of Registry.

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

Parameters

Name

Description

other

A std::shared_ptr to a polymorphic object.

Created with MrDocs