title: C++17: Keep only some members when tuple unpacking
body: <p>Let's imagine you need to call the following method:</p>
  
  <pre><code>std::tuple&lt;int, int, int&gt; foo();
  </code></pre>
  
  <p>In C++17, you can call the function and unpack the tuple in a single line:</p>
  
  <pre><code>auto [a, b, c] = foo();
  </code></pre>
  
  <p>Now, how can I proceed to store only <code>b</code> and <code>c</code> and to discard <code>a</code>?</p>
  
  <p>Currently, I'm only aware of two options:</p>
  
  <hr>
  
  <p>1 - I can use a dummy variable when auto-unpacking</p>
  
  <p>However, the dummy variable will be unused and it will issue a warning, so if I want to silent that warning the code will be quite unpleasant to see:</p>
  
  <pre><code>#pragma warning(push)
  #pragma warning(disable:4101)
  // ReSharper disable once CppDeclaratorNeverUsed
  auto [_, b, c] = foo();
  #pragma warning(pop)
  </code></pre>
  
  <hr>
  
  <p>2 - I can store the whole tuple and use <code>std::get</code> to retrieve the reference to the only variables I need. The code is less unpleasant but the syntax is also less straightforward.</p>
  
  <p>Moreover, this code's size increases by one line for each new value that we want keep in the tuple.</p>
  
  <pre><code>auto tuple = foo();
  int b = std::get&lt;1&gt;(tuple);
  int c = std::get&lt;2&gt;(tuple);
  </code></pre>
  
  <hr>
  
  <p><em>Is there another and more straightforward method to unpack only some parameters in a tuple?</em></p>