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_traits<Class&&, Registry>::cast :: Boost.OpenMethod

boost::openmethod::virtual_traits<Class&&, Registry>::cast

Cast to another type.

Synopsis

template<typename Derived>
static
Derived
cast(Class&& obj);

Description

Cast an object to another type. If possible, use static_cast. Otherwise, use Registry::rtti::dynamic_cast_ref.

Return Value

A reference to the same object, cast to Derived.

Template Parameters

Name

Description

Derived

A rvalue reference type.

Parameters

Name

Description

obj

A reference to a Class object.

Created with MrDocs