boost::openmethod::inplace_vptr_derived
Adjust the v‐table pointer embedded in a class.
Synopsis
Declared in <boost/openmethod/inplace_vptr.hpp>
template<
class Class,
class Base,
class... MoreBases>
class inplace_vptr_derived;
Protected Member Functions
Name |
Description |
|
Set the vptr to |
|
Set the vptr in each base class. |
Description
inplace_vptr_derived is a CRTP mixin that adjusts the v‐table pointer in a inplace_vptr_base. It can be used only with classes that have inplace_vptr_base as a direct or indirect base class.
inplace_vptr_derived registers the class and its bases in Registry. It is not necessary to register them with use_class or BOOST_OPENMETHOD_REGISTER
The v‐table pointer is obtained directly from the Registry's static_vptr variable. No hashing is involved. If all the classes in Registry inherit from inplace_vptr_derived, the registry needs not have a policies::vptr policy, nor any policy it depends on (like policies::type_hash).
Template Parameters
| Name | Description |
|---|---|
Class |
The class in which to embed the v‐table pointer. |
Base |
A direct base class of |
MoreBases |
More direct base classes of |
See Also
inplace_vptr_base for an example.
Created with MrDocs