title: Transform constexpr expressions into template non-type parameter
body: <p>In the following example I want to transform some <code>constexpr</code> values into template non-type parameters. 
  Here I have some <code>constexpr</code> values <code>a1</code> and <code>a2</code>. I can use there (also <code>constexpr</code>) data-member <code>d</code> as non-type template parameters for the template <code>B</code>. </p>
  
  <p>But if I try to take place this sort of transformation in some function <code>transform</code> this clearly doen't work anymore, since the parameter <code>tuple</code> isn't considered <code>constexpr</code>.  </p>
  
  <pre><code>#include &lt;cstdint&gt;
  #include &lt;tuple&gt;
  
  template&lt;auto N&gt;
  struct A {
      inline static constexpr auto size = N;
      const uint8_t d[N] {};
  };
  template&lt;auto N, auto... II&gt;
  struct B {};
  
  constexpr auto a1 = A&lt;2&gt;{1, 2};
  constexpr auto a2 = A&lt;3&gt;{2, 3, 4};
  constexpr auto t1 = std::tuple(a1, a2);
  
  constexpr auto b1 = B&lt;a1.size, a1.d[0], a1.d[1]&gt;{};
  constexpr auto b2 = B&lt;a2.size, a2.d[0], a2.d[1], a2.d[2]&gt;{};
  
  template&lt;typename T&gt;
  constexpr auto transform(const T&amp; tuple) {
      constexpr auto x1 = std::get&lt;0&gt;(tuple); // NOK
      constexpr auto b1 = B&lt;x1.size, x1.d[0], x1.d[1]&gt;{}; // NOK 
      return std::tuple(b1);
  }
  
  constexpr auto t2 = transform(t1);
  
  int main() {
  }
  </code></pre>
  
  <p>The question is then: how can I make this sort of transformation. My idea is to write a meta-function with tuple <code>t1</code> as parameter. But I can't get it right ...</p>