title: c++ make nested tuple "plain" / "flatten"
body: <p><strong>Question</strong> :
  What is the best way to make tuple of tuples "plain"? E.g. one dimensional.</p>
  
  <p><em>Case1</em></p>
  
  <pre><code>template &lt;class Field&gt;
  auto process_field(Field&amp;&amp; field){
      // or another std::get&lt;ids&gt;(field)...
      return std::forward_as_tuple(field.fst, field.snd, field.thrd, field.fth); 
  }
  
  template &lt;std::size_t ...ids, class Rec&gt;
  auto iterate_record(std::index_sequence&lt;ids...&gt;, Rec &amp;&amp; rec){
      return forward_as_tuple(
          process_field
          (std::get&lt;ids&gt;( forward&lt;Rec&gt;(rec).data))...
      );
  }
  </code></pre>
  
  <p><code>iterate_record</code> returns tuple of tuples. I need plain tuple.</p>
  
  <p>Maybe I need some kind of wrapper around <code>iterate_record</code>, or directly around this: <code>process_field (std::get&lt;ids&gt;( forward&lt;Rec&gt;(rec).data))...</code></p>
  
  <hr>
  
  <p><em>Case2</em></p>
  
  <p>I have a tuple of tuples (concrete types, not references). How to copy it to plain version efficiently?</p>