template<class Spec, typename... Args>
inciter::SchemeBase::Call struct

Generic base for all call_* classes

This class stores the entry method arguments and contains a helper function and classes that facilitate unpacking the tuple into a variadic list of arguments passed to the called entry method. The Spec template argument is the class inheriting from this class (see CRTP at https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern), specializing functionality of this class. CRTP enables hiding all generic functionality here while exposing only the specialized one (the actual function call) to the base, which minimizes client code (in class Scheme). Unpacking the tuple to a variadic argument list is loosely inspired by https://stackoverflow.com/a/16868151.

Public types

template<typename P, typename Tuple, bool Done, int Total, int... N>
struct invoke_impl
Helper class for unpacking tuple into argument list.
template<typename P, typename Tuple, int Total, int... N>
struct invoke_impl<P, Tuple, true, Total, N...>
Helper class for unpacking tuple into argument list (end of list)

Public static functions

template<typename P, typename Tuple = std::tuple<int>>
static void invoke(P& p, Tuple&& t = {})

Constructors, destructors, conversion operators

Call(Args&&... args)
Constructor storing called member function arguments in tuple.

Public functions

template<typename P>
void operator()(P& p) const

Public variables

std::tuple<Args...> arg
Tuple storing arguments of the entry method to be called.

Function documentation

template<class Spec, typename... Args> template<typename P, typename Tuple = std::tuple<int>>
static void inciter::SchemeBase::Call<Spec, Args>::invoke(P& p, Tuple&& t = {})

Parameters
in/out Proxy behind which the entry method is called
in Optional tuple holding argments to be passed to the call

Invoke member function with arguments from tuple

template<class Spec, typename... Args> template<typename P>
void inciter::SchemeBase::Call<Spec, Args>::operator()(P& p) const

Parameters
in/out Proxy behind which the entry method is called

Function call operator overloading all types used with variant visitor Classes inheriting from this class should also inherit from boost::static_visitor which requires overloading operator(), unambiguously accepting any value of types Ts over which classes inheriting from this class may be used as functors for static visitor with a variant of types Ts.