boost::openmethod::virtual_traits
Traits for types that can be used as virtual arguments.
Synopsis
Declared in <boost/openmethod/core.hpp>
template<
typename T,
class Registry>
struct virtual_traits;
Description
virtual_traits must be specialized for each type that can be used as a virtual parameters. It enables methods to:
-
find the type of the object the argument refers to (e.g. `Cat` from `Cat&`)
-
obtain a non‐modifiable reference to that object (e.g. a `const Cat&` from `Cat&`)
-
cast the argument to another type (e.g. cast a `Animal&` to a `Cat&`)
Requirements
Specializations of virtual_traits must implement the members deswcribed to the VirtualTraits blueprint.