| 38 | // through Duktape (with duk_error(...)), and the function does not return |
| 39 | template<typename... Args> |
| 40 | typename ArgsTuple<Args...>::type get_stack_values(duk_context* ctx) |
| 41 | { |
| 42 | // We need the argument indices for read_value, and we need to be able |
| 43 | // to unpack them as a template argument to match Ts. |
| 44 | // So, we use traits::make_indexes<Ts...>, which returns a traits::index_tuple<0, 1, 2, ...> object. |
| 45 | // We pass that into a helper function so we can put a name to that <0, 1, ...> template argument. |
| 46 | // Here, the type of Args isn't important, the length of it is. |
| 47 | auto indices = typename dukglue::detail::make_indexes<Args...>::type(); |
| 48 | return get_stack_values_helper<Args...>(ctx, indices); |
| 49 | } |
| 50 | } |
| 51 | } |