title: How to get the i-th element from an std::tuple when i isn't know at compile-time?
body: <p>I have a variable <code>i</code> of type <code>std::size_t</code> and a tuple of type <code>std::tuple</code>. I want to get the <code>i</code>-th element of the tuple. I tried this:</p>
  
  <pre><code>// bindings... is of type const T&amp;...
  auto bindings_tuple = std::make_tuple(bindings...);
  auto binding = std::tuple_element&lt;i, const T&amp;...&gt;(bindings_tuple);
  </code></pre>
  
  <p>But I get this compile error saying that the first template argument must be an integral constant expression:</p>
  
  <blockquote>
    <p>error: non-type template argument of type '<code>std::size_t</code>' (aka '<code>unsigned long</code>') is not an integral constant expression</p>
  </blockquote>
  
  <p>Is it possible to get the <code>i</code>-th element of a tuple, and how to do that?</p>
  
  <hr>
  
  <p><sub><sup>I would like to do this without using boost, if possible.</sup></sub></p>