Template Function poet::dispatch(Functor&&, FirstParam&&, Rest&&…)

Function Documentation

template<typename Functor, typename FirstParam, typename ...Rest, std::enable_if_t<detail::is_dispatch_param_v<FirstParam>, int> = 0>
auto poet::dispatch(Functor &&functor, FirstParam &&first_param, Rest&&... rest) -> decltype(auto)

Dispatches runtime integers to compile-time specializations.

Accepts either leading dispatch_param arguments or a tuple of them. On miss, the non-throwing overload returns void or a default-constructed result.