Skip to content

Struct zmbt::reflect::custom_invocation

template <class T, class E>

ClassList > zmbt > reflect > custom_invocation

Customize the interface reflection metafunction. More...

Detailed Description

Provide custom type definitions and 'apply' method for callables. Required fields: * type: callable type (metafunction template parameter) * host_t: host object type * return_t: callable return type * args_t: callable arguments tuple type * apply: callable invocation method with signature: * If host_t is nullptr_t:

static return_t apply(nullptr_t, type ifc, args_t args);

  • If host_t is class:
    template <class H>
    static return_t apply(H&& object, type ifc, args_t args);
    

For class methods, the apply function must support references and pointers, including smart pointers. Therefore, a templated version of the apply is recommended but can be replaced with a set of overloads if necessary.

Template parameters:

  • T callable type
  • E SFINAE enabler

The documentation for this class was generated from the following file zmbt-framework/zmbt-framework/backends/cxx/include/zmbt/reflect/invocation.hpp