| 60 | using BuildIndices = typename build_indices<N>::type; |
| 61 | |
| 62 | struct UnpackCaller |
| 63 | { |
| 64 | private: |
| 65 | template <typename FuncType, size_t... I> |
| 66 | auto Invoke(FuncType f, const std::vector<Value>& args, indices<I...>) -> decltype(f(args[I]...)) |
| 67 | { |
| 68 | return f(args[I]...); |
| 69 | } |
| 70 | |
| 71 | public: |
| 72 | template <typename FuncType, int Arity> |
| 73 | auto operator() (FuncType f, const std::vector<Value>& args) -> decltype(Invoke(f, args, BuildIndices<Arity>{})) |
| 74 | { |
| 75 | return Invoke(f, args, BuildIndices<Arity>{}); |
| 76 | } |
| 77 | }; |
| 78 | |
| 79 | template<typename FuncType, int Arity, typename ReturnType> |
| 80 | struct FunctionWrapper |
no outgoing calls
no test coverage detected