boost::openmethod::virtual_traits<boost::type_erasure::any<C, T&>, Registry>

Specialize virtual_traits for the mutable any reference, boost::type_erasure::any<Concept, _self&>, passed by value.

Synopsis

Declared in <boost/openmethod/interop/boost_type_erasure.hpp>

template<
    class C,
    typename T,
    class Registry>
struct virtual_traits<boost::type_erasure::any<C, T&>, Registry>;

Description

The any references are cheap, two‐word handles; passing them by value is the idiomatic way to use them as parameters. Dispatch is on the type bound at construction, obtained via boost::type_erasure::typeid_of ‐ not the C++ RTTI dynamic type of the referent. Concept must contain boost::type_erasure::typeid_<>; relaxed implies it.

Type Aliases

Name

Description

virtual_type

The type used for dispatch: the owning any for C.

Static Member Functions

Name

Description

peek

Returns a const reference to the any argument.

vptr

Returns a reference to a v‐table pointer for the bound value.

cast

Cast to a type.

Template Parameters

Name

Description

C

The any's Concept.

T

The referent placeholder (_self for any<C, _self&>).

Registry

A registry.