boost::openmethod::method<Id, ReturnType(Parameters...), Registry>::override

Add overriders to method

Synopsis

template<auto Fn...>
class override;

Description

override, instantiated as a static object, adds one or more overriders to an open‐method.

Requirements

Fn must be a function that fulfills the following requirements:

  • Have the same number of formal parameters as the method.

  • Each `virtual_ptr<T>` in the method's parameter list must have a corresponding `virtual_ptr<U>` parameter in the same position in the overrider's parameter list, such that `U` is the same as `T`, or has `T` as an accessible unambiguous base.

  • Each `virtual_<T>` in the method's parameter list must have a corresponding `U` parameter in the same position in the overrider's parameter list, such that `U` is the same as `T`, or has `T` as an accessible unambiguous base.

  • All other formal parameters must have the same type as the method's corresponding parameters.

  • The return type of the overrider must be the same as the method's return type or, if it is a polymorphic type, covariant with the method's return type.

Template Parameters

Name Description

Fn

One or more functions to the overrider list

Created with MrDocs