boost::openmethod::registry_affinity

The registry a class has an affinity for.

Synopsis

Declared in <boost/openmethod/core.hpp>

template<typename T>
using registry_affinity = /* implementation-defined */::type;

Description

Every class has a registry affinity. A class declares one with a member typedef named boost_openmethod_registry, or with a boost_openmethod_registry overload ‐ the typedef takes precedence; one that declares none has the default affinity, BOOST_OPENMETHOD_DEFAULT_REGISTRY.

Evaluates to the return type of the overload found for T by argument‐dependent lookup, minus cv‐qualifiers. T itself is first stripped of cv‐qualifiers, references and pointers, and a smart pointer ‐ a type that virtual_traits is specialized for ‐ is unwrapped, so Class, const Class&, Class* and std::shared_ptr<Class> all yield the same registry.

The declaration must precede the first mention of the class: see boost_openmethod_registry.

A declared affinity wins over a default one. That is what lets a method mix a class that declares an affinity with one that does not: the latter yields.

Template Parameters

Name

Description

T

A class, or a reference, pointer or smart pointer to one.