i have function named _push can handle different parameters, including tuples, , supposed return number of pushed elements. for example, _push(5) should push '5' on stack (the stack of lua ) , return 1 (because 1 value pushed), while _push(std::make_tuple(5, "hello")) should push '5' , 'hello' , return 2. i can't replace _push(5, "hello") because use _push(foo()) , want allow foo() return tuple. anyway can't manage make work tuples: template<typename... args, int n = sizeof...(args)> int _push(const std::tuple<args...>& t, typename std::enable_if<(n >= 1)>::type* = nullptr) { return _push<args...,n-1>(t) + _push(std::get<n-1>(t)); } template<typename... args, int n = sizeof...(args)> int _push(const std::tuple<args...>& t, typename std::enable_if<(n == 0)>::type* = nullptr) { return 0; } let's want push tuple<int,bool> . how expect work: _pu...