boost::openmethod::VirtualTraits::vptr
Returns a reference to the v‐table pointer for an object.
Synopsis
Declared in <boost/openmethod/core.hpp>
static
vptr_type const&
vptr(virtual_type const& arg);
Description
vptr is optional. It is called on the object returned by peek, not on the method argument itself. A method acquires the v‐table pointer of a virtual argument from the first of the following that is available: a boost_openmethod_vptr function, found by ADL on the peeked object; vptr; policies::VptrFn::dynamic_vptr of the registry's policies::vptr policy.
Acquire the v‐table pointer for arg. For an example, see virtual_traits<std::any const&, Registry>::vptr.
vptr must return a reference, not a value, so that the caller observes the current v‐table pointer if the registry contains the policies::indirect_vptr policy and initialize is called again.
Parameters
Name |
Description |
arg |
The object returned by |
See Also
Created with MrDocs