Most elegant variadic functor
Looks to me as if you've already got the most elegant solution in mind.

In C++14 you'd remove the dependency on std::function and simply return a naked lambda, like this:

template &lt;class Output, class... Inputs&gt;
auto make_function(const Output&amp; output, Inputs&amp;... inputs) {
  return [&amp;](typename Inputs::result_type... input_vals) {
    int dummy[] { 0, ((void)inputs.set(input_vals),0)... };
    return output.get();
  };
}


but in C++11 you can't make a function-that-returns-a-naked-lambda without a ton of boilerplate — if it's even possible at all.



Also, a nitpick, with props to @stephan-t-lavavej's talk at CppCon 2014. You wrote

(inputs.set(input_vals),0)...


but what you should have written was

((void)inputs.set(input_vals),0)...


to avoid accidentally calling MaliciousUserCode::operator,(int).