boost::openmethod::policies::vptr_vector

Stores v‐table pointers in a vector.

Synopsis

Declared in <boost/openmethod/policies/vptr_vector.hpp>

struct vptr_vector
    : vptr

Description

vptr_vector stores v‐table pointers in a global vector. If Registry contains a type_hash policy, it is used to convert `type_id`s to indices. Otherwise, `type_id`s are used directly as indices.

If the registry contains the indirect_vptr policy, stores pointers to pointers to v‐tables in the vector.

Example

// `fast_perfect_hash` turns the type ids into small indices; without it the
// vector is indexed by the type id itself, which `std_rtti` makes a pointer
struct vector_registry : registry<
                             policies::std_rtti, policies::fast_perfect_hash,
                             policies::vptr_vector> {};

Base Classes

Name

Description

vptr

Policy for v‐table pointer acquisition.

Types

Name

Description

fn

A VptrFn metafunction.

See Also