boost::openmethod::virtual_traits
Traits for types used as virtual parameters.
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. `Node` from `Node&`)
-
obtain a non‐modifiable reference to that object (e.g. a `const Node&` from `Node&`)
-
cast the argument to another type (e.g. cast a `Node&` to a `Plus&`)
Requirements
Specializations of virtual_traits must provide the members described to the VirtualTraits blueprint.