Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

boost::openmethod::virtual_ptr<SmartPtr, Registry>::cast :: Boost.OpenMethod

boost::openmethod::virtual_ptr<SmartPtr, Registry>::cast

Cast to another virtual_ptr type

Synopses

Cast to another virtual_ptr type

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

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