boost::openmethod::virtual_ptr::cast

Cast to another virtual_ptr type

Synopsis

template<class Other>
requires std::is_base_of_v<element_type, Other> ||
            std::is_base_of_v<Other, element_type>
decltype(auto)
cast() const;

Example

Requirements

  • `Other` must be a base or derived class of `Class`.

Return Value

A virtual_ptr<Other, Registry> pointing to the same object

Template Parameters

Name Description

Other

The target class of the cast

Created with MrDocs