boost::openmethod::virtual_traits<std::shared_ptr<Class> const&, Registry>

Specialize virtual_traits for std::shared_ptr by reference.

Synopsis

template<
    class Class,
    class Registry>
struct virtual_traits<std::shared_ptr<Class> const&, Registry>;

Types

Name

Description

rebind

Rebind to a different element type.

virtual_type

Class, stripped from cv‐qualifiers.

Static Member Functions

Name

Description

peek

Return a reference to a non‐modifiable Class object.

cast

Cast to another type.

Description

Passing a std::shared_ptr in a method call by const reference creates a temporary std::shared_ptr and passes it by const reference to the overrider. This is necessary because virtual arguments need to be cast to the type expected by the overrider.

Template Parameters

Name Description

Class

A class type, possibly cv‐qualified.

Registry

A registry.

Created with MrDocs