25#include "vari/bits/dispatch.h"
34template < std::size_t N,
typename Cnv,
typename... Fn >
35constexpr decltype( auto ) dispatch( index_type i, Cnv&& cnv, Fn&&... fn )
37 using types = factory_result_types_t< N, Cnv >;
39 typename _check_unique_invocability< types >::template with_pure_value< Fn... > _{};
41 return _dispatch_index< 0, N >( i, [&]< index_type j >() ->
decltype(
auto ) {
42 auto&& item = cnv.template operator()< j >();
44 return _dispatch_fun( (
decltype( item )&&) item, (Fn&&) fn... );
MIT License.
Definition: dispatch.h:32