boost::openmethod::virtual_traits<boost::any&&, Registry>::vptr
Returns a reference to a v‐table pointer for an object.
Synopsis
Declared in <boost/openmethod/interop/boost_any.hpp>
static
vptr_type const&
vptr(boost::any const& arg);
Description
Acquires the dynamic type_id of the value stored in arg, using boost::any::type(). This requires the registry's rtti policy to be std_rtti; the requirement is enforced with a static_assert. boost::any::type() yields the same std::type_info object as &typeid(T), provided Boost.TypeIndex uses stl_type_index. Registers boost::any ‐ the root class of the contained types ‐ in Registry.
Passes the type id to the registry's policies::vptr policy, which must provide policies::VptrFn::vptr. Both policies::vptr_vector and policies::vptr_map do.
If the registry has a type_hash policy, uses it to convert the type id to an index; otherwise, uses the type_id as the index.
If the registry contains the runtime_checks policy, verifies that the index falls within the limits of the vector. If it does not, and if the registry contains a error_handler policy, calls its error function with a missing_class value, then terminates the program with abort.
Parameters
Name |
Description |
arg |
A reference to a |
Created with MrDocs