title: Structured bindings to get consecutive elements of a sub-vector without copying
body: <p>I have a <code>std::vector&lt;T&gt; vec</code> where consecutive blocks of 3 elements are of interest. For ease of processing, I'd like to extract such elements. Currently, the code looks like:</p>
  
  <pre><code>const T&amp; a = vec[i];
  const T&amp; b = vec[i + 1];
  const T&amp; c = vec[i + 2];
  </code></pre>
  
  <p>I'd like to use a structured binding to compress the extraction of <code>a</code>, <code>b</code>, <code>c</code> to a single line.</p>
  
  <p>A simple option would be something along the lines of:</p>
  
  <pre><code>std::tuple&lt;T, T, T&gt; getElement(int i) {
      return std::make_tuple(vec[i], vec[i+1], vec[i+2]);
  }
  
  // ...
  auto [a, b, c] = getElement(j);
  </code></pre>
  
  <p>The problem is that I would like to avoid useless copying of data. I'm not sure, but it seems that the vector elements will be copied here into the tuple. Would using <code>std::tuple&lt;T&amp;, T&amp;, T&amp;&gt;</code> be an option? </p>