title: Unpacking arguments from tuples
body: <p>So I'm trying to figure out how this works: <a href="https://stackoverflow.com/questions/10766112/c11-i-can-go-from-multiple-args-to-tuple-but-can-i-go-from-tuple-to-multiple">C++11: I can go from multiple args to tuple, but can I go from tuple to multiple args?</a></p>
  
  <p>The piece of black magic I do not understand is this code fragment:</p>
  
  <pre><code>f(std::get&lt;N&gt;(std::forward&lt;Tuple&gt;(t))...)
  </code></pre>
  
  <p>it's the expression inside <code>f</code> that I don't understand.</p>
  
  <p>I understand that the expression somehow unpacks/expands what's inside <code>t</code> into a list of arguments. But could someone care to explain how this is done? When I look at the definition of <code>std::get</code> (<a href="http://en.cppreference.com/w/cpp/utility/tuple/get" rel="nofollow noreferrer">http://en.cppreference.com/w/cpp/utility/tuple/get</a>), I don't see how <code>N</code> fits in...? As far as I can tell, N is a sequence of integers. </p>
  
  <p>Based on what I can observe, I'm assuming that expressions in the form <code>E&lt;X&gt;...</code> where <code>X</code> is the sequence of types <code>X1</code>. <code>X2</code>, ... <code>Xn</code>, the expression will be expanded as <code>E&lt;X1&gt;, E&lt;X2&gt; ... E&lt;Xn&gt;</code>. Is this how it works?</p>
  
  <p><strong>Edit</strong>: In this case N is not a sequence of types, but integers. But I'm guessing this language construct applies to both types and values.</p>